How this test works
The counter listens for keydown events whose code is Space, which is the physical space bar on any keyboard layout. Each press adds one to the total. Holding a key makes the operating system send auto-repeat events, which carry the repeat flag and are skipped. The readout shows elapsed or remaining time, presses per second and the chatter count.
Timing uses the browser's monotonic clock (performance.now), which counts milliseconds independently of the wall clock. A timed run starts on your first press, so your reaction time never eats into it. Presses after the window closes are ignored until you choose Reset or another mode. Each press is compared with the one before it, and a gap under 30 milliseconds adds one to Chatter: two separate presses that close together are implausible, so the second one most likely came from the switch registering twice.
Browsers deliver key events with some timing jitter, so one chatter flag in a frantic run means little; repeated flags on single, deliberate presses are the signal to act on. The page sees key events only, so it cannot measure the switch's electrical behavior, actuation force or feel. If the chatter count keeps climbing, the keyboard chatter guide covers cleaning, debounce settings and replacing a switch.
Frequently asked questions
Why did the chatter counter go up when I only pressed once?
The page received two presses less than 30 milliseconds apart, and one press registering twice is what switch chatter looks like. A single flag can also be timing noise from a busy system. If the count keeps climbing on slow presses with a full release between them, the keyboard is likely double-registering the spacebar: clean the switch, or replace it if cleaning does not help.
Does holding the spacebar down add to the count?
No. While you hold a key, the operating system sends auto-repeat events marked as repeats, and the counter drops every one of them, so holding the bar for ten seconds still counts as one press. Only a keydown that arrives without the repeat mark adds to the total.
What is a good presses-per-second score?
There is no official benchmark, so use the rate to compare your own runs. Keep the run length and technique the same each time: rates drop as a run gets longer, and alternating fingers changes what you are measuring. Take a break if rapid tapping becomes uncomfortable.
Why doesn't the page scroll when I press the spacebar?
Browsers normally scroll down the page on Space, and the counter cancels that for every Space press it handles, so a fast run stays in place. A button, link or FAQ question with keyboard focus still gets Space as usual, and that press is not counted. Click anywhere outside the controls and the next press counts.
Can this tool prove my spacebar is faulty?
No, but it can give you strong evidence. The page sees each key event after the keyboard, the operating system and the browser have handled it, and never sees the switch contacts. Repeated chatter flags on slow, deliberate presses point to the keyboard. To confirm, test the same keyboard on a second computer: if the flags follow it, the problem is in the keyboard.