How does this mouse double-click test isolate microswitch bounce?
Every click inside the target pad records a high-resolution mousedown timestamp per physical switch and compares consecutive intervals against your millisecond threshold. Intervals at or below 80 ms mark the event red as Bounce, letting this double-click checker confirm switch chatter without installing drivers.
Per-button timestamps using W3C High Resolution Time
When you press a button on the dashed pad, the event handler reads monotonic timing values defined under the W3C High Resolution Time Level 3 specification. Each measurement subtracts the prior timestamp recorded for that exact button index and rounds the result to 0.1 ms.
Independent per-button timers prevent cross-button errors during fast checks. Clicking Left and immediately tapping Right 25 ms later never triggers a false fault because each button stores its own lastTimestampMs slot. Keyboard users who focus the pad and press Enter or Space log a primary index 0 event via performance.now().
Why mechanical microswitch chatter drops below 80 ms
Traditional mechanical switches rely on a thin copper-alloy leaf spring snapping against a stationary metal contact. As plating oxidizes or tension weakens after millions of clicks, a single press or release causes the spring to rebound several times across 2 ms to 50 ms.
Because deliberate double-clicks by human fingers typically space out beyond 110 ms, a sub-80 ms delta exposes microswitch wear immediately. Pair a switch check with the Mouse polling rate (Hz) test when troubleshooting missed clicks, because wireless packet drops can also distort apparent timing gaps.
Testing left, right, middle, and side mouse buttons
Browsers distinguish mouse hardware switches by numeric index inside the MDN MouseEvent button Reference. Five dedicated cards below the pad summarize Clicks, Faults, and shortest Min millisecond intervals across indices 0 through 4.
Suppressing the context menu inside the test pad
Right-clicking a normal web page pops open the browser menu and disrupts consecutive switch checks. This island attaches an oncontextmenu handler that cancels default menus strictly within the target pad boundaries while leaving the rest of the page responsive.
Middle wheel presses and side Back or Forward thumb buttons also receive e.preventDefault() on mousedown. That stops accidental browser history navigation or autoscroll rings while you test secondary switches, and helps isolate button clicks when you want to log vertical mouse wheel notches and encoder jumps separately.
Mapping MouseEvent button codes and click behavior
Standard five-button desktop mice map directly onto the five summary cards rendered beneath the pad. Mice with extra macro buttons above index 4 still appear inside Recent intervals labeled as Button 5 or higher, using the same independent per-button fault math.
MouseEvent.button |
Summary card | Physical switch role | Pad capture behavior |
|---|---|---|---|
0 |
Left | Primary click switch | Tracks intervals independently; supports Enter / Space fallback |
1 |
Middle | Scroll wheel press switch | Suppresses autoscroll icon inside the pad boundary |
2 |
Right | Secondary context switch | Blocks browser context menu so rapid clicks stay focused |
3 |
Back | Lower thumb side button | Prevents browser history back navigation during tests |
4 |
Forward | Upper thumb side button | Prevents forward history jumps during thumb switch checks |
Adjusting the Double-click fault limit and exporting CSV logs
Every fault check compares intervalMs <= thresholdMs against the Double-click fault limit slider in the right sidebar. Moving that control updates the threshold in real time between 40 ms and 150 ms in 5 ms increments.
Tuning the bounce slider from 40 ms to 150 ms
Competitive players testing low-latency gaming mice with aggressive firmware debounce often lower Double-click fault limit between 40 and 55 milliseconds. Lower limits verify that rapid intentional jitter-clicking or butterfly-clicking stays clean without masking true 5 ms to 20 ms switch faults.
Office users chasing phantom file drops during drag-and-drop selections benefit from raising the limit between 110 and 150 milliseconds. When oxidation causes sluggish release bounce while dragging a window, wider limits catch borderline events in Recent intervals before full switch failure occurs.
Building warranty records with Export CSV
Manufacturer support teams often request reproducible evidence before approving an RMA replacement. Selecting Export CSV serializes up to 250 buffered events locally into mouse-click-log.csv following the IETF RFC 4180 CSV Format Specification.
The table in Recent intervals renders the newest 25 rows with #, Button, Interval, and Status (OK or Bounce), while the downloaded CSV preserves Click,Button,IntervalMs,Faulty,TimestampMs. During broader desk triage, you can attach this click log alongside checks to verify monitor uniformity during hardware triage when inspecting a refurbished laptop setup.
Separating switch bounce from Windows speed settings
Many users try to fix double-clicking mice by dragging the operating system double-click speed slider in Windows or macOS settings. That software setting only widens or narrows the time window (often 200 ms to 900 ms) that interprets two valid clicks as opening a file or folder.
OS speed sliders cannot debounce a broken leaf spring firing two electrical pulses within 18 ms inside a single press. True optical switches eliminate contact chatter by using light interruption rather than metal-on-metal contact, whereas mechanical switches require firmware debounce tuning or physical switch replacement.
- Single-press bounce: Press Left slowly 20 times in a row, pausing 1 full second between clicks; any
Bouncerow confirms hardware chatter. - Release-drag drops: Hold a button down firmly for 2 seconds and release slowly; microswitches worn along the plunger contact often fire an extra click right on lift.
- Convertible laptop checks: If a mouse tests clean (
0faults) yet phantom taps keep appearing on screen, run a laptop glass digitizer grid inspection to rule out a noisy touch panel.
Tip: Click Reset counts after changing your mouse, USB port, or firmware debounce setting so earlier
Bouncerows andMininterval numbers do not carry over into the next run.