Mouse Test
Test mouse buttons, pointer movement and wheel input in one field, reporting position, distance travelled, double-click gap and device pixel ratio.
Mouse Test
Test mouse buttons, pointer movement and wheel input in one field, reporting position, distance travelled, double-click gap and device pixel ratio.
What the page does
The field listens for pointerdown, pointerup, pointermove and wheel. The panel reports which buttons are down, the last event, the position inside the field, the total distance moved and the wheel delta accumulated.
A double-click gap is the interval between two presses less than half a second apart. The device pixel ratio is read from the window, which is what the browser reports rather than a sensor measurement.
The page runs entirely in this browser tab; nothing is uploaded.
Move, click and scroll inside the field. The page names the event, the button number, the pointer type and the position relative to the field, and it adds up the distance the pointer travelled.
The wheel delta and the device pixel ratio are shown beside the button state, because a scroll that feels wrong is often a delta problem rather than a hardware one. Right-click opens the browser menu nowhere: the field suppresses it.
How to use Mouse Test
Move the pointer inside the field. The position and the distance travelled update, and the pointer type tells you whether the browser treated the input as a mouse, a pen or a touch.
Press each button in turn and watch the held count. Scroll inside the field to see the wheel delta, then press Reset to zero every reading.
Why the readings are not a hardware score
A browser sees pointer events, not a sensor. Two mice that both report 1,000 counts per inch can produce different distances here, because the operating system pointer acceleration sits between the device and the event. The page therefore reports what it received and never converts it into a specification.
The double-click gap is the interval between two pointerdown events close together, which is the browser's timing rather than a measurement of the switch. It is still useful: a switch that bounces usually produces a gap far shorter than a deliberate double click, and the number shows that.
What to Expect
Best for
- Checking that every button registers
- Seeing whether wheel direction is inverted
- Watching movement and double-click timing
Not ideal for
- Measuring DPI or polling rate, which a browser cannot see
- Certifying a gaming mouse
- Testing a device the browser does not expose as a pointer
What this tool keeps
- The event stream of one session
What may need cleanup
- Nothing: Reset zeroes the readings
Common errors
- Pointer acceleration changes the distance a physical movement produces
- A touch drag reports a pointer type of touch, not mouse
Example use cases
- Press every button on a new mouse
- Check wheel direction after a driver change
- See the double-click gap of a suspect switch
Sample input
A left click, then a second left click 180 ms later
Sample output
Button 0 down and up, double-click gap 180 ms, pointer type mouse
Who this is for
- Anyone checking a mouse
- Readers debugging wheel or button input
Frequently asked questions
Why does the same movement give different distances on two mice?
Operating system pointer acceleration changes how far the cursor moves for the same physical motion, and the browser reports the result. The page measures events, not the sensor.
What is the device pixel ratio line?
The browser's own ratio of device pixels to CSS pixels, read from window.devicePixelRatio. It describes the display configuration, not the mouse.
Does right-click open a menu?
No. The field suppresses the context menu so the right button can be tested like any other. Everywhere outside the field, the menu works normally.
Build custom tools for your store
Join the SDK program to create useful ecommerce utilities for your store.