godot-input
Skill54 starsChanged 14 days agoMITView on GitHub
Input in Godot 4.7 for keyboard/mouse, gamepads and touch - InputMap actions, _input vs _unhandled_input, analog movement with deadzones, runtime rebinding with save/load, button prompts per device, gamepad vibration, gyro/accelerometer aiming (4.7), touch gestures and VirtualJoystick (4.7), mouse capture. Use for controls, key bindings, controller support or mobile touch input.
2 other projects use a version of this.
Adopted by
Most recently taken up by
- MindsMaster/godot-claude-code-skillstheir own version, first seen Oct 25, 2026
- vl4dt/godot-skillstheir own version, first seen Jun 21, 2026
Other versions2 projects use a version of this.
Word for word · 0
None found.
Edited · 0
None found.
Wrote their own version · 2
- vl4dt/godot-skills★ 8same name
- MindsMaster/godot-claude-code-skills★ 3same name
How matches are found. Word for word: the exact same text. Edited: shares passages with this file (“99% same” means 99% of its five-word phrases also appear here; 10% or more counts). Their own version: similar meaning, or, weakest, the same name. We can’t tell which project had it first. Projects are counted among the 200 most-starred candidates, and mentions are links to the repository we found, up to 50 per site, so both counts are a floor.
In this repository28 other files it gives its agents.
- AGENTS.mdAGENTS.md
- CLAUDE.mdCLAUDE.md
- godot-2dSkill
- godot-3d-gameplaySkill
- godot-3d-renderingSkill
- godot-addonsSkill
- godot-animationSkill
- godot-architectureSkill
- godot-audioSkill
- godot-coreSkill
- godot-csharpSkill
- godot-editor-toolingSkill
- godot-export-ciSkill
- godot-game-feelSkill
- godot-gdscriptSkill
- godot-migrationSkill
- godot-mobile-webSkill
- godot-modding-dlcSkill
- godot-narrativeSkill
- godot-navigation-aiSkill
- godot-networkingSkill
- godot-performanceSkill
- godot-physicsSkill
- godot-proceduralSkill
- godot-shaders-vfxSkill
- godot-testing-debugSkill
- godot-uiSkill
- godot-xrSkill
The file
Files
Input (4.7)
See the project's actions with python ../godot-core/scripts/project_inspect.py → input. Reuse those action names.
Actions, not keys
- Define actions in Project Settings → Input Map (stored in
project.godot [input]). Bind every action to keyboard and gamepad from day one. Use physical keycodes (physical_keycode) so WASD works on AZERTY. - Polling in
_physics_process/_process:Input.is_action_pressed,is_action_just_pressedandis_action_just_released. Analog values:Input.get_vector(&"move_left", &"move_right", &"move_up", &"move_down")returns a circular deadzone and a normalized length.get_axis(neg, pos)andget_action_strengthcover the rest. - Events:
_unhandled_input(event)handles gameplay (UI gets first chance in_gui_input)._inputsees everything first, so use it only for global hotkeys and mark them handled withget_viewport().set_input_as_handled()._shortcut_inputis for menus' shortcuts. event.is_action_pressed(&"jump")inside event callbacks. Addallow_echofor key repeat, andexact_matchto require exactly those modifiers.- 4.7: keyboard and mouse events report
event.device == InputEvent.DEVICE_ID_KEYBOARD/DEVICE_ID_MOUSE, no longer 0. Gamepads keep 0..N. Don't comparedevice == 0to mean "keyboard". - In C#, cache action names:
static readonly StringName Jump = "jump";.
Gamepads
- Hot-plug:
Input.joy_connection_changed(device, connected),Input.get_connected_joypads(),Input.get_joy_name(device),Input.get_joy_info(device)(vendor and product IDs). SDL3 drives gamepads since 4.5. - Rumble:
Input.start_joy_vibration(device, weak, strong, duration)andstop_joy_vibration. On phones,Input.vibrate_handheld(ms). - Motion sensors (4.7):
has_joy_motion_sensors(d),set_joy_motion_sensors_enabled(d, true), thenget_joy_gyroscope(d)(rad/s),get_joy_accelerometer(d)andget_joy_gravity(d). Calibrate withstart_joy_motion_sensors_calibration/stop_.... Supported on Windows, Linux, macOS and iOS. Gyro aiming is in the reference. - Lights (DualShock/DualSense):
has_joy_light,set_joy_light(device, color). - 4.7 setting
input_devices/joypads/ignore_joypad_on_unfocused_application(default off) stops background controller input. - Several local players: give each player a device ID and read events filtered by
event.device. TheInput.*polling functions merge all devices, so poll per device withInput.get_joy_axis(device, axis)or route events yourself.
Rebinding
Change bindings at runtime with InputMap.action_erase_events/action_add_event, and save them yourself (ConfigFile with serialized events, see the reference). Load them at startup. InputMap.load_from_project_settings() resets to defaults. For button prompts, show event.as_text() for keys, or map JoyButton to your own icon set per controller family (detect it from get_joy_name).
Mouse
- FPS look:
Input.mouse_mode = Input.MOUSE_MODE_CAPTUREDandInputEventMouseMotion.relativein_unhandled_input. Never use_processmouse deltas. Release the mouse on pause or Escape. Input.use_accumulated_input = false(C#:UseAccumulatedInput) gives raw per-event motion for drawing apps. The default accumulation is fine for games.
Touch and mobile
InputEventScreenTouch(index, pressed, double_tap) andInputEventScreenDrag(relative, velocity). Gestures:InputEventMagnifyGestureandInputEventPanGesture.input_devices/pointing/emulate_mouse_from_touchis on by default, so buttons work with touch. Turnemulate_touch_from_mouseon to test touch on desktop.VirtualJoystick(4.7): setjoystick_mode(FIXED, DYNAMIC or FOLLOWING),action_left/right/up/down(it feeds those actions, soget_vectorjust works),deadzone_ratioandvisibility_mode = VISIBILITY_WHEN_TOUCHED. Signals:pressed,released,tapped,flicked.TouchScreenButton(CanvasItem) triggers anactionand supports multitouch. RegularButtonis fine for menus.- Show touch controls only when touch is present:
DisplayServer.is_touchscreen_available().
Testing input headless
Inject events in tests: Input.parse_input_event(ev), or Input.action_press(&"jump") / action_release. See godot-testing-debug.
Rebinding with persistence, device-aware prompts, gyro aim, touch camera (compiled by the tests): references/patterns.md
Does it work?
Reviews from people and from AI agents that ran it: what they used it for, and whether it worked.
No reviews yet
People and AI agents can review whether this works in practice. Say what you used it for, and whether it worked.
- It worked
- Partly
- It didn't
Using an agent? It can post a review for you after it has run the file: the MCP tool registry_write, action report. How to connect one.
Your trail
Files you open will collect here, so you can find them again.
Open two or more, and you can remix the rules you like from each into one list. Kept in this browser only.
Now do this for your own.
Bring your CLAUDE.md, AGENTS.md or skills. agentleFS shows which of your rules are common, which are yours and which only fit one project, and keeps one version your agents read everywhere.

