Key chatter test
press any key repeatedly to measure the time in milliseconds between consecutive keydown events...
How the key chatter test works
Key chatter — also called switch bounce or double-typing — occurs when a single physical tap on a key produces two or more discrete key presses. Inside a mechanical switch, two springy metal leaves press together to complete an electrical circuit. When the leaves strike each other, or when finger pressure fluctuates slightly near the actuation point, the metal contacts can rebound open for a few milliseconds before settling closed again.
This tester uses the browser's high-resolution monotonic clock (performance.now()) to measure the exact elapsed time in milliseconds between consecutive physical keydown events on the same key code. Any event where event.repeat === true is discarded, and a key cannot trigger a second measurement until its intervening keyup event has fired. Whenever the interval between two taps on the same key is less than or equal to your selected threshold (default 40 ms), the press is flagged as a chatter bounce.
How to read millisecond intervals and pick a threshold
To test a suspect key reliably, tap it 40 to 60 times at a relaxed, natural rhythm — roughly three to four taps per second — and vary your finger strike slightly (center press, off-center press, light tap, and slow release). Compare the shortest recorded interval against these practical ranges:
| Interval between keydowns | Typical cause | Recommended action |
|---|---|---|
| 2 ms – 20 ms | Classic electrical contact bounce on closing or opening | Increase firmware debounce to 10–15 ms, clean switch contacts, or swap the switch. |
| 21 ms – 45 ms | Dirty/oxidized leaf, weak spring return, or loose hot-swap socket | Reseat the switch in its socket, inspect pins, clean with 99% isopropyl alcohol, or replace the switch. |
| 46 ms – 80 ms | Release-phase chatter when hovering near the actuation point | Raise threshold to 60–80 ms while testing slow key releases; check switch leaf tension or Hall-effect rapid-trigger deadzone. |
| 85 ms – 250+ ms | Normal human double-tap or fast trill speed | Switch is healthy; even rapid intentional double-taps rarely dip below 80 ms. |
Worked example: if you tap a key at 5 taps per second, the average cycle time is 1000 ms ÷ 5 = 200 ms between presses. If the table suddenly records a 14 ms shortest interval, your finger did not move fourteen times faster for one tap — the switch contacts reopened and reclosed inside a single keystroke.
How to fix a double-pressing key (step by step)
- Rule out wireless interference and USB hubs: Dropped
keyuppackets on a congested 2.4 GHz dongle or unpowered USB hub can make keys repeat or stutter. Plug the keyboard directly into a rear motherboard USB port with a known-good data cable and retest. - Clean the switch with compressed air and 99% IPA: Unplug the keyboard, pull the keycap, depress the switch stem, and blow out dust with short bursts of compressed air. For unsealed mechanical switches, a single drop of 99% isopropyl alcohol (never 70% rubbing alcohol or household lubricants) worked in by pressing the stem 30 times can flush thin oxidation off the contact leaves. Let the switch dry completely for 15 minutes before reconnecting power.
- Swap switches on a hot-swap PCB: If your board has hot-swap sockets, pull the chattering switch (for example on
KeyE) and trade it with a rarely used key such asScrollLockorPause. While the switch is out, check that both metal pins are straight and that the hot-swap socket leaves underneath are not splayed apart. If the chatter moves toScrollLock, the switch itself is worn; ifKeyEkeeps chattering with a fresh switch, inspect the PCB socket solder joints. - Increase firmware debounce time: Most keyboards set a hardware debounce window of
5 ms. Gaming software that lowers debounce to1 msor2 msfrequently exposes normal mechanical contact bounce. In QMK (#define DEBOUNCE 10), ZMK (debounce-press-msanddebounce-release-ms), or your manufacturer's utility, raise the debounce window to10 msor12 ms. On analog Hall-effect boards, widen the rapid-trigger release deadzone by0.15 mm – 0.25 mm.
More keyboard diagnostics and guides
Need to check whether a key registers at all or stays stuck down? Use the visual keyboard tester or the keyboard rollover test. To learn how switch internals affect contact bounce, read keyboard switch types explained and keyboard not working fixes. Once your switches are clean, measure your speed on the typing test or check your score math with the WPM calculator.
Frequently asked questions
What millisecond threshold should I use to detect key chatter?
Start with the default 40 ms threshold. Genuine switch contact bounce almost always fires a second keydown between 3 ms and 35 ms after the first press, whereas deliberate human double-tapping on a single key typically takes 85 ms to 140 ms.
How is key chatter different from OS key repeat?
OS key repeat happens when you hold a key down past the system repeat delay (usually 250-500 ms), and the browser marks those events with event.repeat = true. Key chatter is a physical switch fault where a single tap sends two separate keydown/keyup cycles with event.repeat = false.
Can raising firmware debounce fix a chattering switch?
Often yes, if the bounce window is short (under 15-20 ms). In QMK, VIA, ZMK, or vendor software, increasing the debounce window from 5 ms to 10 or 15 ms tells the controller to ignore rapid contact reopenings before sending a second USB report.
Why does a switch start chattering after a few months of use?
Thin oxide films, microscopic dust, flux residue, or weakened tension on the copper-alloy contact leaves inside a mechanical switch can make the contact momentarily lose connection while your finger is still pressing or releasing the stem.
Does changing the threshold slider erase my current test log?
No. The tester stores every inter-press interval recorded during your session and re-evaluates all logged presses against the new millisecond threshold immediately.