Developers are often asked to settle arguments that sound like hardware questions and are actually measurement questions. Is this mouse really running at 8000 Hz? Is the keyboard adding lag, or is the machine? Why does every polling-rate tester in a browser show 144 Hz on a 144 Hz monitor?
A browser is a tempting place to answer those questions: no install, no driver, no account. It is also a constrained place. The page sits after the operating system, input events can be coalesced to a frame, and timers are rounded for privacy. A useful in-browser test measures what it can, refuses to invent the rest, and tells you which of the two it just did.
FixNHandy is a set of 29 free diagnostic tools for audio, mice, and keyboards that run entirely in the browser. The operator's public description is that there is no app, no account, and that what you play or press is not uploaded. More relevant here is that the site publishes a methodology page describing what each class of test actually measures. The notes below follow that page and the tool documentation. They are a guide to reading — and to building — honest browser diagnostics, not a claim that a website can replace a USB analyzer.
The shared constraints
First, location in the pipeline. By the time JavaScript sees a pointerdown or a keydown, the device has already scanned, debounced, and reported, and the operating system has already delivered the event to the browser. A page can time what happens after that moment. It cannot see the device's internal delay without extra hardware.
Second, timer precision. FixNHandy's methodology notes that browsers round timers for privacy, typically to 0.1 ms in a normal page, and that every result is limited by that precision. That is enough to tell 125 Hz from 1000 Hz, or to flag two mouse clicks 20 ms apart. It is not enough to certify an 8000 Hz mouse report that is supposed to arrive every 0.125 ms, and it is not a substitute for a hardware timestamp.
Audio: generate the signal, then stay modest about the physics
All of FixNHandy's audio tools generate sound live with the Web Audio API. Nothing is streamed or recorded, and levels are capped so tones do not clip. You are not listening to a compressed file, and you are not entitled to treat the result as a lab trace. A left-only tone is a good channel check. It is not a calibrated frequency-response measurement, and it still depends on the selected output device, spatial-audio processing, and the user's volume.
The water-eject signal is a useful example of designing for physics rather than for a round marketing number. The documented tone is a sine wave that starts at 165 Hz, glides to 250 Hz and back, in short bursts that the site says help limit heat. The glide exists because each phone speaker resonates at a slightly different frequency. Left and right tests use one-sided tones plus a sweep so a midrange beep cannot hide a bass or treble dropout.
The methodology's most important sentence is not about hertz. A tone can only move water or loose dust sitting in or on a speaker grille. It cannot dissolve residue, reach water inside the phone, or repair a torn diaphragm, corrosion, or a loose connector.
Mouse polling rate: why naive testers report your refresh rate
A polling rate is the number of times per second a mouse reports movement, in hertz: every 8 ms at 125 Hz, every 1 ms at 1000 Hz, every 0.125 ms at 8000 Hz. It is independent of DPI. The measurement sounds easy — count mousemove events for a second — and that is how a lot of web testers get it wrong.
Browsers do not guarantee one event per hardware report. Chrome, for example, can batch moves and dispatch them once per screen frame. A counter built on mousemove or a plain pointermove then reports 60, 144, or 240 Hz, which is your monitor, not your mouse.
FixNHandy's documentation for its in-browser mouse polling rate test describes a three-tier approach that is worth copying if you ever write a similar tool:
- Raw pointer events (
pointerrawupdate) in Chrome and Edge, delivered as reports arrive rather than once per frame. - Coalesced events via
getCoalescedEvents()where raw events are unavailable, to recover reports that were batched into a frame. -
pointermoveonly as a last resort, compared against a measured screen refresh rate, with a warning if the two match.
The test asks you to choose the rate set in the mouse software, or "not sure," and to move in fast circles for three to five seconds, because a mouse only reports when it moves and slow movement reads low. Results are grouped into 100 ms windows; pauses longer than 40 ms start a new window so a stop does not drag the number down. "Typical" is the median of those windows, and the nearest standard rate is snapped to 125, 250, 500, 1000, 2000, 4000, or 8000 Hz.
The documented failure modes are as instructive as the API choice. A result that is exactly one step below the setting often means the setting was not saved to onboard memory. 4000 and 8000 Hz readings that come in low may be a USB hub, a busy browser, or a wireless mouse that is not on its high-rate receiver. A reading of 60, 120, or 144 Hz is called out as the screen. The site also notes that a busy page can drop reports at 2000 Hz and above — a reminder that the browser itself is part of the system under test.
Keyboard latency: measure the middle of the pipeline, not the whole path
"How much lag does this keyboard have?" is the wrong question to ask a web page, and the right question to unpack. End-to-end key response — finger to photons — has at least four stages:
- Inside the keyboard: scanning, debounce, waiting for the USB or wireless poll. A browser cannot see this. Reviewers use hardware.
- Computer to page: the operating system and browser deliver the event. Measurable.
- Page to the next frame: the browser draws. Measurable, and dominated by refresh rate.
- The display: scan-out and pixel response. Needs a camera.
FixNHandy's keyboard latency test is documented as measuring stages two and three only. You focus a box and tap a key about 40 times at a relaxed pace; held keys and auto-repeat are ignored. It reports input delay (the time from the browser receiving the event to the page's code running), key-to-frame time (that delay plus the wait for the next draw), and the worst 5 percent of readings — the tail you feel as stutter. On a healthy computer, input delay is described as a few milliseconds. The frame wait is mostly set by refresh rate: 16.7 ms at 60 Hz, 6.9 ms at 144 Hz, 4.2 ms at 240 Hz.
The interpretation guide is the part worth stealing for any telemetry dashboard. Low input delay with a frame wait near one frame means the computer is not the bottleneck; remaining lag is in the keyboard or the display. High input delay or a high worst-5-percent tail means the machine or the browser is busy. A 10–17 ms key-to-frame time is normal on a 60 Hz screen. Wireless delay, if it exists, happens before the press reaches the computer, so this test will not show it.
A related keyboard measurement, polling rate, is inferred from how key timings line up on a grid. The methodology says this estimate resolves up to about 2000 Hz, and that 4000 and 8000 Hz keyboards cannot be confirmed in a browser. If you are writing a similar estimate, publish that ceiling rather than printing "8000 Hz" from keydown timestamps in a page with 0.1 ms timer quantization.
A checklist for reading — or writing — an in-browser hardware test
If you use these tools, or ship your own, name the API you actually used, fall back out loud when you did not get it, and separate a median from a tail. Compare against the user's claimed setting, and against the screen refresh rate when that is a known confounder. Quantize to verdicts you can defend, not to false precision. Say when the honest next step is to stop. Do not invent a success rate: FixNHandy's methodology refuses figures such as "98 percent of speakers fixed" because the site has no way to measure that honestly.
A browser will not become a hardware lab. Used with those constraints in mind, it is still a good place to find out whether the thing in your hands is broken, mis-set, or merely misunderstood.
Top comments (0)