Sharkoon Fireglider Back/Forward Buttons Linux

Because of my RSI-Syndrome, I got myself a supposedly good mouse. I chose a Sharkoon Fireglider, which is actually a gaming mouse, but looks office-ish enough for me.

Like usual everything worked out of the box on my Ubuntu Linux, no need to install any driver, just the back/forward buttons were not working as expected. Seems Sharkoon mapped their buttons differently than usual.

This simple command on the terminal made it work:

xinput set-button-map 12 1 2 3 4 5 0 0 9 8

It maps the key-event 9 to event no 8 and vice versa. (12 is the ID of my mouse, you can get yours by executing “xinput list”) Read this wiki if you need to know more details.

Done. [EDIT 2012-09-10] These changes were not permanent. To make them permanent, I created a file 50-sharkoon-fireglider.conf at /usr/share/X11/xorg.conf.d/ containing:

Section "InputClass"
        Identifier      "Sharkoon Fireglider USB"
        MatchProduct    "A4TECH USB Device"
        MatchDevicePath "/dev/input/event*"
        Option "ButtonMapping" "1 2 3 4 5 6 7 9 8"

restarted X and it works! [/EDIT]