Linux/Unix X11 Mouse Button Numbering Scheme

, ,

For some odd reason, if you have a 5-button mouse, the 5th button (aka “forward button”) in emacs has syntax <mouse-5> in Windows and Mac, but on Ubuntu 10.04 Linux running Gnome 2.x, it's <mouse-9>.

In unix X11, here seems to be how they assign the mouse buttons.

In emacs, you can find out the mouse button or wheel syntax by calling describe-key then press the button.

In X11, you can call xev to see any keyboard/mouse event and their naming.

Mouse Numbering on Windows & 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”.

blog comments powered by Disqus