I've been using a Microsoft IntelliMouse Explorer 3.0 USB mouse for several years, but have had trouble getting the 2 side buttons working with my browser. Until last night! A late night Google session and some tinkering brought the 2 side buttons to life.
Many people seem to have set the Buttons options (to a value of 7), but I have
found that it is not needed. Below is the relevant section of my xorg.conf
file (I am running Xorg X11 version 1.0.1 on Fedora Core 5 at the time of this
writing):
Section "InputDevice"
Identifier "Mouse0"
Driver "mouse"
Option "Protocol" "ExplorerPS/2"
Option "Device" "/dev/input/mice"
Option "ZAxisMapping" "4 5"
Option "Emulate3Buttons" "no"
EndSection
With these settings, you can use the xev
utility to verify the button number
for all buttons and wheels on a mouse. For my mouse the rear side button is 8
and the side front button is 9. I thought this was strange since I can only
count 7 distinct buttons on my mouse (I believe this is why everybody sets the
Button option to 7). Anyway, xev
never lies.
One more key to the puzzle: what button numbers does Firefox use for the Forward and Back functions? Turns out to be button 6 for Back and button 7 for Forward. Thanks Gentoo HOWTO.
Now for the final setting, we need to map mouse buttons 8 and 9 to buttons 6
and 7 respectively. This is where the xmodmap
utility helps us out. Just
add the following line to ~/.Xmodmap
:
pointer = 1 2 3 4 5 8 9 6 7
This expression places buttons 8 and 9 in the location for buttons 6 and 7. The mystery buttons 6 and 7 are then mapped to buttons 8 and 9, though I don't know how these button codes are generated from the mouse.
A restart of X (i.e., init 3
followed up with init 5
) and xev
now reports
the side buttons as button 6 and button 7. A final test in Firefox shows that
I now have side button control of Forward and Back.
Hope this helps somebody get their side buttons working.