ZAxisMapping causing trouble

Kean Johnston kean at armory.com
Wed Nov 9 10:00:12 PST 2005


> I, personally, would vote for this approach, and it seems to me that
> would include your (hard coded AFAICS) mapping in the OS-layer as well.
> Or did I missread something and wheel events are mapped to different
> buttons than 4 + 5 in your code? I don't know your OS...
Yes. On OSR5, for example, wheel forward is button 7 and wheel
back is button 8. So I have to create an InputDevice map that
maps those buttons to 4 and 5, else just about everything breaks.

> One could argue about that, but in general I do not like fixed
> constants.  Maybe someone wants the wheel to generate mouse button 1 and
> 2 events (sounds insane, I know, I only noticed that the mouse driver
> had bugs here and checked this out for testing ;)
The mouse driver has bugs? :) Bite your tongue lol.

> It's just that 4 + 5 turned out to be default, because in former times
> mice only had three buttons. Yes, I don't like this approach myself, but
> there are too many hardcoded applications out there now so we cannot
> easily change the default (or even change to something sane like a
> different type of event).
Right. Thats exactly why I needed to do that map between buttons
7 and 8 to 4 and 5, for that exact reason.

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.

That's my understanding of it. Turns out, that understanding is
flawed. To get wheel mice to work I had to do one of two things:
1. Remove the default ZAxisMapping
2. Change the default on my platform to read: 7 8 4 5

Since ALana said he only recently added the ZAxisMapping default,
I figured it wasnt a big deal to remove it again.

Kean
-- 
Deckard: "I don't work here anymore. Give it to Holden. He's good."
Bryant : "I did. He can breathe okay as long as nobody unplugs him."
       --- Bladerunner



More information about the xorg mailing list