Keyboard latency test
Tap any key, one at a time. Each press is timed to the screen.
Connect a keyboard
This test times a physical keyboard. Pair a Bluetooth keyboard or plug in a USB one, then tap any key.
Distribution (2 ms bins)
Tap single keys one at a time, at a steady pace, about twice a second. Holding a key or auto-repeat isn't counted.
- Median
- –
- 95th percentile
- –
- Fastest–slowest
- –
- Spread (IQR)
- –
- Waiting for the page
- –
- Display
- –
- In frames
- –
Runs on this device. Nothing is uploaded or stored. No sign-up. How it works
Works in Chrome, Edge, Firefox and Safari on desktop. Close other heavy tabs for a clean number.
What this latency test measures
Every key event carries a timestamp: the moment the browser received the press from the operating system. When you press a key, this page writes the key's name into the readout, then waits for the next frame the browser sends to the screen. The gap between those two moments is the keydown-to-paint time: the part of input lag that happens inside your computer.
- Median is the typical press. 95th percentile is how bad the slowest 1 in 20 presses gets: stutters show up here first.
- Spread (IQR) is how much presses vary. A big spread with a low median means occasional hiccups.
- Waiting for the page is how long each press sat before the page could react. Near zero is normal; several milliseconds means the browser was busy.
- In frames relates the result to your screen. At 60 Hz a frame lasts 16.7 ms, so even a perfect system can take up to one frame to show a press; at 144 Hz a frame is 6.9 ms.
| Result | Verdict |
|---|---|
| Up to about 1.5 frames + 4 ms (≈ 29 ms at 60 Hz, 14 ms at 144 Hz) | Fast: as quick as the screen allows |
| Up to about 3 frames + 8 ms (≈ 58 ms at 60 Hz) | Normal: some browser or system overhead |
| More than that | Slow: something on the computer is delaying input |
Lowering keyboard input lag
If the result is slow
- Close other tabs and apps that use the CPU (video calls, games, builds). Heavy pages in the same browser delay this one.
- Plug in a laptop and leave battery saver off: power-saving modes slow the CPU and can halve the frame rate.
- Turn off browser extensions for a moment and test again; some inspect every key press.
- On Windows, a 60 Hz setting on a high-refresh monitor doubles frame time: check Settings → Display → Advanced display.
What this test can't see
The keyboard's own delay happens before the browser gets the event, so no web page can measure it:
- Scan and debounce: the keyboard's controller checks its switches and waits for them to settle, typically 1–10 ms; "rapid trigger" and optical boards cut this.
- USB polling: at 125 Hz the computer asks the keyboard for news every 8 ms; at 1000 Hz every 1 ms.
- Wireless: 2.4 GHz dongles add about 1–2 ms; Bluetooth often 5–20 ms or more.
- Display: the monitor's processing and pixel response add a few milliseconds after the frame is sent.
So a fast result here means your computer and browser are quick; it says nothing about whether one keyboard is faster than another. Comparing keyboards needs external hardware (a high-speed camera or a switch-actuating rig).
How each press is timed
- The key event arrives with
event.timeStamp, the time the browser received it. - The page changes the readout (the visible effect of your press) and asks for the next animation frame.
- Inside that frame callback it posts a message to itself; the message runs just after the browser has handed the frame over for display. That moment is the "paint" time.
- Paint time minus the event timestamp is one sample. Held keys and auto-repeat are ignored.
The frame rate is measured once, invisibly, after your first press, from the spacing of 90 animation frames. Nothing on the page moves or flashes. Full details are on the methodology page.
Keyboard latency FAQ
What is a good keyboard latency?
Measured from key event to screen, about one frame or a little more is as good as it gets: roughly 17–29 ms at 60 Hz and 7–14 ms at 144 Hz. The keyboard adds its own 1–10 ms before that, which a browser can't see.
Can a website measure my keyboard's real latency?
Only the part after the computer receives the key press. A keyboard's scan, debounce and USB polling happen before the browser gets the event. This test measures the rest: your operating system, browser and display pipeline.
Does polling rate affect keyboard latency?
Yes, before the press reaches the computer. A 125 Hz keyboard adds up to 8 ms of waiting; 1000 Hz cuts that to 1 ms, and 8000 Hz boards to 0.125 ms. This test can't see that part, but it can show whether your computer then adds more delay.
Why is my keyboard latency higher on battery?
Power-saving modes slow the CPU and sometimes the display. Plug in, switch off battery saver and test again; the median usually drops by several milliseconds.
Why do I need 30 presses?
Each press lands at a random point in the frame, so single presses vary by up to a frame. The median of 30 presses is stable to within about a millisecond; the first result appears after 10.