Touchpad stylus mode

Albert Cahalan acahalan at gmail.com
Sun Mar 18 13:18:26 EDT 2007


On 3/18/07, Zephaniah E. Hull <warp at aehallh.com> wrote:
> On Sat, Mar 17, 2007 at 11:16:36PM -0400, Albert Cahalan wrote:

> > Mode switches can be disorienting and surprising. There are a
> > number of things that can be done to deal with that:
> >
> > Upon mode switch to stylus mode, one might draw an outline of
> > the stylus device on the screen.
>
> An outline of the stylus drawing area would be useful, however that is
> the wrong point to draw it, IMHO.

It's the right time. The right code might be the window manager,
the X server, or something else.

> > Preventing sudden pointer movement on mode switch is critical.
> > To the raw stylus data, subtract the initial (post-mode-switch)
> > stylus data and add the pre-mode-switch screen location.
>
> That roughly describes how we use the GS as a relative device, it is
> useful for moving the cursor around for use on menus, however the PT
> sensor is there for use with drawing, that _absolutely_ requires that
> there be jumps when you lift the stylus and move it to another point on
> the touchpad.

You're not immediately post-mode-switch when you place the
stylus for a second time, so there would be the expected jump.
The initial stylus data is only determined from stylus input that
immediately follows finger input.

> Please keep in mind, the GS sensor is not usable at all while in PT
> mode, and the only indication that we have that we may wish to go back
> to GS mode is the device indicating that there is no longer a stylus
> touching the touchpad.  Thus, every lift and move to another position is
> going to involve a mode switch to GS, then a mode switch to PT.

That is a bad time for the mode switch. Mode switches should only
happen when there is both activity on the non-active device and
inactivity on the active device. If there is activity on both devices,
the inactive one gets ignored.

So, when in stylus mode, you should remain there until there is
finger movement without stylus pressure. When in finger mode,
you should remain there until there is stylus pressure without any
finger detection.



More information about the Devel mailing list