7 Buttons Mouse in Linux
I had some problems to have my 7 buttons mouse (Logitech MX510) working correctly under Linux.
Problem was that the Back and Forward buttons didn't work correctly:
the first had the same effect has the left button click and the second the same effect as the right button click.
And I couldn't find the right mouse (or equivalent) in the Mouse Configuration.
I could finally configure it correctly by editing the /etc/X11/XF86Config (Red Hat 4) and /etc/X11/xorg.conf (Oracle Unbreakable Linux) as the following:
(...)The button numbers after "ZAxisMapping" are the values of the
Section "ServerLayout"
(...)
InputDevice "Logitech" "CorePointer"
(...)
EndSection
(...)
Section "InputDevice"
Identifier "Logitech"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "Buttons" "7"
Option "ZAxisMapping" "6 7"
Option "Emulate3Buttons" "no"
EndSection
(...)
scroll wheel up and down.
I used the xev tool to determine
which button numbers these are.
That is, I ran xev in a terminal,
hovered the mouse over the pop up window and on the mouse pushed the scroll
wheel up and down;
the output was as the following:
(...)I did the same to determine the values of the Back and Forward buttons:
ButtonRelease event, serial 25, synthetic NO, window 0x2a00001,
root 0x3b, subw 0x2a00002, time 550529, (22,49), root:(892,69),
state 0x800, button 4, same_screen YES
(...)
ButtonPress event, serial 25, synthetic NO, window 0x2a00001,
root 0x3b, subw 0x2a00002, time 551169, (22,49), root:(892,69),
state 0x0, button 5, same_screen YES
(...)
(...)
ButtonRelease event, serial 25, synthetic NO, window 0x2a00001,
root 0x3b, subw 0x2a00002, time 615813, (40,29), root:(910,49),
state 0x200, button 6, same_screen YES
(...)
ButtonPress event, serial 25, synthetic NO, window 0x2a00001,
root 0x3b, subw 0x2a00002, time 617300, (44,31), root:(914,51),
state 0x0, button 7, same_screen YES
(...)
I then specified the order of the buttons (left, middle and right clicks, back, forward, wheel up & wheel down) in file /etc/X11/Xmodmap:
pointer = 1 2 3 6 7 4 5It now works as expected :-)