All skills
thedivergentai avatar

/godot-input-handling

@9d6e91e

Expert patterns for input handling covering InputMap actions, InputEvent processing, controller support, rebinding, deadzones, and input buffering. Use when setting up player controls, implementing input systems, or adding gamepad/accessibility features. Keywords InputMap, InputEvent, gamepad, controller, rebinding, deadzone, input buffer.

Use this Skill: https://skilld.dev/gh/thedivergentai/gd-agentic-skills/godot-input-handling

This session only. Nothing lands on disk.

referencesmulti-modal-input-ui-glyphs.md

≈202 tokens on demand. Your agent reads this file only when SKILL.md points to it.

Multi-Modal Input & UI Glyphs

Modern games must handle simultaneous Controller and Keyboard/Mouse input smoothly.

1. Handling Input Modes

  • Mouse Aiming: Process InputEventMouseMotion in _unhandled_input() for relative movement.
  • Stick Movement: Poll Input.get_vector() in _physics_process() for clamped state.

2. Dynamic Glyph Swapping

To update UI prompts (e.g., "Press E" vs "Press X") in real-time:

  • Autoload Strategy: Create a singleton that monitors _input(event).
  • Detection: Check event is InputEventJoypadButton or InputEventJoypadMotion to detect gamepad use.
  • Broadcasting: Emit a signal (e.g., signal device_changed(is_gamepad: bool)) when the hardware type shifts. All UI elements should listen to this signal to swap their prompt textures.

Source: SKILL.md on GitHub

1 warning17d4 checks · Risk MEDIUM
  • Gen Agent Trust Hub17d

    The skill provides comprehensive patterns for Godot input handling, but includes a medium-severity risk involving unsafe deserialization of local configuration files via bytes_to_var and str_to_var.

  • Socket17d

    No alerts

  • Snyk17d

    Risk: LOW · No issues

  • Runlayer7mo

    1/4 files flagged

Signed by skilld at 9d6e91e. This ties the file your Agent reads to that commit on GitHub. It does not review the instructions.

Last checked against GitHub 3 weeks ago.

Activeupdated 2 months ago

README badge

README badge for thedivergentai/gd-agentic-skills/godot-input-handling