Re: Supporting tilt-wheels at the OS level.

From: Last2Know (grokkalot_at_yahoo.com)
Date: 09/15/04


Date: 15 Sep 2004 12:55:41 -0700

Jeff Relf <Usenet_2_@JeffRelf.Cotse.NET> wrote in message news:<_Jeff_Relf_2004_Sep_15_PSWu@Cotse.NET>...
> Hi Last2Know,
>
> Re: Supporting tilt-wheels at the OS level on Linux,
>
> You wrote: <<
>
> In order for that to work
> in a similar way on Linux with X11 apps,
> you need at least the following steps:
>
> 1. A driver that separately reports the stream of
> horizontal tilt events from the mouse to the kernel.
>
> 2. Data structures in the kernel that allow separate
> bookkeeping of two streams of scroll events for a mouse
> ( there is only allowance for one at present ). >>
>
> At the kernel level, or in the kernel itself ?

What do you mean by kernel level and not in the
kernel itself? Whether the functionality is
implemented in the static kernel or a module isn't
relevant to this discussion.

> I assume that the Intellimouse drivers on Win XP
> are simulating clicks on any horizontal scroll bar
> that an app might already have...

I think you assume wrong. According to the docs
I can find on the web, Windows handles wheel mice
basically the same way Linux does at the driver level:

http://www.microsoft.com/whdc/device/input/5b_wheel.mspx

Somebody who has a current MSDN SDK subscription might be
able to tell us how they updated this for the tilt wheel.

> That must be done at the kernel level.

The Linux kernel doesn't know about scroll bars -
it knows about one mouse wheel. The older Win kernels
apparently worked the same way. It's possible
that the newer XP kernels have been updated to know
about more than one wheel, but it's also possible that
they didn't want to go that route in order to allow the
tilt mouse to function with Win98, WinMe, and Win2K.
Have you used your mouse with those systems and gotten
the same behavior? If so, the extra tilt was probably
mapped to a button and then interpreted differently at
the toolkit level. In any case, 'scrollbar' is something
that only makes sense at the GUI toolkit level on both
MS-Win and Linux. In fact, the link I posted suggested
that the horizontal tilt is sometimes matched to "next page"
"prev page" type functionality that may not be represented by
a scroll bar at all.

> Further functionality would require modifications to each app.
>
> It's not enough for a mouse driver to simply
> spit out a stream of left or right tilt events.
>
> There are also user-configurability issues.
>
> But then Linux is not really designed for the common desktop,
> so maybe this is a non-issue.

There are two differences of note here: first, MS, as a
one stop provider of input peripherals, OS platforms,
system libraries, and the leading workflow apps on their
platform has made updates at some or all of these levels
to support this extra horizontal wheel concept; second,
their is just one standard toolkit on the Win32 GUI platform.
But updating Linux to support this would work exactly the same
way - e.g. the tilt gets mapped to some special button presses,
a toolkit maps this to horizontal scroll events at the toolkit
level, and the app handles horizontal scroll events by doing
something appropriate - scrolling, advancing a page, etc.