Substituting a mouse button for a mouse wheel?

Matthias Hopf mhopf at suse.de
Wed May 16 09:52:55 PDT 2007


On May 15, 07 17:51:39 -0700, walt wrote:
> xev tells me that those two small buttons are buttons 8 and 9,
> for reasons I don't know.

Logical buttons. Read the man page, the section about "ButtonMapping".

> When I use ZAxisMapping "8 9" then xev senses no events at all
> when pressing the buttons, and no scrolling takes place.

ZAxismapping translates wheel events into mouse button events, not the
other way round.

You want to use
   EmulateWheel yes
   EmulateWheelButton 4
to emulate the wheel by pressing one of these small buttons and moving
the mouse.

Use
   ZAxisMapping ""
   ButtonMapping "1 2 3 4 5"
to use the two buttons instead of a wheel. You might need to usei
"1 2 3 5 4" if order is reversed.

> But, when I do xmodmap -e "pointer = 1 2 3 6 7 8 9 4 5" and
> then use ZAxisMapping "4 5" the scrolling works.

Yes, by just reversing the mouse logic. It would work w/o ZAxisMapping
as well.

> Only one problem left:  each button click generates one event,
> and so I need to click the button multiple times to get any
> scrolling done.  Is there a way to make a sustained button
> click generate multiple events, the way a keypress does?

Only by EmulateWheel. There's no ButtonRepeat or so. Might be an idea to
implement that, but so far nobody asked.

HTH

Matthias

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



More information about the xorg mailing list