add_input_action
Add or extend input map actions by specifying keyboard, mouse, or joypad events. Optionally replace existing bindings.
Instructions
Add or extend an input map action with events. Each event: {type:"key", key:"Space"} | {type:"mouse_button", button_index:1} | {type:"joypad_button", button_index:0} | {type:"joypad_motion", axis:0, axis_value:1.0}.
Tool call template
Replace each placeholder with a value matching the input schema. Only required parameters are included; add optional parameters as needed.
{
"id": 1,
"jsonrpc": "2.0",
"method": "tools/call",
"params": {
"arguments": {
"projectPath": "<projectPath>",
"action": "<action>",
"events": "<events>"
},
"name": "add_input_action"
}
}Input Schema
| Name | Required | Description | Default |
|---|---|---|---|
| projectPath | Yes | Path to the Godot project directory | |
| action | Yes | Action name (e.g. jump) | |
| events | Yes | Array of event specs | |
| deadzone | No | Deadzone (default 0.5) | |
| replace | No | Replace existing events instead of appending (default false) |