The guide
Your controller is lying a little, and every game has quietly agreed to ignore it
A thumbstick never rests at exactly zero, so firmware, drivers and games each throw away the smallest movements. A browser can show the raw report before anyone has tidied it.
- 17 buttons and four axes in the W3C Standard Gamepad layout
- 2,000,000 cycles rated directional life of one common thumbstick module
- 24 percent of stick travel inside XInput's suggested left dead zone
- 125 Hz usual polling rate for a USB pad that asks for 10 ms
- 1879 year the Hall effect was discovered
Read the full guide Fold the guide
A character edges left with no thumb on the stick. A camera tilts toward the ceiling, slowly, for no reason. Players call it drift, and most blame the game first.
The fault is older and smaller than that. A thumbstick is a measuring instrument, and no instrument rests at exactly zero. What changes over the life of a controller is how far from zero it rests, and how much of that error the software between your thumb and the screen has agreed to ignore.
A web browser gives an unusually plain view of that bargain. Its Gamepad API hands a page the numbers much as the driver reports them, before any game has rounded them off. Reading them takes some care.
What a browser is allowed to see
The specification behind the API, a W3C working draft, is deliberately narrow. Its scope section builds everything on two kinds of input: buttons, reported as values from 0 to 1, and axes, reported from -1 to 1. Its authors point out that the same two types also describe joysticks, driving wheels and pedals, so the word gamepad is used loosely.
A page cannot simply list what is plugged in. The specification has the browser return an empty list until the visitor has pressed a button or moved an axis, a measure against fingerprinting, and it forbids serial numbers and Bluetooth addresses in the name a pad reports. Mozilla’s documentation describes the same behavior in Firefox, where a pad is exposed only once someone uses it while the page is visible. That is why every tester opens by asking you to press something.
After that the page has to keep asking. The specification defines events for a pad connecting and disconnecting and none for a stick that moved; its own advice is to read the pad once per animation frame. Google’s guide for developers adds that each read returns a static snapshot, not a live object, and that a frame typically comes 60 times a second. A page therefore sees the controller about 60 times a second, whatever the controller itself is doing.
Then there is the matter of which number means which button. Makers print different letters in different places, so the specification describes one canonical layout, the Standard Gamepad, by position alone: 17 buttons and four axes. Index 0 is the bottom button of the right cluster. Indices 6 and 7 are the bottom front buttons, which, the text notes, most commonly take the form of spring-loaded triggers. The Linux kernel settles the same question the same way. It names the four face buttons south, east, north and west, and states that codes follow the physical position of a button regardless of the label on it.
A pad the browser recognizes is rearranged into that order and marked with the mapping standard. Any other arrives in its raw form: numbered buttons, numbered axes, and no promise about which is which.
A stick is two sliding contacts
Inside most thumbsticks are two potentiometers, one for each axis. Moving the stick turns two small shafts, each carrying a wiper across a resistive pad, and the position of each wiper becomes a voltage. Alps Alpine sells modules of this kind as stick controllers, and its RKJXV series is one. The principle is far older than the part: the first console with analog sticks, launched in 1978, used a pair of potentiometers in each.
Sliding contacts wear. Alps Alpine’s own page for one RKJXV part rates its directional operation at 2,000,000 cycles and its center push at 500,000. Suppose one full movement of the stick every second, which is an assumption made here and nothing more. The first figure is then used up in about 556 hours of play, or 278 days at two hours a day. Treat that as an order of magnitude. The direction is not in doubt. The wiper scrubs the pad, the pad’s resistance changes, and the voltage that used to mean center now means slightly left.
Wear is not the only route. Dust and other small particles reaching the sensor inside the stick are the cause most often named for one handheld console’s controllers. Another cause involves no damage at all. A stick’s neutral point is set when the controller wakes, so a thumb resting on it at that moment teaches the pad the wrong center. None of this is rare. In January 2021 the European consumer organisation BEUC complained to the European Commission about one console’s controllers after nearly 25,000 complaints from consumers. By the testimonies it collected, 88 percent of the failures came within the first two years of use.
The alternative replaces the contact with a magnet. The Hall effect, discovered in 1879, is the sideways voltage that appears across a conductor carrying current through a magnetic field. NIST traces it to the Lorentz force on the moving charges and gives a voltage proportional to the field. Chip makers package the effect with an amplifier so that, in the words of Allegro MicroSystems, the output is linear and proportional to the applied magnetic flux density. Put a magnet under the stick and such a sensor on the board, and position is read with nothing touching.
What that buys is simple to state. A Hall sensor is a solid-state part with nothing rubbing, so it is not prone to mechanical wear, and its life is not limited the way a potentiometer’s is. Nor is the idea new to games: an analog pad sold for one console in 1996 already used Hall sensors, and the design was carried into the controller of that console’s successor. The claim deserves one careful reading, though. A magnet removes the worn track. It does nothing for dust that jams the mechanism, or for a center learned while a thumb was on the stick.
The dead zone is an agreed lie
Software’s answer to all of this is to stop listening near the center. Microsoft’s guide to its XInput interface defines the dead zone as the movement values a controller reports even when the thumbsticks are untouched and centered, and warns that games which do not filter it will play poorly.
The numbers are larger than most players would guess. XInput reports each stick axis as a signed value from -32768 to 32767, and its header file suggests ignoring anything inside 7849 for the left stick and 8689 for the right. That is about 24 percent and 27 percent of full travel. Godot’s documentation explains why some margin is unavoidable, since an axis at rest lingers at a small value such as 0.062 instead of zero. It also states the design problem in a line: high enough to ignore the drift, low enough not to ignore the player.
A dead zone that only zeroed small values would leave a cliff at its edge, so the usual form rescales what remains. Microsoft’s sample code subtracts the dead zone from the stick’s distance from center and divides by the travel that is left. Take a stick held halfway, at 50 percent offset, behind a 24 percent dead zone. The output is 0.50 minus 0.24, divided by 0.76, which is 34.2 percent. Set the dead zone slider in the tool on this page to 24, hold a stick where the offset reads 50.0 percent, and the output line shows the same figure.
The price of the lie is paid in fine control. Everything inside the ring is gone, and under XInput’s suggested values that is the first quarter of the stick’s travel. A stick resting 8 percent off center disappears completely behind such a setting. It would disappear behind a 10 percent one too. Drift becomes visible in a game only when it outgrows the dead zone the developer chose, which is long after it began.
Triggers, motors and the clock
Buttons can be analog as well. The specification gives every button a value from 0 to 1 beside its pressed flag, and leaves the browser to choose the threshold at which an analog button counts as pressed. XInput reports each trigger as a number from 0 to 255 and offers 30, about 12 percent, as that threshold. Triggers get dead zones for the same reason sticks do.
Output is cruder. The effect the specification calls dual-rumble assumes an eccentric rotating mass motor in each handle, one for low-frequency vibration and one for high, each driven at a magnitude from 0 to 1 for a set number of milliseconds. Browsers are advised to cap an effect at 5 seconds. Mozilla’s reference marks the feature as limited in availability, so a rumble button belongs on screen only when the pad in hand reports that it can play one.
Time is the last thing a page sees poorly. USB controllers are polled: the host asks for new data at an interval the device requests in a field called bInterval. For a full-speed device the shortest interval is one millisecond, a ceiling of 1,000 reports a second. Microsoft’s table of polling periods turns any request from 8 to 15 into a period of 8 milliseconds, so a pad asking for 10 is polled every 8, a rate of 125 Hz. A study presented at the CHI conference in 2019 measured 36 keyboards, mice and gamepads and found that forcing 1,000 Hz cut latency for some devices but not all.
A browser cannot check any of that directly. Each pad carries a timestamp of its last new data, and a page can count how often the timestamp changes, but it looks only once per frame. A count of 60 on a 60 frame display means at least 60. A count near zero on an untouched pad may only mean that nothing changed: XInput, for one, numbers a new packet only when the controller’s state differs from the last.
What the numbers cannot tell you
A tester is a mirror. It shows what the driver reports after the pad’s own firmware, the operating system and the browser’s remapping have each had a turn. The specification even lets a browser alter what it exposes to make visitors harder to fingerprint, for example by presenting exactly the standard set of buttons and axes when the device has more or fewer. A missing paddle may be privacy, not a fault.
Nor can the numbers name a cause. A worn track, dust and a bad center at start-up all look the same on screen: an offset. A hands-off reading of a few seconds cannot rule out drift that comes and goes. A circle test measures the shape of the range a pad reports, not its precision near the middle. A range in which both axes reach 1 at once is a square whose corners sit 1.41 units out, and its outline averages about 12.2 percent beyond the unit circle. That is a design choice, not damage.
And nothing here repairs anything. A wider dead zone hides drift at the cost of small movements; it does not move the wiper back. What a measurement gives you is the honest size of the error, in percent of travel, before any game has decided how much of it you will be allowed to feel.
Sources
Every source consulted for this guide. Links checked October 3, 2026.
- Gamepad (W3C Working Draft, 10 July 2025) World Wide Web Consortium (W3C)
- Using the Gamepad API MDN Web Docs (Mozilla)
- GamepadHapticActuator: playEffect() method MDN Web Docs (Mozilla)
- Play the Chrome dino game with your gamepad web.dev (Google)
- Linux Gamepad Specification The Linux Kernel documentation
- Getting Started With XInput in Windows applications Microsoft, Win32 documentation source on GitHub (MicrosoftDocs/win32, CC BY 4.0)
- XINPUT_GAMEPAD (xinput.h) Microsoft, Windows SDK API documentation source on GitHub (MicrosoftDocs/sdk-api, CC BY 4.0)
- _USB_ENDPOINT_DESCRIPTOR (usbspec.h) Microsoft, Windows driver documentation source on GitHub (MicrosoftDocs/windows-driver-docs-ddi, CC BY 4.0)
- On the Latency of USB-Connected Input Devices OpenAlex catalogue record W2942280647 (Raphael Wimmer, Andreas Schmid and Florian Bockes, CHI Conference on Human Factors in Computing Systems, 2019)
- RKJXV1224005 Product information | RKJXV Series | Potentiometer Type Alps Alpine
- The Hall Effect National Institute of Standards and Technology (NIST)
- Hall-Effect Sensors Applications Guide Allegro MicroSystems
- Controllers, gamepads, and joysticks Godot Engine documentation
- BEUC launches Europe-wide complaint against Nintendo for premature obsolescence BEUC, The European Consumer Organisation
- Analog stick Wikipedia
- Joy-Con Wikipedia
- Hall effect sensor Wikipedia