Simulate input
inputSimulate keyboard, gamepad, mouse, and text events in a running Godot game; record and replay play sessions to automate testing and reproduce player behavior.
Instructions
Play the running game: press input actions, keys, gamepad buttons, click/drag at viewport coordinates or directly on a node (UI buttons), type text. Steps run in order with real timing. Also record the user's play session and replay it.
Actions:
send: {steps: [...]} where each step is one of: {action:'jump', hold?:0.2} | {action, pressed:true/false} | {key:'Space'|'Ctrl+S', hold?} | {click:[x,y], button?, double?, space?:'viewport'|'screenshot'} | {click_node:'UI/StartButton'} | {mouse_move:[x,y]} | {drag:[[x1,y1],[x2,y2]], seconds?} | {joy:'a'} | {axis:'left_x', value:-1, hold?} | {text:'hello'} | {wait:0.5} | {release_all:true}
record: {mode: 'start'|'stop', include_mouse_motion?} capture real input; 'stop' returns events with timestamps.
replay: {events, speed?=1} replay recorded events.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| mode | No | 'start' or 'stop' for record. | |
| speed | No | Replay speed multiplier. | |
| steps | No | Input steps, executed in order. | |
| action | Yes | What to do. See the tool description for each action's parameters. | |
| events | No | Events from record. |