AuthorTopic: xorg.conf for trackballs (Read 6502 times)

Here is how I tweaked xorg.conf in VL 5.8 Standard for my logitech marble trackball.

The second line, Identifier, matches the line at the top of xorg.conf.

The changes include "Protocol" "Device" "Buttons" "DragLockButtons" and "EmulateWheelButton". This is set up so that the small right button changes the trackball into a scrollwheel when pressed, and the small left button locks the large one, as when you drag to select large blocks of text, etc.

Naturally, other options will result in different behaviour ... There is really no one right way for a trackball to work: it depends on what you want.

I've used similar configurations in other distros; in VL 5.1.1, I had the DragLockButtons set for 4 and 1, and EmulateWheelButton set for 5. It seems illogical that the current config, which uses buttons 8 and 9 and yet has the option for buttons set to 5, would work, but it does.

Tools like xev and xmodmap may be helpful. Sometimes the buttons are reported (numbered) differently, and you have to try different numbers in the options.

Caveat: make a backup of your xorg.conf file (/etc/X11/xorg.conf) before editing it. If you make a mistake, x may not start, leaving you in text mode until you restore your backup.

[edit] I've removed Option "Buttons" "5" from the config above ... this option doesn't seem necessary in my current setup, and, oddly, xorg always sees more buttons. (If I set it to 5, Xorg.0.log reports seeing 11; if I set it to 11, the log says there are 15 buttons ... but as everything works I haven't explored further.)

Very welcome, Rod. I had a similar config in openSUSE 10.0, but had slightly different numbers set. I think it may have been because I mucked around with imwheel and xmodmap trying to get it working, before I figured it out.

I've got something similar for the old XFree86 in Debian sarge, but there it required a Z-AxisMapping line as well as different number mappings. The Z-AxisMapping line kept it from working for me in xorg -- took a couple days to figure that out.

I've got a nagging feeling that, although this works, the Buttons option should be set to 11 instead of 5: I've noticed a line "Mouse0: Buttons: 11" in Xorg.0.log.[edit] I've removed that line and it works fine without it; works fine with it set to 5 or 11 too.

Option "XAxisMapping" "6 7"Doesn't play well with the Smoothscroll extension in Mozilla apps, though.

update for xorg 7.2Moving from 6.9 to 7.2 introduces a new problem with this config: the small right button (used to turn on wheel emulation) now randomly acts as the left large button, causing (for example) links to be activated at random as you scroll down a page or through history/bookmarks.

Option "EmulateWheelTimeout" "integer" Specifies the time in milliseconds the EmulateWheelButton must be pressed before wheel emulation is started. If the EmulateWheelButton is released before this timeout, the original button press/release event is sent. Default: 200.