Linux tip, Fedora tip / howto: using the Kensington Expert Mouse trackball

 
Note that these tips are mostly outdated


back to notes and tips index

Try my online puzzle page with Calcudoku, Killer Sudoku and online Sudoku.

using the Kensington Expert Mouse trackball

Another piece of hardware for which the actual usable information is scattered across the net, instead of on the Kensington website...

I bought this trackball for way too much money. In the US it costs $72 (47 euros) at Amazon, here I had to pay 99 euros (153 dollars !!!). What a rip-off.

To get all six buttons to work (the scroll wheel actually functions as two buttons, one for one direction, one for the other), you have to modify /etc/X11/xorg.conf.
In xorg.conf, in a ServerLayout section, there will be a line like this:
InputDevice "Mouse0" "CorePointer"
Make a note of the mouse identifier (Mouse0 in my case).

Next, find the InputDevice section for the mouse, and replace it with the section below. Make sure the identifier in the Identifier line corresponds to the one in the ServerLayout section. Save the file, and restart X.

Section "InputDevice" Identifier "Mouse0" Driver "mouse" Option "Protocol" "ExplorerPS/2" Option "Device" "/dev/input/mice" Option "ZAxisMapping" "4 5" Option "Buttons" "6" Option "Emulate3Buttons" "false" Option "ButtonMapping" "2 1" EndSection

A note on the ButtonMapping line: originally the bottom left button maps to button 1 (= left mouse button), the top left to button 2 (= middle mouse button), the bottom right to button 3 (= right mouse button), and the top right to button 8 (?!). Because I wanted the top left button to correspond to a left mouse button, and the bottom left to a middle mouse button, I added the ButtonMapping line.

To verify the mapping of your buttons, run xev, and click the buttons (and use the scroll wheel)(xev is part of the xorg-x11-utils package).

I'm using the Enlightenment window manager, with which it is really easy to map mouse buttons (including the extra button "8") to anything.

"Drag lock"

If you don't want to hold down the "left mouse button" while dragging, you can add a line to the same section like this:
Option "DragLockButtons" "8"
This made my button 8 (the top right button on the trackball) the "drag lock" button: now, to move a window, for example, I move the mouse cursor to the window title bar, and first click the "drag lock" button (i.e. the top right button), then the left mouse button (the top left in my case). The left mouse button is now "locked down", and I can move the window by moving the trackball (exactly the same effect as holding down the mouse button). To release the lock simply press the left mouse button again.

Finally, here are all the details on the configuration options of the mouse section.

Trackball sensitivity

Normal mouse settings seem to be a bit too sensitive for a trackball. You change the sensitivity and speed with gnome-mouse-properties (also accessible through the Fedora menu -> System -> Preferences -> Hardware -> Mouse (why do I have to click five times to access these??)). Unfortunately, the speed setting is not saved (!), so you'd have to run it each time your start X.

A quicker alternative way is to run:
xset m 3/10
(for example). To have this set when I start X, for now I've added this command to a startup script that is run when my window manager starts (Enlightenment). Any pointers on how to get this done at X startup (xorg) will be appreciated (tried ~/.xinitrc, ~/.xession, etc., all to no avail).


← back to notes and tips index
Please do not copy the text of this tip (© Patrick Min) to your web site.