Wheel Mouse on FreeBSD

Matthias Buelow mkb at mukappabeta.de
Tue Jun 3 12:04:11 PDT 2003


Jason Andresen wrote:
> Matthias Buelow wrote:
> 
>> computing at kpfa.org wrote:
>>
>>> ...works for Mozilla, Opera, StarOffice, but not for
>>> XFmail.....Dan.
>>
>>
>>
>> It also doesn't work with Motif etc.  If the toolkit doesn't have 
>> knowledge about using the extra "buttons" for scrolling up/down then 
>> there's nothing the X server can do about it.
> 
> 
> Is there a way to map the wheel to page up/down keystrokes?  Windows 
> does that sometimes.

Hmm, don't know.. one thing you could do, with Xt based toolkits 
(Athena, OpenLook, Motif, etc.), is write translations and actions in 
the the app's X defaults file that, upon the respective button press (4 
or 5) calls the widget's scroll-up/down action procedure, if such one 
exists.  I've done this once for the Motif List widget and it worked 
reasonably well although not quite like in toolkits which have 
wheel-scrolling built in.

For example (refer to man 3 XmList) something like the following 
translation should work to scroll the list down by 3 items (moving the 
list cursor, though, just as if the arrow-down key was pressed):

<Btn5Down>: \
	ListNextItem() \
	ListNextItem() \
	ListNextItem()

I might not have gotten the syntax completely right since I don't have 
any Xt manual around right here but you get the idea.  The translations 
can be specified in the app's defaults file or in your .Xdefaults 
globally using a string value.  Many Xt-derived widgets can be 
programmed from the "outside" this way, including the text widget, 
scroll-bars etc.

-- 
Matthias Buelow
home: mkb/at/mukappabeta.de
uni:  mkb/at/informatik.uni-wuerzburg.de



More information about the freebsd-stable mailing list