How the measurement works
A USB keyboard doesn’t send a key the instant it goes down. The computer asks it for its state at a fixed interval, set by the keyboard’s USB descriptor or by its software: every 8 ms is 125 Hz, the usual rate for office keyboards, and every 1 ms is 1000 Hz, the usual gaming rate. 8000 Hz needs a USB high-speed connection, where the bus runs in 125 µs microframes.
So when several keys go down within a few milliseconds, they reach the browser in separate reports, and the gaps between their key events are whole multiples of the interval: 8, 16 or 24 ms at 125 Hz, 1, 2 or 3 ms at 1000 Hz. The tester keeps every gap under 20 ms, merges the key events that came in the same report, and picks the longest standard interval that at least 80% of the gaps fit, as long as that is clearly more than chance would give and hardly any gaps fall halfway between its steps, where a keyboard twice as fast would put them. The histogram shows the same data: sharp peaks one interval apart.
Running the test
Put a flat hand on the letters so four to eight keys go down together, lift it, and repeat about fifteen times. Drumming your fingers across the row works too. You need 24 gaps for a result; more makes it steadier. Keep the keyboard picture on screen while you press.
The limits, honestly
Browsers round event times to 0.1 ms (the W3C High Resolution Time spec asks for this coarsening on normal pages), and some round to whole milliseconds, which the tester detects and says so. That’s enough to tell 125, 250, 500 and 1000 Hz apart and to estimate 2000 Hz, but not to confirm 4000 or 8000 Hz. Many gaps under 0.6 ms hint at a faster keyboard, and the tester says so, but timing noise produces such gaps too, so it never reports them as a rate. The times also pass through the operating system and the browser, which add jitter; a busy computer can blur the peaks until no rate fits. Close heavy programs and try again, or compare with Chrome or Edge, which time keys to 0.1 ms on every platform.
Polling rates and what this test can see
Every key change waits for the next report, so on average a press arrives half an interval late. The last column is what the tester reports with Chrome’s 0.1 ms clock.
| Polling rate | Interval | Average wait | In a browser |
|---|---|---|---|
| 125 Hz | 8 ms | 4 ms | Measured: gaps step in whole intervals |
| 250 Hz | 4 ms | 2 ms | Measured: gaps step in whole intervals |
| 500 Hz | 2 ms | 1 ms | Measured: gaps step in whole intervals |
| 1000 Hz | 1 ms | 0.5 ms | Measured: gaps step in whole intervals |
| 2000 Hz | 0.5 ms | 0.25 ms | Estimated from 0.5 ms steps |
| 4000 Hz | 0.25 ms | 0.125 ms | Can’t be confirmed: at most a hint |
| 8000 Hz | 0.125 ms | 0.0625 ms | Can’t be confirmed: at most a hint |