ZAxisMapping causing trouble

Matthias Hopf mhopf at suse.de
Wed Nov 9 09:17:56 PST 2005


On Nov 09, 05 08:19:25 -0800, Kean Johnston wrote:
> >No, please let the default setting. Mouse button events 4 + 5 are the
> >default buttons understood by applications for mouse wheels.
> The problem with teh way things were is that the default string
> was overriding the os-support layers ability to correctly map
> the buttons. Also, it was setting the default in the wrong place.

I'm not exactly sure whether mouse button reordering and wheel remapping
should be OS dependend, as applications tend to be the same (like
firefox). I don't know enough about default settings on other OSes,
though, to have any really valid opinion.

> I have no issue with teh configuration code writing out a default
> entry to the xorg.conf file, but the way things were, if you removed
> the ZAxisMapping line from that file, presumably becuase it was
> causing trouble, then having that default string would re-instate
> the settings behind your back, and in fact there ends up being no
> way to get rid of it.

The way it was in the code was certainly wrong. You should never obscure
any feature (real mouse buttons 4+5) by enabling another (wheel).
We could now easily set the default to having "4 5 6 7" as mouse wheel
buttons again, and have button mapping default to shift buttons >=4 by 4
to the right. I actually had this in the code, but reverted to a 1-to-1
mapping to reflect the recent change in ZAxisMapping.

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...

> >No, please let the default setting. Mouse button events 4 + 5 are the
> >default buttons understood by applications for mouse wheels.
> Also ... if that is true, that applications expect buttons 4 and
> 5 as wheel movement, you dont really need a ZAxisMapping setting
> in the first place, or do you?

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 ;)

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).

CU

Matthias

-- 
Matthias Hopf <mhopf at suse.de>       __        __   __
Maxfeldstr. 5 / 90409 Nuernberg    (_   | |  (_   |__         mat at mshopf.de
Phone +49-911-74053-715            __)  |_|  __)  |__  labs   www.mshopf.de



More information about the xorg mailing list