get_input_map
Retrieve input action mappings for Godot projects to configure keyboard, controller, and device controls for gameplay interactions.
Instructions
Get the project input action mappings.
Input Schema
TableJSON Schema
| Name | Required | Description | Default |
|---|---|---|---|
No arguments | |||
Implementation Reference
- src/tools/project-tools.ts:52-81 (handler)The handler implementation for the 'get_input_map' tool, which extracts input action mappings from the project info.
handler: async (_ctx) => { const info = getProjectInfo(); if (!info) { return makeTextResponse({ error: "No Godot project detected", data: null, }); } return makeTextResponse({ data: info.inputActions.map((a) => ({ name: a.name, deadzone: a.deadzone, events: a.events.map((e) => { const filtered: Record<string, unknown> = { type: e.type }; if (e.properties.key_name) filtered.key_name = e.properties.key_name; if (e.properties.physical_keycode) filtered.physical_keycode = e.properties.physical_keycode; if (e.properties.button_index) filtered.button_index = e.properties.button_index; if (e.properties.joypad_axis != null) filtered.joypad_axis = e.properties.joypad_axis; if (e.properties.axis_value != null) filtered.axis_value = e.properties.axis_value; for (const mod of ["ctrl_pressed", "shift_pressed", "alt_pressed", "meta_pressed"]) { if (e.properties[mod] === true) filtered[mod] = true; } return filtered; }), })), metadata: { source: "index" }, }); }, - src/tools/project-tools.ts:48-51 (registration)Registration of the 'get_input_map' tool within the project tools definition.
{ name: "get_input_map", description: "Get the project input action mappings.", schema: {},