Gamepad Tester
Connect your controller and press any button. Every button, trigger and stick shows live, with a dead-zone circle that makes stick drift easy to spot.
Stick drift check
Let go of both sticks. Each dot should settle inside its dashed circle, the dead zone games ignore (0.24 left, 0.27 right).
Your controller
Press a button
Connect your controller and press any button: browsers only show a controller to a page after you touch it.
How this works: Method, 10 sources, Checked against 2 worked examples,
How this works
Method
The page reads your controller through the W3C Gamepad API. Browsers keep controllers hidden until you press a button or move a stick, so a page can’t learn what is plugged in without you touching it. After that, the tester reads every button and axis each time the screen redraws, 60 times a second on most screens. Full method
Sources
- Gamepad (W3C)
- Getting Started With XInput (Microsoft)
- Media Capture and Streams (W3C)
- MediaDevices: getUserMedia() (MDN)
- Web Audio API (W3C)
- MediaStream Recording (W3C)
- UI Events KeyboardEvent code Values (W3C)
- UI Events (W3C)
- Pointer Events (W3C)
- Gamepad API (MDN)
How it’s tested
2 worked examples for this page are checked by automated tests before every release: given the inputs, the tool must show the expected answer.
Changes
- First version: mic, webcam, keyboard, click speed, spacebar and gamepad tests, all on the device.
Example: an Xbox controller at rest
Connected to Chrome, an Xbox controller reports the standard mapping: 17 buttons and 4 axes. Let go of both sticks and each should settle near 0.00, 0.00. If the left stick rests at 0.30 to the right, that is outside Microsoft’s suggested dead zone of 0.24 (7849 of 32767), so a game that uses it will see movement nobody made: stick drift.
How the gamepad tester works
The page reads your controller through the W3C Gamepad API. Browsers keep controllers hidden until you press a button or move a stick, so a page can’t learn what is plugged in without you touching it. After that, the tester reads every button and axis each time the screen redraws, 60 times a second on most screens.
Buttons report from 0, untouched, to 1, fully pressed, so analog triggers fill gradually. Sticks report two axes from −1 to 1, left to right and up to down. When the browser recognises the controller it uses the standard mapping, with the same button order for every brand, and the drawing names the buttons for Xbox, PlayStation or Switch from the controller’s name.
Each stick sits in a circle the size of Microsoft’s suggested dead zone, the area games ignore. The tester tracks the stick’s closest approach to the centre over the last two seconds: if, untouched, it never gets back inside the circle, it is drifting. Vibration uses the gamepad’s haptic actuator where the browser supports one.
distance from centre = √(x² + y²)
- Browsers return no gamepads until one has seen a button press or stick movement, so a page can’t fingerprint you by what is plugged in. Source: Gamepad.
- Microsoft’s suggested dead zones are 7849 and 8689 of 32767 for the left and right sticks (0.24 and 0.27 on the Gamepad API’s scale) and 30 of 255 for the triggers. Source: Getting Started With XInput.
Standard gamepad button map
The W3C standard mapping’s button order, with each maker’s name for the button.
| Index | Position | Xbox | PlayStation | Switch |
|---|---|---|---|---|
| 0 | Bottom face button | A | Cross | B |
| 1 | Right face button | B | Circle | A |
| 2 | Left face button | X | Square | Y |
| 3 | Top face button | Y | Triangle | X |
| 4 | Left bumper | LB | L1 | L |
| 5 | Right bumper | RB | R1 | R |
| 6 | Left trigger | LT | L2 | ZL |
| 7 | Right trigger | RT | R2 | ZR |
| 8 | Left centre button | View | Create | − |
| 9 | Right centre button | Menu | Options | + |
Show all 17 rowsShow fewer
| 10 | Left stick press | LS | L3 | LS |
| 11 | Right stick press | RS | R3 | RS |
| 12 | D-pad up | Up | Up | Up |
| 13 | D-pad down | Down | Down | Down |
| 14 | D-pad left | Left | Left | Left |
| 15 | D-pad right | Right | Right | Right |
| 16 | Centre button | Xbox | PS | Home |
Frequently Asked Questions
Why isn’t my controller detected?
Press a button: browsers hide controllers until you do. If it still doesn’t appear, check it is paired or plugged in (try another cable, some only charge), close apps such as Steam that may take it over, and try Chrome or Edge, which recognise the most controllers.
How do I check for stick drift?
Move each stick around, then let go. The dot should come back to the centre and settle inside the circle. If it rests outside the circle when nobody is touching it, the stick drifts; the readout under it shows by how much.
Does it work with PS5 and Switch controllers?
Yes, when your browser and system recognise them: Xbox controllers, the DualShock 4 and the DualSense use the standard mapping in Chrome and Edge. A controller the browser doesn’t recognise still shows its raw buttons and axes in the list.
Why is there no vibration button?
Vibration needs both a controller with rumble motors and a browser that lets pages use them. Chromium browsers such as Chrome and Edge support it for many controllers; when yours doesn’t, the button is hidden rather than doing nothing.