# Controllers and touch controls

Connect your PS4, PS5 DualSense (including Edge), or Xbox controller via USB or Bluetooth, then
press a button in the game so the browser can discover it. This implementation
uses the browser's standard Gamepad mapping, not a native console application.
Raw/unmapped controllers are not guessed. Keyboard and touch remain available.

| Action | PS4 / PS5 | Xbox |
|---|---|---|
| Move / crouch | Left stick or D-pad left/right/down | Same |
| Jump / double jump | D-pad up | D-pad up |
| Light punch | Square | X |
| Heavy punch | Circle | B |
| Light kick | Triangle | Y |
| Heavy kick | L1 | LB |
| Dash | R1 | RB |
| Hold guard | L2 | LT |
| Special | R2 | RT |
| Launcher | Cross | A |
| Super | L3 / left stick click | Left stick click |
| Signature | R3 / right stick click | Right stick click |
| Item action (currently disabled) | D-pad down | D-pad down |
| Pause / resume | Options | Menu |

Menus: stick or D-pad navigates; Cross/A confirms; Triangle/Y goes back.
Disconnecting the active controller pauses the match. A small deadzone limits
stick drift. Inputs can be mixed with the keyboard or touch controls.

On touch devices, the movement pad and action buttons appear during matches.
Hold a direction/guard with one finger while tapping attacks with others.
Tap Jump twice for the double jump. Pause opens the normal tappable menu.
Portrait places the controls below the fight; landscape overlays compact controls
at the lower edges. Landscape is recommended. The Touch Controls button enables
the same controls for desktop testing. Rotation/cancelled pointers and pausing
release held touch controls.

For phone access, serve the game at a phone-accessible web URL; the Mac's local
file path cannot be used directly on another device. No deployment is performed
by this change. Browser/device/controller support and actual touch layout still
need hardware playtesting; automated tests simulate the input APIs.

Tests: verify-inputs.cjs, verify-long-combos.cjs and work/render-release.cjs.
