# Named input actions one intent bound to keyboard, mouse and gamepad ```{raw} html ▶ Run in browser ``` **Tags:** `input` `actions` `keyboard` `mouse` `gamepad` The root node declares an ``input_actions`` dictionary binding each action to keyboard keys, a mouse button, a gamepad button (``JoyButton.A``) and analog stick axes (explicit ``InputBinding(joy_axis=...)``). A shape moves with ``Input.get_vector``, hops on ``is_action_just_pressed``, and a boost bar shows ``get_action_strength`` reading an analog trigger. The HUD lists every action with its bindings and lights up the ones active this frame. ## What it demonstrates - ``input_actions`` class attribute on the root node: the canonical, web-safe registration path, mixing bare Key / MouseButton / JoyButton values with explicit ``InputBinding(joy_axis=..., joy_axis_positive=...)`` for sticks. - ``Input.get_vector`` (normalised movement), ``is_action_just_pressed`` (jump) and ``get_action_strength`` (analog boost from a trigger axis). - Enumerating bindings back out of ``InputMap`` to label the HUD. Controls: WASD / arrows / left stick - Move SPACE / left click / pad A - Jump SHIFT / right trigger - Boost ESC - Quit Run: uv run python examples/features/input/actions.py Headless self-check: uv run python examples/features/input/actions.py --test ## Source ```{literalinclude} ../../examples/features/input/actions.py :language: python :linenos: ```