Thumb Mouse Button 2: What It Is and How Mouse Buttons Are Named
Thumb mouse button 2 is the second side button on a mouse, the one Windows calls XButton2 and most games call Mouse 5. By default it sends the Browser Forward command, while thumb button 1 (XButton1, Mouse 4) sends Back. Do not confuse it with "mouse button 2": in games and in the classic numbering that name means the right mouse button, not a thumb button.
The confusion comes from different numbering schemes. This guide maps the names Windows, browsers, games and Linux use for every standard mouse button, shows how to tell which side button is which, and explains how to remap thumb buttons to something more useful.
What are thumb mouse buttons?
Thumb mouse buttons are the extra buttons on the left side of a right-handed mouse, placed where the thumb rests. Microsoft's input documentation says Windows supports mice with up to five buttons: left, middle and right, plus two additional buttons called XBUTTON1 and XBUTTON2, which are often located on the sides of the mouse near the base and are not present on all mice.
Most office and gaming mice have exactly two thumb buttons, so "thumb button 1" and "thumb button 2" usually mean the fourth and fifth mouse buttons. Microsoft notes that these buttons are often mapped to forward and backward navigation in a web browser, which is why many people simply call them the back and forward buttons.
Some mice add more side buttons, a thumb wheel or a dedicated "gesture" button. Those extras are not part of the five buttons Windows recognizes natively. They work through the manufacturer's software, which usually converts the press into a keystroke, a macro or one of the five standard button signals.
Mouse button names and numbers
Each mouse button has several names, depending on whether you read a Windows setting, a game's key binding menu or a programming reference. The table below lists the five standard buttons with their Windows name and the bind name used in Valve's Source engine games such as Counter-Strike.
| Physical button | Windows name (AutoHotkey key) | Game bind name |
|---|---|---|
| Left (primary) button | Left button (LButton) | Mouse 1 |
| Right (secondary) button | Right button (RButton) | Mouse 2 |
| Wheel click (middle button) | Middle button (MButton) | Mouse 3 |
| Thumb button 1 (Back) | X1 button (XButton1) | Mouse 4 |
| Thumb button 2 (Forward) | X2 button (XButton2) | Mouse 5 |
Code and other operating systems count differently. In the browser, the MouseEvent.button property starts at 0, and on Linux X11 the scroll wheel takes the numbers 4 to 7, which pushes the side buttons to 8 and 9.
| Physical button | Browser (JavaScript) value | Linux X11 number |
|---|---|---|
| Left button | 0 | 1 |
| Middle button | 1 | 2 |
| Right button | 2 | 3 |
| Thumb button 1 (Back) | 3 | 8 |
| Thumb button 2 (Forward) | 4 | 9 |
Is mouse button 2 the right click or a thumb button?
Mouse button 2 is the right mouse button in almost every context, while thumb mouse button 2 is the fifth button. The two terms sound alike but point at different hardware.
Game key binding menus and Valve's bind command number buttons from 1: Mouse 1 is the left click, Mouse 2 is the right click, Mouse 3 is the wheel click, and Mouse 4 and Mouse 5 are the side buttons. If a guide tells you to "press Mouse 2 to aim", it means the right button.
Windows virtual key codes follow the same order for the first two buttons: VK_RBUTTON is 0x02, the right mouse button, while VK_XBUTTON1 (0x05) and VK_XBUTTON2 (0x06) are the two X buttons. The browser is the exception: there, button value 2 is also the right button, but values 3 and 4 are the side buttons, so "button 4" in JavaScript is the forward thumb button.
One more catch: left-handed mode swaps the primary and secondary buttons. MDN notes that a mouse configured for left-handed use may have the button actions reversed, so "button 2" always means the secondary action, whichever physical button performs it.
How to tell thumb button 1 from thumb button 2
Thumb button 1 sends Back and thumb button 2 sends Forward, so the quickest test is a web browser. Mouse layouts vary between models, so check your own mouse instead of relying on the button position.
- Open a browser and visit two pages in the same tab, so there is a page to go back to.
- Press one of the side buttons. If the previous page loads, that button is thumb button 1 (XButton1, Mouse 4).
- Press the other side button. If you return to the newer page, that button is thumb button 2 (XButton2, Mouse 5).
- If nothing happens, the manufacturer's software may have assigned a different action, or the buttons may be disabled.
In games, open the key binding menu, select an action and press the side button: the menu shows the name the game uses, usually Mouse 4 or Mouse 5. Developers can log the MouseEvent.button value in the browser console: 3 is thumb button 1 and 4 is thumb button 2.
How to remap thumb mouse buttons
Thumb buttons are remapped with the mouse manufacturer's software or a scripting tool, because the Windows Settings app only lets you swap the primary mouse button under Settings > Bluetooth & devices > Mouse. It has no option for the side buttons.
- Manufacturer software: Logitech, Razer, Corsair, SteelSeries and other brands ship utilities that assign keystrokes, macros or app-specific actions to each button. Use the one made for your mouse model.
- Microsoft Mouse and Keyboard Center: for Microsoft mice, open the app, select basic settings, pick the button and choose a new command, or select Disable this button to turn it off.
- AutoHotkey: works with any mouse on Windows. Its key list names the side buttons XButton1 and XButton2, so a one-line script such as XButton2::Send "^c" turns thumb button 2 into Copy.
- Games: most games let you bind Mouse 4 and Mouse 5 directly in their control settings, with no extra software.
Popular assignments include copy and paste, push-to-talk, switching virtual desktops, media play or pause, and undo. Microsoft warns that some programs and games do not support customized button assignments, so test the mapping in the apps you use most.
Mice that go beyond two thumb buttons: the Swiftpoint Z example
Some mice add pressure-sensitive and motion controls on top of the standard thumb buttons. The Swiftpoint Z, which ghacks covered when it launched on Kickstarter in 2016, is a well-known example.
Its headline feature was the deep click: pressing a button harder triggers a second action on the same button, for example aim with a normal press and zoom with a deeper one.

The mouse also uses tilt and pivot movements as inputs, such as leaning in a shooter or panning a document.

Swiftpoint later released the Z2, which its store lists with 13 customizable buttons, Deep Click on 5 pressure-sensitive buttons and a built-in gyroscope for tilt actions. Controls like these rely on the vendor's software, because Windows itself only knows the five standard buttons. Multi-device mice such as Logitech's MX Master take a different route and focus on controlling up to three devices from one mouse.
FAQ
Why do my thumb buttons not work in a game?
Some games ignore the X buttons or only accept them after you bind them in the controls menu. If the manufacturer's software has assigned a keystroke or macro to the button, the game receives that keystroke instead of Mouse 4 or Mouse 5.
Can I disable the thumb buttons?
Yes. Most manufacturer utilities offer a disable option per button, and Microsoft Mouse and Keyboard Center has a "Disable this button" command.
What are mouse buttons 8 and 9?
On Linux with X11, buttons 8 and 9 are the back and forward thumb buttons, because the numbers 4 to 7 are used by vertical and horizontal scrolling. They are the same physical buttons that Windows calls XButton1 and XButton2.
Related: fix a mouse that double-clicks on a single click, change your mouse polling rate, make the mouse cursor easier to see in Windows
Umm… it has a tail.
No, please.
Thanks Martin for this interesting article on the “The Z” mouse.
You’ve got me intrigued, and I will certainly read up more about that mouse.
I’ve been actually using the “Razer Deathadder Chroma” mouse for the last couple of years (complete with it’s awesome embedded LED lights that slowly cycle through the color spectrum!).
I have to say that I ABSOLUTELY love it, and could NEVER EVER go back to a cheap mouse ever again.
Although, having lived with LED lights embedded within my mouse, I’ve come to appreciate the awesomeness and also utilitarian nature of those LED lights late at night…
So any mouse (and keyboard) I consider in the future, MUST have awesome glowing LED light capability!
Actually, I use a DeathAdder as well on one of my PCs ;)
I’ve always hated moving a mouse around cluttered desktops and my hand tends to hurt after a full day of mousing while holding onto the thing.
So my mouse of choice has been an Alps or Cirque touchpad for probably 20 years now. Sits next to my keyboard, both on a pullout shelf and the only thing that has to move are my fingers on the touchpad. I never have any wrist or hand pain with this approach.
1) You should never have to look at your mouse–at all.
2) Simpler is better. One button should do one thing, work one way. The fewer functions, the better. (You shouldn’t have to actually think about your mouse either.)
3) The Logitech MX518 is just about the most perfect mouse ever made.
4) Most people don’t position the mouse–or the keyboard for that matter–in a properly ergonomic position, which usually results in some type of–usually minor–stress injury.
Speak for yourself Earl!
I look at my mouse ALL THE TIME late night, as it glows beautifully in a cycle of LED color spectrum.
When I invite people to my home, they are often astonished and in awe at my keyboard and mouse!
I have a RAZER Deathadder Chroma mouse — it’s high performance, and multi-feature buttons are awesome!
I also have a RAZER Blackwidow Keyboard… that glows even more gloriously at night, and clicks/clacks with it’s mechanical keys that reminds me of the old IBM PC keyboard!
I’d never give them up, and couldn’t go back to cheap/simple/unappealing/un-interactive-keyboards-mice… and couldn’t disagree with you more!
not sure why you have to look at the mouse or think, once you get used to where everything is. you can just feel where things are with your hand. if you need all those extra buttons in the 1st place.
then again, even though i use a logitech mx master, i only use one of the thumb buttons (as middle button and i never use the scroll wheel as that) and can’t find a decent use for the thumb wheel.
After a repetitive stress injury, I moved into using a vertical ergonomic mouse. It would be nice to see some reviews on ergonomic hardware too. I’d recommend you look into the vertical Evoluent mouse and similar products. After hurting the supinator muscle in my forearm, my vertical mouse has been a real life saver that allowed me to keep using my computer.
If you would like to expand on ergonomic hardware, I’d also recommend you look at the Autonomous Smart Desk and similar products. They’d be worth the look and allow you to review some interesting new products.
I also advocate ergonomic equipment. The 3M vertical mouse is very good.
Hi Martin, your title should read “innovative” rather than ‘innovate’. :-)
Thanks ;)