VectorLinux
July 23, 2014, 01:48:48 pm *
Welcome, Guest. Please login or register.
Did you miss your activation email?

Login with username, password and session length
News: Visit our home page for VL info. To search the old message board go to http://vectorlinux.com/forum1. The first VL forum is temporarily offline until we can find a host for it. Thanks for your patience.
 
Now powered by KnowledgeDex.
   Home   Help Search Login Register  
Please support VectorLinux!
Pages: [1]
  Print  
Author Topic: xorg.conf for trackballs  (Read 5585 times)
incognu
Packager
Vectorite
****
Posts: 256



WWW
« on: February 18, 2007, 09:21:50 pm »

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.
Code:
Section "InputDevice"
Identifier  "Mouse0"
Driver      "mouse"
Option      "CorePointer"
Option      "Name" "Logitech USB Trackball"
Option     "Protocol" "auto"
Option     "Device" "/dev/mouse"
Option      "DragLockButtons" "8 1"
Option      "EmulateWheel" "true"
Option      "EmulateWheelButton" "9"
EndSection
I haven't used any other mouse tools, such as imwheel, on this install.

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.

Some useful information can be found at xorg:
http://ftp.x.org/pub/X11R7.0/doc/html/mouse5.html
http://ftp.x.org/pub/X11R7.0/doc/html/mouse6.html
http://ftp.x.org/pub/X11R7.0/doc/html/mouse7.html

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.)
« Last Edit: February 26, 2007, 10:12:36 pm by incognu » Logged

Vector Linux 6.0 Light
rschaffter
Member
*
Posts: 4


« Reply #1 on: February 24, 2007, 09:51:34 am »

Great Information!

It works in openSuSE 10.2 as well.

Thanx!

Rod
Logged
incognu
Packager
Vectorite
****
Posts: 256



WWW
« Reply #2 on: February 25, 2007, 03:18:27 am »

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.
« Last Edit: February 26, 2007, 10:13:39 pm by incognu » Logged

Vector Linux 6.0 Light
incognu
Packager
Vectorite
****
Posts: 256



WWW
« Reply #3 on: September 17, 2007, 09:41:56 pm »

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

update for xorg 7.2
Moving 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. 

This seems to work for me to solve that problem:
Code:
Section "InputDevice"
Identifier  "Mouse0"
Driver      "mouse"
Option      "CorePointer"
Option      "Name" "Logitech USB Trackball"
#Option        "Protocol" "auto"
Option "Protocol" "ExplorerPS/2"
Option        "Device" "/dev/mouse"
Option      "DragLockButtons" "8 1"
Option      "EmulateWheel" "true"
Option      "EmulateWheelButton" "9"
Option "EmulateWheelTimeout" "1"
Option "ZAxisMapping" "4 5"
EndSection

The key part is probably the "EmulateWheelTimeout" bit, which is what finally did the trick.  From  x.org's Mouse (4) manual page:
Quote
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.
Logged

Vector Linux 6.0 Light
Pages: [1]
  Print  
 
Jump to:  

Powered by MySQL Powered by PHP Powered by SMF 1.1.19 | SMF © 2013, Simple Machines Valid XHTML 1.0! Valid CSS!