What keyboard chattering is
Chattering is when one physical press registers as two or more presses — you type “hello” and get “helllo”. Inside every switch, metal contacts touch and separate; for a fraction of a millisecond they bounce. Keyboard firmware hides this with debouncing, but as switches wear, collect dust or corrode, the bounce lasts longer than the debounce window and leaks through as an extra key press.
It is easy to confuse with two other problems:
- Auto-repeat — holding a key makes the operating system repeat it after a short delay. Browsers flag those events as repeats, and this test ignores them.
- Ghosting — a different key appears when you press several keys together. That is a keyboard-matrix limit, measured by the rollover and ghosting test.
Reading the result
For every key the test measures the gap between letting go and the next press of the same key. A deliberate re-press takes noticeably longer than a contact bounce, so a very short gap is a strong sign of chattering.
- Green, “No chattering detected”: no key re-registered faster than the threshold. Test suspect keys at least 10–20 times before trusting a clean result.
- Amber, one event: could be a genuine bounce or an unusually fast tap. Press that key another 20 times.
- Red, repeated events: the key is chattering. The “shortest gap” column shows how fast the ghost press followed the release.
The default threshold of 30 ms suits most keyboards. Raise it if you see doubled letters while typing but the test stays clean; lower it if very fast typing triggers false alarms.
How to run the chattering test
- Choose your layout so every key has a place on the heatmap.
- Press the key you suspect 20 times at a normal, steady pace — fully releasing it each time.
- Repeat for other suspect keys, or type a few sentences to sample the whole keyboard.
- Check the heatmap and the per-key table. Amber and red keys are the ones to clean or replace.
Method and limits
The test records the high-resolution timestamp of every key-down and key-up event, keyed by the physical KeyboardEvent.code. Auto-repeat events are excluded, and if the window loses focus mid-press that gap is discarded so it can't produce a false result.
- Your keyboard's polling rate rounds the timings: at 125 Hz events arrive in roughly 8 ms steps, at 1000 Hz in 1 ms steps.
- Very fast bounces that the firmware filters correctly never reach the browser — which is exactly what you want.
- Wireless keyboards can batch events. If a wireless board looks borderline, retest it with a cable.
- OS accessibility settings such as Windows Filter Keys (bounce keys) or macOS Slow Keys can hide or delay presses. Turn them off while testing.
Browser support
| Browser | Works | Notes |
|---|---|---|
| Chrome, Edge, Opera | Yes | Sub-millisecond event timestamps. |
| Firefox | Yes | Timestamps may be rounded to 1 ms for privacy; still precise enough. |
| Safari (macOS) | Yes | Caps Lock reports on/off state, so skip it in this test. |
| Phones and tablets | With a hardware keyboard | On-screen keyboards cannot chatter and aren't measured. |
How to fix a chattering key
- Clean it. Remove the keycap and blow out dust with compressed air. For mechanical switches, pressing the key rapidly 50–100 times after cleaning can wipe the contacts.
- Raise the debounce time. Many gaming and QMK/VIA keyboards let you set debounce in their software; a few extra milliseconds usually cures mild chatter.
- Replace the switch. On hot-swap boards, pull the switch and fit a new one. On soldered boards, a repair shop can replace it.
- Use the warranty. Chattering is a common defect in newer keyboards. A screenshot of the red result supports the claim.
Frequently asked questions
What causes keyboard chattering?
Worn, dirty or oxidized switch contacts that bounce longer than the keyboard's debounce filter expects. Spilled drinks, dust and age are the usual triggers; some new switches also ship defective.
Is chattering the same as a key repeating when held?
No. Holding a key makes the operating system repeat it on purpose after a short delay. Chattering happens on a single, normal press. This test ignores auto-repeat events so only genuine double-registrations are counted.
What threshold should I use?
Start with the default 30 ms. If letters double while you type but the test stays clean, raise it to 50–60 ms. If fast deliberate taps show up as chatter, lower it.
Can software fix chattering?
Often, yes — temporarily. Increasing the debounce time in your keyboard's software or firmware hides mild chattering. A switch that keeps getting worse will eventually need cleaning or replacement.
Does this test work for laptop keyboards?
Yes. Laptop keyboards can chatter too, typically after a spill. The test measures them the same way; the fix is usually a keyboard replacement by a service center.
Last updated