Re: xev is indeed nifty, need assist on 2 wheel mouse

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

 



On Wed, 28 Nov 2007 19:44:53 -0500
Ric Moore <wayward4now@xxxxxxxxx> wrote:

> Question 1: option "buttons"

In the newer versions of X all mice seem to have 9 buttons
and if you actually give a "buttons" option in the mouse
input device definition it will instead generate a new
random number of buttons rather than using the number
you said (at least that seems to be my experience :-). Best
to just leave off the "buttons" option.

>Question 2: what is the difference in the use of ZAxisMapping,
>XAxisMapping, YAxisMapping?? 

ZAxisMapping is for the vertical scroll operations and as far
as I know always needs exactly two button numbers as arguments
(one for scroll up, the other for down). I'd assume X and Y
are similar for different scroll directions (though I'm not sure
why Z is for vertical scrolling, you'd think that would be Y :-).

I use a usb trackball with 4 buttons and a scroll ring in addition
to the ball (a kensington expert mouse) and getting it setup was
a little tricky. Here's the input device section I wound up with:

Section "InputDevice"
	Identifier  "Mouse0"
	Driver      "mouse"
	Option	    "Protocol" "Auto"
	Option	    "Device" "/dev/input/mice"
	Option	    "ZAxisMapping" "4 5"
	Option	    "Emulate3Buttons" "no"
	Option	    "DragLockButtons" "2 1"
EndSection

The "auto" protocol was important. There are uncounted zillions
of things you can apparently say there, all utterly undocumented,
but "Auto" means "Hey, X, figure it out for yourself!" which is the
only setting I ever got to work for any mouse :-).

I have no idea where /dev/input/mice comes from either, but it
has always worked, so that's what I use.

The drag lock is important to me with a trackball, but probably
not so important for a regular mouse. The definition above says
that button 2 when clicked once will act as though button 1 is
held down until I click again (it is very difficult to hold down
a button and roll the mouse at the same time :-).

That may seem like I have "used up" the real button two, but I
also have the following Xmodmap entry defined:

! Setup buttons for trackball
pointer = 1 8 3 4 5 6 7 2 9

That swaps buttons 2 and 8. The confusing part is that you have to
use the pre-xmodmap button numbers in xorg.conf.

I turn off the emulate 3 buttons since I really have 4 buttons, I
don't need the emulation.


[Index of Archives]     [Current Fedora Users]     [Fedora Desktop]     [Fedora SELinux]     [Yosemite News]     [Yosemite Photos]     [KDE Users]     [Fedora Tools]     [Fedora Docs]

  Powered by Linux