Pointing device acting as joystick (Peter Hutterer please help!)

Timothy S. Nelson wayland at wayland.id.au
Mon Nov 8 17:42:03 PST 2010


On Fri, 29 Oct 2010, Peter Hutterer wrote:

> On Fri, Oct 29, 2010 at 11:11:00AM +1100, Timothy S. Nelson wrote:
>> 	Hi all (and especially Peter Hutterer, Grand Master of Xorg Input).
>> I have a SpaceNavigator (6-axis pointing device) which I'd like to
>> use for scrolling (or even better, scrolling and pointing).
>>
>> 	My first problem is that xorg (understandably) seems to think the
>> device is a joystick, because whenever I let go of the device, it
>> moves the pointer back towards the centre of the screen.
>
> It's most likely the device sending the events. I know the one on the
> wiimote nunchuk thingy did the same thing. There isn't much you can do about
> filtering these events.
>
> check with evtest for the data coming out of the device, that should give
> you a hint.

 	You're right, thanks.

> > [  4442.562] (**) Option "Mode" "Relative"
> > [  4442.562] (II) 3Dconnexion SpaceNavigator: initialized for absolute axes.
> >
> >       In other words, it knows that I told it to use relative mode, but
> > it goes ahead and uses absolute anyway (or I'm misunderstanding the
> > message :) ).
> 
> the two messages are unrelated. mode tells the driver how to forward
> axis data but it doesn't change the physical device. your device still has
> absolute axes, the driver converts that to relative and forwards them.

 	Hmm.  So, after examining the evtest data more carefully, I'm 
wondering about the absolute->relative conversion.  For example, here's a grep 
of the relevant events:

Event: time 1289267574.071171, type 3 (Absolute), code 0 (X), value 2
Event: time 1289267574.087156, type 3 (Absolute), code 0 (X), value 4
Event: time 1289267574.119151, type 3 (Absolute), code 0 (X), value 3
Event: time 1289267574.135155, type 3 (Absolute), code 0 (X), value 0
Event: time 1289267574.407151, type 3 (Absolute), code 0 (X), value 2
Event: time 1289267574.423152, type 3 (Absolute), code 0 (X), value 8
Event: time 1289267574.439153, type 3 (Absolute), code 0 (X), value 16
Event: time 1289267574.455151, type 3 (Absolute), code 0 (X), value 22
Event: time 1289267574.471148, type 3 (Absolute), code 0 (X), value 33
Event: time 1289267574.487061, type 3 (Absolute), code 0 (X), value 46
Event: time 1289267574.503151, type 3 (Absolute), code 0 (X), value 72
Event: time 1289267574.519146, type 3 (Absolute), code 0 (X), value 114
Event: time 1289267574.535152, type 3 (Absolute), code 0 (X), value 176
Event: time 1289267574.551146, type 3 (Absolute), code 0 (X), value 246
Event: time 1289267574.567150, type 3 (Absolute), code 0 (X), value 330
Event: time 1289267574.583147, type 3 (Absolute), code 0 (X), value 394
Event: time 1289267574.599150, type 3 (Absolute), code 0 (X), value 418
Event: time 1289267574.615148, type 3 (Absolute), code 0 (X), value 424
Event: time 1289267574.631149, type 3 (Absolute), code 0 (X), value 432
Event: time 1289267574.647150, type 3 (Absolute), code 0 (X), value 435
Event: time 1289267574.679147, type 3 (Absolute), code 0 (X), value 436
Event: time 1289267574.695145, type 3 (Absolute), code 0 (X), value 438
Event: time 1289267574.727124, type 3 (Absolute), code 0 (X), value 439
Event: time 1289267574.759144, type 3 (Absolute), code 0 (X), value 431
Event: time 1289267574.775145, type 3 (Absolute), code 0 (X), value 415
Event: time 1289267574.791147, type 3 (Absolute), code 0 (X), value 303
Event: time 1289267574.807151, type 3 (Absolute), code 0 (X), value 160
Event: time 1289267574.823145, type 3 (Absolute), code 0 (X), value 101
Event: time 1289267574.839149, type 3 (Absolute), code 0 (X), value 52
Event: time 1289267574.855148, type 3 (Absolute), code 0 (X), value 25

 	So, it seems to me that when the value increases, the pointer moves 
right, but when the value decreases, it moves left.  What I'd like to see is 
for the pointer to move right while the value is positive, and left while it's 
negative.  Is there an option for that?

>> ------------------------------------------------------------
>> Section "InputClass"
>>         Identifier  "SpaceNavigator"
>>         MatchProduct "SpaceNavigator"
>> #       MatchIsJoystick "On"
>>         Driver      "evdev"
>>         Option      "Name"   "3Dconnexion*"
>>         Option      "Pass"   "3"
>>         Option      "Mode"   "Relative"
>>         Option      "XRelativeAxisMap"  "0"
>>         Option      "YRelativeAxisMap"  "1"
>>         Option      "ZRelativeAxisMap"  "2"
>>         Option      "RXRelativeAxisMap" "3"
>>         Option      "RYRelativeAxisMap" "4"
>>         Option      "RZRelativeAxisMap" "5"
>>         Option  "ZRelativeAxisButtons" "off"
>>         Option  "EmulateWheel" "On"
>>         Option  "XAxisMapping" "6 7"
>> EndSection
>> ------------------------------------------------------------
>
> well, of these options only EmulateWheel, Mode and XAxisMapping exist. the
> others aren't interpreted by anything.

 	Ah, I see.  I stole them from http://www.fox-toolkit.org/ but didn't 
realise that they only work if you have the proprietary driver installed.

 	Thanks,


---------------------------------------------------------------------
| Name: Tim Nelson                 | Because the Creator is,        |
| E-mail: wayland at wayland.id.au    | I am                           |
---------------------------------------------------------------------

----BEGIN GEEK CODE BLOCK----
Version 3.12
GCS d+++ s+: a- C++$ U+++$ P+++$ L+++ E- W+ N+ w--- V- 
PE(+) Y+>++ PGP->+++ R(+) !tv b++ DI++++ D G+ e++>++++ h! y-
-----END GEEK CODE BLOCK-----




More information about the xorg mailing list