ZAxisMapping causing trouble

Kean Johnston kean at armory.com
Wed Nov 9 14:03:20 PST 2005


> Hmm, that's not quite how I did it on Solaris, but the Solaris mouse
> driver reports wheel events with separate event ids, not mapped to
> buttons already, so in my case it was:
> 
> 1. User rolls wheel  - Xorg reads VUID_WHEEL event from /dev/mouse
> 2. OS dependent layer reports wheel event as Z axis delta to
>     pMse->PostEvent (or W axis for the second wheel if present/suppoted)
> 3. OS independent layer maps Z axis delta to buttons specified by
>     ZAxisMapping
> 4. Application sees buttons 4/5/6/7 as appropriate.
> 
> The BSD wscons mouse code appears to be similar (wsconsReadInput) - I
> haven't checked the other OS'es.

Ok I completely misunderstood the purpose of ZAxisMapping, and now
that I see what it is *really* doing, I can do the following in both
the SCO and USL bits:

1. User rolls wheel, sending button events 7 and 8
2. I mask off teh button events in teh call to PostEvent and instead
    pass in a Z axis movement of +1 or -1 (are those the ideal values?
    before this final patch I had code that used a new mouse option
    called WheelResolution that was teh value I passed in on the Z
    axis).
3. OS independentant bit maps Z axis delta to buttons as specified
    by ZAxisMapping
4. Application sees buttons 4/5/6/7 as aoopropriate.

I can craft this up lickety-split, if I still have time before the
freeze for RC2.

Kean



More information about the xorg mailing list