input_event_manage
Simulate keyboard, mouse, and action inputs, replay event macros, and inspect input states to automate gameplay testing in Godot.
Instructions
Input Event Simulation, Macro Replay, and Virtual Actions.
Ops:
simulate_action(action, pressed=True, strength=1.0) Simulate an input action press or release in the running game or editor.
simulate_key(key, pressed=True, echo=False, shift=False, ctrl=False, alt=False) Simulate a keyboard key event (e.g. 'W', 'Space', 'Escape', or keycode).
simulate_mouse_button(button_index=1, pressed=True, position=[0.0, 0.0]) Simulate a mouse button press or release at coordinates (1=Left, 2=Right, 3=Middle).
simulate_mouse_motion(position=[0.0, 0.0], relative=[0.0, 0.0], velocity=[0.0, 0.0]) Simulate a mouse cursor motion event.
replay_macro(events=[]) Replay a sequential list of input events for automated gameplay testing.
get_input_state(action) Inspect whether an input action is pressed and its current strength.
Canonical call shape: {"op": "<verb>", "params": {...}}. Flat op parameters are accepted as a compatibility alias when the client transmits them; op and session_id remain top-level.
Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| op | Yes | ||
| params | No | ||
| session_id | No |
Output Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||