# Gamepad tester direct polling with string names ```{raw} html ▶ Run in browser ``` **Tags:** `input` `gamepad` `polling` Every gamepad input the polling API exposes, drawn live: both sticks as a crosshair in a circle (get_gamepad_vector), the analogue triggers as fill bars (get_gamepad_axis "lt"/"rt"), and all fifteen buttons as labelled dots that light while held (is_gamepad_pressed). Which pads are readable comes from get_connected_gamepads(), so plugging one in and unplugging it again are both visible while the demo runs. ## What it demonstrates - Direct polling with string names: `Input.get_gamepad_vector(pad, "left")`, `Input.get_gamepad_axis(pad, "lt")`, `Input.is_gamepad_pressed(pad, "a")`. - The full standard-gamepad name set: 15 buttons and 6 axes. - `Input.get_connected_gamepads()`: the ids readable this frame, which shrinks the moment a pad is unplugged. - The engine's axis convention, identical on every backend: sticks -1..1 centred at 0, triggers 0..1 resting at 0. - The built-in radial deadzone on `get_gamepad_vector` (a small circle marks it). Controls: Gamepad - everything on it, mirrored on screen ESC - Quit Run: uv run python examples/features/input/gamepad.py Headless self-check: uv run python examples/features/input/gamepad.py --test ## Source ```{literalinclude} ../../examples/features/input/gamepad.py :language: python :linenos: ```