Blog

Keys typing twice or a single click becoming a double-click: is it chattering? Measure the time from release to the next press in your browser

One keypress types two characters, or one click acts as a double-click. This guide shows how to check in your browser whether switch chattering in the keyboard or mouse is the cause. It measures the time from release to the next press, treating under 50 ms for keys and under 80 ms for mouse buttons as abnormal, and explains when to clean, claim a warranty, or use Filter Keys as a stopgap.

The English version of the keyboard and mouse chattering test. In a layout map where pressed keys are painted green, only the K key is red, with the count "3" in its corner.
The chattering test (English version) after pressing the K key three times in the order press, release, press again 17 ms later. The K key turned red.
Contents

While typing, “thank you” turns into “tthank you”. A single click on a file opens the folder. A file you are dragging drops halfway. These symptoms are often caused not by PC settings or an app bug but by chattering, which happens when the switch inside a key or mouse button wears out. From the symptom alone, though, it is hard to tell whether you are imagining it or the switch really is at fault.

This article explains how to use the browser-based keyboard and mouse chattering test to measure the time from release to the next press for the key or button that misbehaves, and so find out whether it is chattering. The same screen also shows whether every key on the keyboard responds and whether the mouse wheel is turning the wrong way.

Chattering looks like an input pressed again too soon after release

Inside a key or mouse button there is a metal contact that closes when you press, producing an input. When the contact wears or gets dirty, it can separate and reconnect repeatedly while you are pressing or at the moment you release. As a result, a single action reaches the PC as two inputs: press, release, press, release. This is chattering.

The second input arrives in a very short time right after the release. A person, on the other hand, needs time to lift a finger and press the same key again. So the tool measures the time from releasing a key or button to the next press of the same one, and records any that are too short as chattering. The default thresholds are as follows (you can change them under “Change the detection thresholds” on the screen).

Target Interval treated as abnormal
Keyboard keys Under 50 ms
Mouse buttons Under 80 ms
Wheel reversal Reverse direction within 80 ms of the previous turn

Key repeat from the OS while a key is held is flagged by the browser as a “repeat”, so it is counted separately from chattering. Holding a key never increases the chattering count.

Getting ready: press the problem key about 20 times

After opening the tool, first click the “Test the keyboard” box. When the box changes to “Recording key input”, recording has started. Inside this box, operations such as F5 (reload) and Tab do not work. To leave it, click outside or hold Esc for at least one second.

Chattering does not happen every time. Press the key that types twice 20 to 30 times, one press at a time, with the same force you use when typing normally. Do not mash it; press about once per second. To check that every key responds, press them one after another until the whole layout map turns green.

The layout map shows which key chattered

The next screen was captured to verify the behavior by sending key input into a real browser. The ten keys H, E, L, O, W, R, D, Space, A and S were each pressed for 60 ms and released, with about 180 ms before the next press. For the K key alone, the sequence of pressing, releasing and pressing again 15 ms later was repeated three times to reproduce a key that chatters. The J key was pressed five times at normal intervals.

The keyboard section of the English chattering test. In the layout map where pressed keys are painted green, only the K key is red, with a "3" mark at its upper right. The summary below shows Different keys pressed 12, Key presses 21, Chatter 3, and Key repeat 0.
The K key is painted red, and the number of chattering events (3) appears in its corner. Pressed keys turn green, so you can also see which keys have not been pressed yet.

Pressed keys turn green in the layout map, and a key that chattered turns red with its count in the corner. In this example the totals are 12 different keys, 21 presses and 3 chatter events. The K key turned red because the gap in “press, release, press” was only about 17 ms. A human finger cannot press again in that time, so the tool treats it the same as contact bounce.

The numbers on this screen are an example of the judgment applied to injected input, not measurements from a genuinely worn keyboard. When you measure your own keyboard, the chattering interval and how often it occurs differ from key to key.

Keys that do not respond stay uncolored

A key whose color does not change in the layout map is not delivering input to the browser. A broken switch, a broken wire inside the keyboard or a liquid spill are possible causes. However, combinations with the Windows key, PrintScreen, and the Fn key on laptops can be handled by the OS or the keyboard itself and never reach the browser, so an unchanged color does not always mean a fault. Japanese-input keys such as Hankaku/Zenkaku and Kana are also processed first by the OS, so a “release” notification may not arrive. In that case the tool records it separately as “no release recorded” and does not judge it as chattering.

For the mouse, check the count per button and the shortest interval

Next, inside the “Test the mouse” box, click the left button slowly, one click at a time. To avoid double-clicks, press it at least 20 times at about one-second intervals. Try the right button, the wheel button (pressing the wheel in) and the side back and forward buttons the same way. Turn the wheel in one direction only. For a symptom where dragging breaks off, hold a button down for a few seconds and check.

The screen below shows 22 normal clicks, each pressing the left button for 50 ms and releasing it, with 300 ms before the next press, followed by one extra action of pressing, releasing and pressing again 20 ms later. That 20 ms action is counted as two clicks, so the total number of presses is 24. The wheel was turned down twice and then up once.

The mouse section of the English chattering test. The Left button row of the table is red, with Presses 24 times, Chatter 1 times and a shortest interval of 22.4. Below it, the wheel shows up 1 and down 2, with Wheel reversals 1.
The left button was pressed 24 times, and one of them was pressed again 22.4 ms after release, so it counts as chattering. For the wheel, the single turn in the opposite direction was counted as a reversal.

“Shortest time from release to next press (ms)” in the table is the shortest time between a release and the next press for that button. With ordinary repeated clicking, this shows the time a person takes to lift a finger and press again (the normal clicks in this example were spaced 300 ms apart). The left button’s 22.4 ms is far below the 80 ms threshold. If one click arrives as two, you get an unintended double-click. During a drag, the button is treated as released partway even though you meant to hold it, and the file or window is dropped.

When the wheel is turned in one direction but reverse rotations are mixed in, they are counted under “Wheel reversals”. This symptom comes from wear or dust in the part that detects wheel rotation (the encoder).

Use the verdict and log to explain the symptom

When you finish measuring, “Results and log” shows a verdict for the keyboard, mouse and wheel.

The verdict and log of the English chattering test. Keyboard shows "chatter occurred 3 times (K (KeyK))", Mouse shows "chatter occurred on Left button", and Wheel shows one reversal. The log table below lists Wheel reversal, and Chatter for Left button and KeyK, with their interval values.
Verdicts appear in red (chattering found) and yellow (caution). The log table keeps the elapsed time, input, details and interval (ms).

The table under the verdict keeps the time each chattering event occurred, which key or button it was, and how many milliseconds after release it was pressed again. Pressing “Copy log” copies this log, the judgment thresholds and the browser information as text. When you contact a manufacturer or retailer, pasting “the K key was pressed again 17 ms after being released” conveys the symptom better than saying “it sometimes types twice”, and makes it easier for them to decide on a replacement.

To change the thresholds, open “Change the detection thresholds” and enter milliseconds for keys, mouse and wheel in the range 5 to 500. New thresholds apply to input made after the change, so to re-evaluate earlier records, clear them with “Clear log” and test again.

If chattering is found, rule out the PC first, then clean, claim the warranty or use a stopgap

Because chattering comes from the condition of the part, PC or app settings cannot fix it at the root. First confirm that the PC is not the problem, then consider cleaning, the warranty and a stopgap, in that order.

If the same keyboard or mouse gives the same result on another PC or another USB port, the device is faulty. For wireless devices, replug the receiver into a USB port close to the PC and fit fresh batteries before testing.

On a keyboard, dust and crumbs between the keys can make the contacts unstable. Turn the power off (shut down a laptop) and blow around the keys with compressed air. If the keycaps can be removed, remove them and clean underneath. If the purchase is recent, the manufacturer’s warranty may cover a replacement, so contact them and attach the log copied above.

As a stopgap while a replacement is not available, “Filter Keys” in Windows, under Settings, Accessibility, Keyboard, can ignore key input repeated within a short time. It suppresses the second input caused by chattering, but also slows down typing the same character in quick succession. Treat it only as a bridge until replacement.

What this test cannot tell you

If the browser is set to reduce timer precision (for example Firefox’s fingerprinting protection), intervals become coarse and short chattering may not be detected. The maximum number of simultaneous keys is limited by the OS and browser as well as by the keyboard’s own capability (rollover), so a keyboard that supports more may show fewer.

If the result is “no chattering found” but the symptom continues, the input may have another cause, such as IME conversion settings, auto-typing software or remote-control software. The tool does not send input data to a server and processes everything in the browser. Try the key or button that misbehaves several times, and if nothing appears after 20 or more presses, it is reasonable to suspect another cause.

If a microphone or camera does not work in a web meeting, you can check it with the microphone and camera test, and the invisible character checker shows whether text on screen contains invisible characters.

Frequently asked questions

Is it a fault if one keypress types two characters?

It may be chattering, where the contacts inside the key switch repeatedly separate and reconnect because of wear or dirt. If the time from releasing a key to the same key being pressed again is under 50 ms on a keyboard, the cause is more likely contact bounce than a finger pressing again. You can tell by measuring the interval with the browser-based chattering test.

Can chattering be fixed with software or settings?

Not at the root, because the cause is the condition of the part. As a stopgap, Windows Filter Keys can ignore repeated input within a short time, but it also slows down quickly typing the same character twice. If cleaning does not help, consider a warranty replacement or buying a new one.

Is it also chattering when holding a key types characters continuously?

No. Characters repeating while a key is held is the OS key repeat, which is normal behavior. The browser flags key-repeat input with a “repeat” marker, so it is counted separately from chattering.