The Logitech RX1000 mouse has a scroll wheel that can tilt left or right. This generates HWHEEL events by default, which are pretty much useless. I find it more useful to have the tilt generate WHEEL events (scroll up and down), so I can press and hold left or right rather than repeatedly spinning the mouse wheel.
The wheel can also be pressed to get a middle click, but if I don’t concentrate I end up scrolling as well as middle clicking. There’s another button with a magnifying glass icon on it just below the scroll wheel which is more useful, which usually shows up as button 8. By making this button 2 we can use that for X11 paste, open-in-new-tab in Firefox and so on.
So I don’t forget how to get this working:
Section "InputDevice"
Identifier "Mouse1"
Driver "evdev"
Option "Name" "Logitech USB Optical Mouse"
Option "HWHEELRelativeAxisButtons" "4 5"
EndSection
Unfortunately, evdev doesn’t seem to have a ButtonMapping equivalent, so we have to fall back to xmodmap to do the button remapping. Doubly unfortunately, this makes pressing the middle mouse button useless.
pointer = 1 6 3 4 5 2 7 8 9 10
Thanks Nicolas.