Linux: X11 Mouse Button Numbering

By Xah Lee. Date: . Last updated: .

In Linux X11, each mouse button is assigned a number.

Here's the numbering:

[see Linux: How to Swap Mouse Buttons]

How to find the X11 mouse button number?

type xev in terminal, then click the button to see its number.

linux x11 xev output 2015 11 08
xev output

To exit xev, just close its window.

Mouse Numbering on Windows and Mac

The numbering also depends on OS and mouse driver.

For example, on Mac OS X 10.4.x, using a Microsoft 5-buttons mouse, the numbering changes depending on whether you have Microsoft's mouse driver (IntelliPoint) installed.

Numbering Scheme on Mac OS X with Microsoft 5-buttons Mouse without IntelliPoint Software

If you don't have IntelliPoint installed, then Mac OS X doesn't register the mouse wheel tilt left/right, and your Backward (4th) button is the same as right-button, and Forward (5th) button is 4th button.

Here's the numbering reported by emacs's describe-key.

See also: Mouse Reviews

Mouse topic

  1. Linux: Mouse Hover to Auto-Raise Window
  2. Linux: Mouse Hover-Click
  3. Linux: Set Mouse Single-Click to Open File
  4. Linux: How to Set Mouse Speed
  5. Linux: How to Swap Mouse Buttons
  6. Linux: Set Trackball/Mouse Do Scroll
  7. Linux: Setup Accelerated Scroll and AutoScroll
  8. Linux: X11 Mouse Button Numbering

If you have a question, put $5 at patreon and message me.

Linux Keybinding Panel Index