What Is the Mouse Button Test?
The mouse button test is a straightforward diagnostic tool that lets you verify whether every button on your mouse registers correctly in the browser. It supports all five standard mouse buttons: left click (button 0), right click (button 2), middle click / scroll wheel press (button 1), browser back (button 3), and browser forward (button 4). Each button is displayed as a visual tile that lights up green the moment you press it. The tile stays lit while the button is held down and returns to its default state when released. A per-button click counter accumulates each press so you can see at a glance which buttons are registering and how many times. This tool is particularly useful when you suspect a button is failing intermittently — repeated pressing will show clearly whether a button is registering every click or missing some. Side buttons (back and forward) are especially prone to intermittent contact issues and are often the hardest to diagnose because they are used less frequently. The mouse button test gives you a visual confirmation in real time, without installing any software, drivers, or browser extensions.
How It Works
The component listens for mousedown events on the test area and uses event.preventDefault() to suppress the browser context menu for right-clicks. Each mousedown event carries a button property: 0 for left, 1 for middle, 2 for right, 3 for back (browser back), and 4 for forward (browser forward). When a button is pressed, its corresponding tile changes to a green highlighted state, and the counter for that button increments. A mouseup event listener on the document resets the pressed state when the button is released, allowing you to see both the press and release accurately. The tool tracks counts for all five buttons and resets via a dedicated Reset button.
How to Use
- Move your cursor into the test area and ensure the page has focus.
- Click each mouse button — left, right, middle (scroll wheel press), back, and forward side buttons.
- Watch the corresponding tile light up green when each button is pressed.
- Check the count below each tile to confirm every press is registering.
- For side buttons, ensure your finger fully actuates the button rather than just touching it.
- Click Reset to clear all counts and start fresh.
Tips & Information
Test Side Buttons Specifically
The back and forward side buttons are the most commonly failing buttons on gaming mice. Press each side button 10 times and check the counter. If you get fewer than 10 registrations, the button is registering intermittently and may need cleaning or switch replacement.
Diagnose Stuck Buttons
If a button tile stays green without being pressed, your button may be stuck or the switch is shorting. This can happen due to debris under the button. Try clicking the button several times and cleaning around the edges with compressed air.
Test Middle Click Separately
The middle click (scroll wheel press) is often overlooked. Many users do not realise their middle click has stopped working until they check explicitly. Press the scroll wheel down firmly into the click to test it.
Check in Different Browsers
Some browsers block or remap certain mouse button events (particularly browser back and forward buttons, which are button 3 and 4). If a side button does not register here, try the test in a different browser to determine whether it is a hardware or browser issue.
Compare Fresh Mouse vs Old Mouse
If you have a second mouse, test both to compare click counts and behaviour. This quickly tells you whether a button issue is specific to one mouse or caused by your browser, USB port, or OS mouse driver.
Frequently Asked Questions
Why does my right click not light up?
The test suppresses the browser right-click context menu inside the test area, so right-clicks should register. If they do not, a browser extension may be intercepting the event. Try in an incognito window with extensions disabled.
My side buttons are not registering — why?
Some browsers capture side button events for navigation and do not pass them to the page. Try in a different browser or in an incognito window. If they still do not register in any browser, the button hardware may be faulty.
What is button 1 (middle click)?
Button 1 is the middle mouse button, activated by pressing down on the scroll wheel. It is commonly used to open links in a new tab, paste text in Linux, and in many games for a utility action.
How do I test if a button is intermittently failing?
Press the suspect button 20 to 30 times and watch the counter. If the count is less than the number of times you pressed, some presses are not registering, indicating an intermittent failure.
Can this detect double-click chatter?
Not directly. This tool shows each press but does not measure the time between presses. For double-click chatter detection with millisecond-level analysis, use the dedicated Double Click Test on this site.
Does this work on Mac?
Yes. The test works on any operating system that supports standard browser mouse events, including macOS, Windows, and Linux. On macOS, Ctrl+click is treated as a right-click.