Mouse Tester
Check which MouseEvent.button codes the browser receives for primary, auxiliary, secondary, back, and forward buttons.
Privacy: your files never leave your device. All processing happens locally in your browser.
How to use
- 1.Place the pointer inside the dashed target and press each available mouse button one at a time.
- 2.Confirm the total, named button count, and recent order increase for every event the browser delivers.
- 3.Repeat in the affected application when needed, and use Reset test to clear this browser-only session.
About Mouse Tester
Mouse Tester records button-down events delivered to a large browser target. Press the primary, middle, secondary, back, or forward mouse button while the pointer is inside the dashed area. The page increments a total, shows one count for each named Web button code, and keeps the latest eight accepted labels. Reset clears the in-memory session. The target suppresses its own context menu and auxiliary activation so testing a secondary or middle button does not immediately replace the result.
Button names follow the Web platform MouseEvent.button mapping rather than assumptions about physical left and right positions. Code 0 is Primary, code 1 is Auxiliary, code 2 is Secondary, code 3 is Back, and code 4 is Forward. Primary usually means the main activation button, which a user can configure on another physical side. Auxiliary is commonly a middle or wheel button. Back and Forward are commonly extra navigation buttons when the browser exposes them.
The distinction between button and buttons matters. MouseEvent.button identifies the button associated with a press or release event. MouseEvent.buttons is a bit field representing buttons currently held during other mouse events. This tool listens to button-down events and classifies the single button code on that event. It does not claim to test simultaneous chords or reconstruct a continuous held-button state. The mapping and its limits are disclosed in Methodology and linked to the Web specification.
The browser or operating system can intercept a button before the page receives it. Back and forward buttons may navigate history, browser extensions may remap input, accessibility software may synthesize events, and remote-desktop tools can alter codes. Preventing default behavior on the target reduces accidental actions but cannot override higher-priority browser or system handling. A zero count therefore means no matching event reached this page during the test; it does not prove that the physical switch failed.
A practical check starts with one deliberate press per available button. Confirm that the expected named count increases once, then repeat several times. Use Recent to see the order received. Test the same device in the application where a problem occurs, because games, design tools, browsers, and operating systems can handle extra buttons differently. If a button produces multiple events, compare with Double Click Test or manufacturer software, but do not treat one browser session as a repair diagnosis.
Unknown synthetic integer codes are labeled with their numeric value rather than forced into a known name. Fractional codes are rejected because the documented mapping uses integer codes. The named mapping contains exactly five unique keys and five unique labels. Independent golden cases cover codes 0 through 4 plus negative, next-range, and large unknown values, preventing a plausible but shifted mapping from passing its own tests.
Mouse Tester does not measure click speed, double-click interval, polling rate, button debounce, wireless latency, switch force, pointer movement, scroll-wheel deltas, or drag behavior. It also cannot certify accessibility, game suitability, or hardware condition. Those claims require different measurements and, in some cases, access to physical timing or device diagnostics that a normal web page does not have.
All counts remain in the current tab. The widget does not request a device identifier, install a driver, upload events, save a history, or listen outside the visible test target. Refreshing, closing, or selecting Reset removes the current state. The reliable contract is limited to interpreting MouseEvent.button codes that reach the area, counting those events transparently, retaining a short recent list, and warning that software can intercept or remap input.
Methodology & sources
Interpret integer MouseEvent.button codes according to the Web mapping: 0 Primary, 1 Auxiliary, 2 Secondary, 3 Back, and 4 Forward. Preserve any other integer as Unknown with its numeric code and reject fractional values. On each mousedown delivered to the target, immutably increment the total and matching label count and retain the latest eight labels. Suppress contextmenu and auxiliary default behavior only within the target. An independent eight-case fixture covers all five named codes and three unknown boundaries; invariants require five unique codes and labels.
Frequently asked questions
- Why does Primary not always mean the physical left button?
- Primary means the device's main activation button in the Web event model. Operating-system settings can swap physical left and right roles.
- Why did a back or forward button not appear?
- The browser, operating system, extension, driver, or remote software may intercept or remap an extra button before this page receives its event.
- Can this diagnose a broken mouse switch?
- No. It reports browser button-down events only and cannot isolate hardware, debounce, transport, driver, or application behavior.
Related tools
- Mouse Scroll TestSee whether browser wheel events arrive in every direction, with exact event counts and raw horizontal and vertical deltas.
- Double Click TestMeasure the browser-event interval between two clicks and compare the latest, best, and average result across up to fifty pairs.
- CPS TestMeasure how fast you can click — your clicks per second (CPS) — with a live countdown and an instant speed rating, right in your browser.
- Keyboard TesterTest every key on your keyboard and instantly spot dead, sticky, or ghosting keys.
- Break ReminderRun a simple repeating work-and-break schedule in the current tab with explicit interval, break length, and missed-timer correction.
- Gantt Chart MakerTurn 2 to 30 task,start,end rows into a deterministic UTC Gantt timeline and download the exact preview as SVG.
Device & Productivity guides
View all- How to Use a Notepad Effectively for Distraction-Free Writing
- Set a Browser Alarm in Under a Minute | Lizely
- How Long Is a Pomodoro? Cycle Lengths Explained
- How to Stop a Stopwatch on Your Browser
- How to Set Up a Clean Countdown Timer for OBS
- How to Test Keyboard Performance and Find Dead Keys
- How to Ace the CPS Test 1 Second Challenge