How to find a button’s number
Connect the controller and press any button. The box at the top of the tool names the last button or axis you used, with its index number and its position in the standard layout. The diagram shows the index numbers on each button (untick the box to see the names instead), and the event log lists every press, release and stick movement with the time since you connected.
Axes are logged when they pass half-way (±0.50) in either direction and again when they return to the centre, so a flick right on the left stick appears as Axis 0 → +0.87. The raw readout beside the log lists every button (B0, B1…) and axis (A0…) with its live value, including any extra buttons beyond the standard 17.
The standard layout
The W3C Gamepad specification defines one layout for all recognised controllers: 17 buttons numbered by where they sit (face buttons 0–3, bumpers 4–5, triggers 6–7, the two centre buttons 8–9, stick clicks 10–11, the d-pad 12–15 and the home button 16) and 4 axes for the two sticks, with −1 meaning left or up. When a browser recognises a controller it reports mapping as "standard" and uses these numbers, whatever the controller calls its buttons. Chrome and Firefox add index 17 for a touchpad click or capture button. The table below lists every index with its name on Xbox, PlayStation and Nintendo controllers.
When the browser doesn’t recognise a controller, mapping is empty and the buttons arrive in the controller’s own order. The tester says so above the diagram, and this page is then the quickest way to write down which number each button got. Flight sticks, HOTAS throttles and racing wheels almost always arrive this way, with extra axes for throttles, pedals and twist: the joystick tester and the steering wheel tester are built for them.
Using the numbers
Emulators, Steam Input, game engines and browser games all use these indexes when you bind controls. Write down the numbers for the buttons you care about, or copy the log, and bind them in your app. If a button never appears in the log, it isn’t reported to browsers at all: that’s the case for the DualSense mute button, the Xbox Share button in Chrome on Windows, and the back buttons of pro controllers unless their profile maps them to a standard button. Test for dead buttons and drift on the controller tester, and check a keyboard’s key codes with the keyboard tester.
The standard gamepad layout by index
Every controller a browser recognises is reported in this layout (mapping is "standard"). Index 17 isn’t part of the W3C standard: Chrome and Firefox add it for a touchpad click or capture button where the controller has one.
| Button | Position | Xbox | PlayStation | Nintendo |
|---|---|---|---|---|
| 0 | Bottom face button | A | ✕ | B |
| 1 | Right face button | B | ○ | A |
| 2 | Left face button | X | □ | Y |
| 3 | Top face button | Y | △ | 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 | Back / select | View | Create | − |
| 9 | Start / menu | Menu | Options | + |
| 10 | Left stick press | LS | L3 | LS |
| 11 | Right stick press | RS | R3 | RS |
| 12 | D-pad up | ↑ | ↑ | ↑ |
| 13 | D-pad down | ↓ | ↓ | ↓ |
| 14 | D-pad left | ← | ← | ← |
| 15 | D-pad right | → | → | → |
| 16 | Home / guide | Guide | PS | Home |
| 17 | Touchpad / capture | Share | Pad | Capture |
| Axis | Meaning |
|---|---|
| 0 | Left stick, horizontal (−1 left, +1 right) |
| 1 | Left stick, vertical (−1 up, +1 down) |
| 2 | Right stick, horizontal |
| 3 | Right stick, vertical |