Input Mapper
$ARGUMENTS
Read the GDD or user request, determine which input actions are needed,
and write the correct [input] section entries into project.godot.
Step 1 — Extract Required Actions
Source actions from one of:
- GDD Mechanics table — each mechanic implies input actions
(e.g., "Player can jump" →
jump action).
- Genre preset — use a preset from Step 3 as a starting point.
- Explicit request — user or dispatching role specifies exact actions.
For each action, determine: action name (snake_case), bound keys/buttons.
Step 2 — Write to project.godot [input] Section
For Object() serialization format, templates (keyboard, mouse, gamepad button, gamepad axis), and key code table, read references/serialization.md.
Step 3 — Genre Presets
Use these as starting points. Add gamepad bindings if the GDD mentions controller support.
Platformer
| Action |
Keys |
move_left |
A, Left Arrow |
move_right |
D, Right Arrow |
jump |
Space, W, Up Arrow |
Top-down
| Action |
Keys |
move_up |
W, Up Arrow |
move_down |
S, Down Arrow |
move_left |
A, Left Arrow |
move_right |
D, Right Arrow |
Shooter (top-down or twin-stick)
| Action |
Keys / Buttons |
move_up |
W, Up Arrow |
move_down |
S, Down Arrow |
move_left |
A, Left Arrow |
move_right |
D, Right Arrow |
shoot |
LMB (mouse button 1) |
reload |
R |
UI (add to all genres)
Note: ui_accept, ui_cancel, ui_left, ui_right, ui_up, ui_down are
built-in Godot actions — do NOT redefine them in [input] unless overriding defaults.
Step 4 — Validation
Check that every Input.is_action_*("action_name") and event.is_action("action_name")
call in .gd files has a matching entry in project.godot [input] or is a built-in
Godot action (prefixed with ui_).
To validate:
- Grep all
.gd files for is_action\w*\("([^"]+)"\) — extract action names.
- Parse
project.godot [input] section for defined actions.
- Built-in actions (do not need definition):
ui_accept, ui_cancel, ui_select,
ui_left, ui_right, ui_up, ui_down, ui_focus_next, ui_focus_prev,
ui_page_up, ui_page_down, ui_home, ui_end, ui_text_*, ui_filedialog_*,
ui_graph_*, ui_copy, ui_cut, ui_paste, ui_undo, ui_redo.
- Report any action referenced in code but missing from project.godot.
1---2name: input-mapper3description: Manage Godot input action mappings in project.godot. Use when adding input actions, changing key bindings, setting up controls for a new genre, or validating that all referenced actions exist. Use it while implementing mechanics or changing the project's controls.4---56# Input Mapper78$ARGUMENTS910Read the GDD or user request, determine which input actions are needed,11and write the correct `[input]` section entries into `project.godot`.1213## Step 1 — Extract Required Actions1415Source actions from one of:16171. **GDD Mechanics table** — each mechanic implies input actions18 (e.g., "Player can jump" → `jump` action).192. **Genre preset** — use a preset from Step 3 as a starting point.203. **Explicit request** — user or dispatching role specifies exact actions.2122For each action, determine: action name (snake_case), bound keys/buttons.2324## Step 2 — Write to project.godot [input] Section2526For Object() serialization format, templates (keyboard, mouse, gamepad button, gamepad axis), and key code table, read `references/serialization.md`.2728## Step 3 — Genre Presets2930Use these as starting points. Add gamepad bindings if the GDD mentions controller support.3132### Platformer3334| Action | Keys |35|--------|------|36| `move_left` | A, Left Arrow |37| `move_right` | D, Right Arrow |38| `jump` | Space, W, Up Arrow |3940### Top-down4142| Action | Keys |43|--------|------|44| `move_up` | W, Up Arrow |45| `move_down` | S, Down Arrow |46| `move_left` | A, Left Arrow |47| `move_right` | D, Right Arrow |4849### Shooter (top-down or twin-stick)5051| Action | Keys / Buttons |52|--------|---------------|53| `move_up` | W, Up Arrow |54| `move_down` | S, Down Arrow |55| `move_left` | A, Left Arrow |56| `move_right` | D, Right Arrow |57| `shoot` | LMB (mouse button 1) |58| `reload` | R |5960### UI (add to all genres)6162| Action | Keys |63|--------|------|64| `pause` | Escape |6566Note: `ui_accept`, `ui_cancel`, `ui_left`, `ui_right`, `ui_up`, `ui_down` are67built-in Godot actions — do NOT redefine them in `[input]` unless overriding defaults.6869## Step 4 — Validation7071Check that every `Input.is_action_*("action_name")` and `event.is_action("action_name")`72call in `.gd` files has a matching entry in `project.godot [input]` or is a built-in73Godot action (prefixed with `ui_`).7475To validate:76771. Grep all `.gd` files for `is_action\w*\("([^"]+)"\)` — extract action names.782. Parse `project.godot` `[input]` section for defined actions.793. Built-in actions (do not need definition): `ui_accept`, `ui_cancel`, `ui_select`,80 `ui_left`, `ui_right`, `ui_up`, `ui_down`, `ui_focus_next`, `ui_focus_prev`,81 `ui_page_up`, `ui_page_down`, `ui_home`, `ui_end`, `ui_text_*`, `ui_filedialog_*`,82 `ui_graph_*`, `ui_copy`, `ui_cut`, `ui_paste`, `ui_undo`, `ui_redo`.834. Report any action referenced in code but missing from project.godot.