ZAxisMapping causing trouble

Alan Coopersmith Alan.Coopersmith at Sun.COM
Wed Nov 9 11:25:29 PST 2005


Kean Johnston wrote:
> In thinking about this though, I am curious about the interaction
> between the InputDevice map array and ZAxisMapping. In fact, it should
> have wroked the way the code was, but didn't seem to. Here's how
> I *think* it should work:
> 
> 1. User presses wheel forward (button 7 on my OS)
> 2. OS dependentant layer has mapped that to button 4
> 3. What *should* be posted is a Button 4 press event (followed
>    by the fake release event).
> 4. The rest of the code should see button 4 has been pressed
> 5. ZAxisMapping, if set to its default of '4 5 6 7" should take
>    button4 to be scroll forward.

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.

-- 
	-Alan Coopersmith-           alan.coopersmith at sun.com
	 Sun Microsystems, Inc. - X Window System Engineering



More information about the xorg mailing list