Open dataset

Standard Gamepad API mapping reference

Which button index is which physical button, and what that means on the three controllers most people actually own.

The W3C Gamepad specification defines one canonical layout, called the standard mapping, and describes each button by where it sits rather than by a brand name. It gives seventeen button indexes and four axis indexes. The table below pairs each of those positions with the label printed on an Xbox controller, a DualSense and a Switch Pro controller. It only applies when your browser reports mapping: "standard"; when it reports an empty string, the indexes carry no reliable meaning at all.

Button mapping

Standard Gamepad API button mapping, with the printed label on three common controllers
IndexPosition in the specificationXboxDualSenseSwitch Pro
buttons[0]Bottom button in right clusterACrossB
buttons[1]Right button in right clusterBCircleA
buttons[2]Left button in right clusterXSquareY
buttons[3]Top button in right clusterYTriangleX
buttons[4]Top left front buttonLBL1L
buttons[5]Top right front buttonRBR1R
buttons[6]Bottom left front buttonLTL2ZL
buttons[7]Bottom right front buttonRTR2ZR
buttons[8]Left button in center clusterViewCreateMinus
buttons[9]Right button in center clusterMenuOptionsPlus
buttons[10]Left stick pressed buttonLS clickL3Left stick click
buttons[11]Right stick pressed buttonRS clickR3Right stick click
buttons[12]Top button in left clusterD-pad upD-pad upD-pad up
buttons[13]Bottom button in left clusterD-pad downD-pad downD-pad down
buttons[14]Left button in left clusterD-pad leftD-pad leftD-pad left
buttons[15]Right button in left clusterD-pad rightD-pad rightD-pad right
buttons[16]Center button in center clusterXbox buttonPS buttonHome

Index and position column: W3C Gamepad specification, w3c.github.io/gamepad, read 2026-08-05. The three controller columns are a positional translation, not a firmware claim: the button physically sitting at the bottom of the right cluster is A on an Xbox pad, Cross on a DualSense and B on a Switch Pro, because Nintendo mirrors its face buttons.

Axis mapping

Standard Gamepad API axis mapping
IndexWhat it reportsRange
axes[0]Horizontal axis for left stick (negative left, positive right)-1 to 1
axes[1]Vertical axis for left stick (negative up, positive down)-1 to 1
axes[2]Horizontal axis for right stick (negative left, positive right)-1 to 1
axes[3]Vertical axis for right stick (negative up, positive down)-1 to 1

W3C Gamepad specification, read 2026-08-05. Every axis is normalised to the range -1 to 1, with 0 as centre.

What counts as drift

The specification defines the range and says nothing about what a stick should read at rest. The MyGearCheck gamepad test treats a consistent resting value above 0.10 on either axis as drift. That number is our own judgement, chosen because one tenth of full deflection sits far above the jitter a healthy stick shows and far below a deliberate nudge. It is a line for triage, not a standard, and we would rather say so than let it be quoted as one. The reasoning is set out in the stick drift guide.

Reuse

Published under CC BY 4.0. Machine-readable at /api/v1/gamepad-mappings, CORS open, no key required. Attribution with a link back to this page is all that is asked.

To see what your own controller reports right now, including whether your browser applied the standard mapping at all, run the gamepad test.

What this reference does not cover

The standard mapping carries buttons and axes and nothing else. It has no field for battery level, rumble intensity, gyroscope, touchpad input or adaptive trigger state, so a browser cannot report any of those however capable the controller is. Anything beyond the table above would be a claim we cannot back, and it is not here.