Mice

A mouse sometimes needs a bit Xmodmap, too.

Logitech Cordless Optical TrackMan

Getting buttons beside the standard ones (Left/Right/Middle/Scroll wheel) to work sometimes is a bit tricky, but there is lots of documentation in the web. Here I describe how I got some more buttons working on my Logitech Trackball. Basically that are the left/right scroller - the tiny up/down scroller and the scroll lock button don't generate events here.

Using the Event Interface evdev

Using the standard IMPS/2 protocol for the trackball does not give us access to the additional buttons, we need to use the event interface of the Linux kernel and the respective X.org driver.

Note

I use X.org 7.0; the settings are different on X.org 6.8

Now check if the event interface already exists in your kernel: grep Handlers /proc/bus/input/devices which should return something like

H: Handlers=mouse0 event0

if it is activated (notice the "event0"). If not, enable it in your kernel at Device Drivers/Input device support/Event interface.

Now you are ready to activate the evdev driver in your /etc/X11/xorg.conf:

Section "InputDevice"
        Identifier  "Cordless Optical Trackman"
        Driver      "evdev"
        Option      "Device"        "/dev/input/event2"
        Option      "ZAxisMapping"  "4 5"
        Option      "Buttons"       "10"
EndSection

For the right event device number, see the grep output above.

Getting buttons to work

The driver alone doesn't assign the buttons correctly, so you have to do it on your own; the solution is - again - your Xmodmap file:

pointer = 1 3 2 4 5 8 9 7 6 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32

Basically we assign the normal buttons (1 - left, 2 - right, 3 - middle), the wheel (4 and 5) but also assign buttons 8 and 9 to be at place 6 and 7, so that they can be used as left/right scrolling - which gives you the ability to move in your browser history by pressing the arrow buttons direcly above the left mouse button.