Friday, February 09, 2007

Use all 5 buttons on your mouse

I have a Logitech MX400 Laser mouse. It has a tilt scroll wheel, and two side buttons. I have these two side buttons mapped in Guild Wars for targeting. So here is how you get them working.

Edit /etc/X11/xorg.conf. Find the section "InputDevice". Add the bold items below.

Section "InputDevice"
Identifier "Mouse1"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/mouse"
Option "Buttons" "7"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "false"
Option "ButtonMapping" "1 2 3 6 7"
EndSection

I know it says 7 buttons. That's cause Linux counts the scroll wheel movements as "buttons". However, you notice that the ZAxisMapping is set for buttons 4 and 5 (Up and Down on scroll wheel).

Restart X with a Ctrl-Alt-Backspace. That's it! If anyone has any idea how to get the sideways tilting scrolling to work, please post a comment.

No comments: