See how a spacebar counter detects a press, ignores key repeat, measures time and calculates presses per second.
How does a spacebar counter detect a press?
When you press a key, the browser sends a keydown event, and when you release it, a keyup event. The counter listens for keydown events whose key code is Space. Each one that is not marked as a repeat adds one to your total. The same counter also listens for touches on the on-screen pad, so phones and tablets work without a keyboard.
What is key repeat and why is it ignored?
If you hold a key down, your operating system starts sending repeated keydown events after a short delay, the way a held letter fills a line of text. Browsers mark those events as repeats. A fair counter must ignore them, because a held key is not a series of separate presses. This counter drops every repeat event, so holding Space adds nothing after the first press.
How does the timer measure time?
The first press starts a high-resolution clock that measures milliseconds with far better precision than the system date. Each press carries its own timestamp from the browser, and only presses stamped before the end time are counted. A second, independent timer finishes the test even if the screen stops updating for a moment, for example when the tab is in the background.
How is presses per second calculated?
Average presses per second (PPS) is the number of valid presses divided by the test time in seconds. For example, 72 presses in 10 seconds is 72 ÷ 10 = 7.2 PPS. The chart groups your presses into one-second buckets, and the maximum and minimum PPS are the highest and lowest bucket.
What is the consistency score?
Consistency compares how much your per-second counts vary with their average. It is 100 minus the coefficient of variation, as a percentage, limited to the range 0 to 100. A perfectly even run scores 100%; an uneven run scores lower. It needs at least three seconds of data.
What happens after the test ends?
The pad locks so extra presses cannot change the result, the result window opens, and your best score for that test time is saved in your browser. Nothing leaves your device unless you choose to add your score to the Top 500 leaderboard.
How the Top 500 check works
When you submit, the server checks that the score is physically possible for the test time, that the name is allowed and that you are not sending too many scores. Unusually fast scores are held for a human check. See the leaderboard page for details.
Keep exploring
Key events, timestamps and the browser clock
A web page learns about your keyboard through events: keydown when a key goes down and keyup when it comes back up. A counter reads those events, ignores the extra keydown events the operating system sends while a key is held (key repeat), and stamps each real press with the browser’s high-resolution clock. Because the clock keeps running even if the page is busy, presses are placed in the right second even when the screen is a few milliseconds late.
The tool in this site also stops counting the instant the timer ends and stays locked until you restart, so the count you see is the count that is scored.
How it works FAQ
Does the counter use keydown or keyup?
It counts keydown events, so a press registers the moment the key goes down, not when you release it.
Why does holding the spacebar not count?
Holding sends repeat events, which are ignored so only separate presses count.
Is my data sent to a server?
No. Your counts and history stay in your browser. Only a score you choose to submit is sent.
Does a spacebar counter measure input lag?
No. It measures the presses your browser receives. Delay inside your keyboard, operating system and browser is present in every counter and affects all of them in the same way.