[PATCH 1/2] Add Clickpad support

Peter Hutterer peter.hutterer at who-t.net
Wed Apr 21 23:56:34 PDT 2010


On Wed, Apr 21, 2010 at 09:28:40AM +0200, Takashi Iwai wrote:
> At Wed, 21 Apr 2010 16:31:29 +1000,
> Peter Hutterer wrote:
> > 
> > On Wed, Apr 21, 2010 at 08:16:40AM +0200, Takashi Iwai wrote:
> > > At Wed, 21 Apr 2010 14:16:41 +1000,
> > > Peter Hutterer wrote:
> > > > 
> > > > Thank you for the patch. Just as a heads-up, I'd like to wait with this
> > > > until there's at least one kernel released with this support.
> > > > My comments to the patch are inline.
> > > 
> > > Thanks for review!
> > > 
> > > > On Thu, Apr 15, 2010 at 06:12:10PM +0200, Takashi Iwai wrote:
> > > > > This patch adds the support for Synaptics Clickpad devices.
> > > > > It requires the change in Linux kernel synaptics input driver, found in
> > > > > 	https://patchwork.kernel.org/patch/92435/
> > > > > 
> > > > > When the kernel driver sets only the left-button bit evbit, Clickpad
> > > > > mode is activated.  In this mode, the bottom touch area is used as
> > > > > button emulations.  Clicking at the bottom-left, bottom-center and
> > > > > bottom-right zone corresponds to a left, center and right click.
> > > > > 
> > > > > There are two new parameters added.  One is a parameter to specify
> > > > > the size of the bottom button-area, and another is to toggle the touch-
> > > > > sensing in the button area.
> > > > > 
> > > > > Signed-off-by: Takashi Iwai <tiwai at suse.de>
> > > > > ---
> > > > >  include/synaptics-properties.h |    6 ++++
> > > > >  man/synaptics.man              |   21 +++++++++++++++
> > > > >  src/eventcomm.c                |   15 ++++++++++
> > > > >  src/properties.c               |   19 +++++++++++++
> > > > >  src/synaptics.c                |   56 ++++++++++++++++++++++++++++++++++++++++
> > > > >  src/synapticsstr.h             |    4 +++
> > > > >  tools/synclient.c              |    2 +
> > > > >  7 files changed, 123 insertions(+), 0 deletions(-)
> > > > > 
> > > > > diff --git a/include/synaptics-properties.h b/include/synaptics-properties.h
> > > > > index cf330d8..c77afd3 100644
> > > > > --- a/include/synaptics-properties.h
> > > > > +++ b/include/synaptics-properties.h
> > > > > @@ -155,4 +155,10 @@
> > > > >  /* 32 bit, 4 values, left, right, top, bottom */
> > > > >  #define SYNAPTICS_PROP_AREA "Synaptics Area"
> > > > >  
> > > > > +/* 8 bit (0-100) */
> > > > > +#define SYNAPTICS_PROP_TOUCH_BUTTON_AREA "Synaptics Touch Button Area"
> > > > 
> > > > > +
> > > > > +/* 8 bit (BOOL) */
> > > > > +#define SYNAPTICS_PROP_TOUCH_BUTTON_SENSE "Synaptics Touch Button Sense"
> > > > > +
> > > > >  #endif /* _SYNAPTICS_PROPERTIES_H_ */
> > > > > diff --git a/man/synaptics.man b/man/synaptics.man
> > > > > index 59fbaac..f92ea0c 100644
> > > > > --- a/man/synaptics.man
> > > > > +++ b/man/synaptics.man
> > > > > @@ -509,6 +509,27 @@ Ignore movements, scrolling and tapping which take place below this edge.
> > > > >  The option is disabled by default and can be enabled by setting the
> > > > >  AreaBottomEdge option to any integer value other than zero. Property: "Synaptics Area"
> > > > >  .
> > > > > +.TP
> > > > > +.BI "Option \*qTouchButtonArea\*q \*q" integer \*q
> > > > > +The percentage of touch-button area of Clickpad device.
> > > > > +.
> > > > > +The synaptics driver supports "ClickZone" mode, which emulates the buttons
> > > > > +to click at the bottom of touchpad area.  This option specifies how large
> > > > > +is the area to be used as the button area.  Passing zero to this disables
> > > > > +the Clickpad behavior.  The default value is 20.
> > > > 
> > > > where does the 0-100 come from? what unit is this? it's answered in the
> > > > header file but this should be in the man page as well.
> > > 
> > > Right.
> > > 
> > > > also, I'd rather have this stored in device units and leave things like
> > > > "this is 20% of the area" to higher-level tools.
> > > 
> > > I don't mind in any way.  Maybe this parameter is rarely changed.
> > > 
> > > > > +Property: "Synaptics Touch Button Area"
> > > > 
> > > > please make this so that the Synaptics Area is re-used instead of
> > > > introducing another area property. This should remove the need for this
> > > > property altogether and just need the enable/disable value in the other one.
> > > 
> > > Do you mean to extend "Synaptics Area" property?
> > > 
> > > I find it might be better to split from Synaptics Area, because this
> > > is pretty specific to Clickpad mode while Synaptics Area is a more
> > > generic one.  But, mixing them up is technically no problem, of
> > > course.
> > 
> > right now, the area detection code won't move the cursor if it's outside of
> > the applicable area. this was essentially added for the touchpads the dell
> > minis had. so as long as you're inside that area the pointer moves and
> > outside nothing happens.
> 
> What about scrolling?  Is the vert/horiz scroll sensed outside the
> synaptics area?

no, it essentially disables all events from that area though there are some
suggestions that the multi-finger information should be kept.

the reason for this behaviour is simple - the touchpads this feature was
designed for send button events as well as motion events when that area of
the touchpad is being pressed. so the easiest solution was to simply disable
the motion events.

feel free to try this with synclient AreaRightEdge=<value>

Cheers,
  Peter


More information about the xorg-devel mailing list