Gamepad Button Mapping Test: Which Index Is My Button?

Press a button and see the number the browser gives it, with a live raw readout and a log of every button and axis change.

Connect a controller, then press any button

Plug it in with a USB data cable or pair it over Bluetooth. Browsers only reveal a controller after a button press, so press A or ✕ if nothing appears. Nothing is sent anywhere.

No controller yet

The diagram lights up as soon as your controller sends input.

Which button is which index?

Press any button or push any stick: the browser's index number for it appears here, and every change is logged with the time. These are the numbers games, emulators and Steam Input use when they map a controller.

Press a button on your controller.

Event log

    Raw readout

    IndexStandard positionLabelValue
    Connect a controller.
    Live controller diagram: buttons light up when pressed, triggers fill as you squeeze them6475891601231011
    Left stick–
    Right stick–
    Left trigger
    0%
    Right trigger
    0%
    All buttons and axes · 0 buttons pressed

    Press every button once: each one gets a tick when it registers. Values show analog pressure from 0.00 to 1.00.

    Health tests

    1. Stick drift

    Measures where each stick settles when nobody touches it, and checks for buttons or triggers that read as pressed. Pass: under 5% of full travel. Warning: 5–10%. Fail: 10% or more.

    Not run yet.

    2. Circularity

    Rotate each stick slowly around its outer edge. Measures how far the edge strays from a perfect circle. Pass: up to 10% average error. Warning: up to 20%. Fail: above 20% or a direction that can't reach 75% of full travel.

    Left
    Right

    Not run yet.

    3. Vibration

    Plays a rumble. The strong motor is the heavy, low rumble in the left grip; the weak motor is the finer buzz on the right.

    Connect a controller to test vibration.

    4. Input update rate

    Estimates how often the browser receives new data from the controller while you move a stick.

    Not measured yet.

    More tests for PlayStation controllers

    Connect a DualSense, DualSense Edge or DualShock 4 directly for what the standard gamepad connection hides: motion sensors, touchpad, battery and the true report interval, plus adaptive triggers and lights on a DualSense. Your browser asks which device to allow, and the permission lasts until you close the tab. This page only reads the controller and sends effect commands (trigger effects, light bar, player lights), never calibration or firmware, and it resets them when you leave.

    Decoded from published formats (the Linux hid-playstation driver and SDL); not yet tested on a real controller. Over Bluetooth, deep mode switches the controller to its full report format until it reconnects, and asks first: if another app or game stops seeing it, turn the controller off and on.

    Not connected.

    Motion sensors

    Tilt and turn the controller: the model follows it, and the graphs show the gyroscope (turn rate, degrees per second) and the accelerometer (g) on each axis. Put it down flat and run the rest check to measure gyro drift.

    Gyro – · Accel –

    Touchpad

    Draw on the touchpad with one or two fingers. Each finger gets its own colour and the ID the controller gives it; a dead strip shows up as a gap in the lines. Press the pad to test its click.

    No touch yet.

    Adaptive triggers (DualSense only)

    Pick an effect, then press L2 or R2. Resistance pushes back from the start point; click is a section of resistance that gives way, like a trigger pull; vibration buzzes the trigger from the start point. The bars show where each trigger is.

    L2
    –
    R2
    –

    Light bar and player lights

    Battery

    The level the controller reports, in 10% steps, and whether it is charging. It updates live, so plug in a cable to check the charging port.

    –

    Report interval

    How often the controller sends a report, from the controller's own clock and from the time each report reached this page. This is the report interval, not end-to-end input lag: it leaves out the time a press takes inside the controller, in the game and on the screen.

    Controller health report

    Selling or buying a used controller? Run the four tests, press every button, then share the report link in your listing or message.

    Connect a controller to start the report.

    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.

    ButtonPositionXboxPlayStationNintendo
    0Bottom face buttonA✕B
    1Right face buttonB○A
    2Left face buttonX□Y
    3Top face buttonY△X
    4Left bumperLBL1L
    5Right bumperRBR1R
    6Left triggerLTL2ZL
    7Right triggerRTR2ZR
    8Back / selectViewCreate−
    9Start / menuMenuOptions+
    10Left stick pressLSL3LS
    11Right stick pressRSR3RS
    12D-pad up↑↑↑
    13D-pad down↓↓↓
    14D-pad left←←←
    15D-pad right→→→
    16Home / guideGuidePSHome
    17Touchpad / captureSharePadCapture
    AxisMeaning
    0Left stick, horizontal (−1 left, +1 right)
    1Left stick, vertical (−1 up, +1 down)
    2Right stick, horizontal
    3Right stick, vertical

    Controller TesterSomeone shared their result

    Suggested