Re: Wheel mice



Bruce Ide wrote:
> 
> >>>>> "fclose" == fclose  <fclose antisocial com> writes:
> 
> ...
> 
>     fclose> After it, I looked at that wheel and thought about
>     fclose> actually using it. It was not a pleasant task, I must
>     fclose> say. There's a program called IMWheel which translates the
>     fclose> moves of the wheel to PGUP and PGDN keystrokes. It works,
>     fclose> but that's just too fucking ugly.
> 
>     fclose> Then I thought about how to implement it's functionality
>     fclose> in a coller way: the scrollbar widgets, wich is part of
>     fclose> GTK. If you guys look close at a wheel mouse you'll
>     fclose> probably notice that the wheel movement is translated to
>     fclose> buttons 3 and 4 of the mice.
> 
> ...
> 
> I wouldn't say GTK would be the right place to do that. You want it to
> happen at the lowest level possible, or the behavioral inconsistencies
> between your applications WILL drive you crazy.
> 
> If I were looking to implement this stuff natively, I'd do it in the X
> server. Don't they have wheel functionality in Xfree 4.x? Wheel mice
> have been around forever now...

XFree86 4.0.1 supports the wheel reasonably well. Say you have a
3 button mouse with a wheel. You tell the X server (via XF86Config)
that you have a 5 button mouse (2 more than the physical buttons)
then you set the ZAxisMapping to "4 5". Mousewheel up gives button4,
mousewheel down gives button5. Its documented in:

	/usr/X11R6/lib/X11/doc/README.mouse

So you just need a way to bind buttons 4 and 5 for your application.

With a 5 button mouse you tell the server you have 7 buttond: the wheel
becomes buttons 6 and 7.... unless you use xmodmap to juggle the order.
Something like:

	xmodmap -e "pointer = 1 2 3 6 7 4 5"

would place the wheel on buttons 4 and 5, and the thumb buttons on
buttons 6 and 7.

The syntax here is from memory - check the docs.

-Andy

-- 
Andy Walker                              Kvaerner Oil & Gas a.s.
andy lysaker kvaerner no                 P.O. Box 222,
Andrew Walker kvaerner com               N-1324 Lysaker, Norway

   ......if the answer isn't violence, neither is your silence......




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]