[PATCH] If using a clickpad, filter out all left-click events where there's no finger on the trackpad or it's a light touch

Chase Douglas chase.douglas at ubuntu.com
Tue Nov 13 11:34:23 PST 2012


On Fri, Nov 9, 2012 at 11:43 AM, Aaron Westendorf <aaron at agoragames.com>wrote:

> ---
>  src/eventcomm.c |   20 +++++++++++++++++++-
>  1 file changed, 19 insertions(+), 1 deletion(-)
>
> diff --git a/src/eventcomm.c b/src/eventcomm.c
> index b1d5460..09e8a50 100644
> --- a/src/eventcomm.c
> +++ b/src/eventcomm.c
> @@ -652,7 +652,25 @@ EventReadHwState(InputInfoPtr pInfo,
>              v = (ev.value ? TRUE : FALSE);
>              switch (ev.code) {
>              case BTN_LEFT:
> -                hw->left = v;
> +                /**
> +                 * Filter spurious events from the kernel in cases where
> +                 * chassis flex causes it to send a button press event.
> +                 * Ignore clickpad events if nothing was pressed or using
> +                 * !=1 finger with click pressure. There is still a case
> +                 * where resting a finger on the pad and a palm press on
> the
> +                 * keyboard rest will trigger an event and that will pass
> +                 * pass through this filter. TBD on best course of action
> to
> +                 * filter that out, because we want to recognize press
> events
> +                 * to allow mouse movement, but not register as a click.
> The
> +                 * old FingerPress option seems like the right choice but
> +                 * it's been deprecated. Filtering that out could require
> +                 * complicated heuristics, so for now do a reasonable job
> +                 * by insisting that the pressure be at least the value
> +                 * of FingerHigh.
> +                 */
> +                if (para->clickpad!=1 || (hw->numFingers==1 && hw->z >=
> para->finger_high)) {
> +                  hw->left = v;
> +                }
>                  break;
>              case BTN_RIGHT:
>                  hw->right = v;


It's not 100% clear to me the problem you are facing, but I think I get it.
I'll try to restate to verify:

You are having issues where a button press is occurring when the user isn't
actually using the trackpad. You see the issue in your hardware by simply
bending the machine in a specific way. You hope that by filtering out
button presses when no "touch" is active will resolve the issue.

If that's all correct, then this patch looks like a good approach. However,
there is a problem. I own a Dell Mini 1012 netbook with a clickpad. It is
trivially easy, and occurs often in normal use, to depress the clickpad
button without a "touch" being seen. In fact, I believe one of my original
clickpad patches had similar filtering to what you describe, but people
complained that their button presses weren't working.

My first inclination is to say that we can't always fix hardware defects in
software. If bending your laptop causes a spurious click, then stop bending
it :). If you and others feel that this must be fixed, then I think we will
either need a blacklist of machines that should *not* be filtered
(including the Dell netbook), or we will need a whitelist of machines that
*should* be filtered (including your laptop model).

-- Chase
-------------- next part --------------
An HTML attachment was scrubbed...
URL: <http://lists.x.org/archives/xorg-devel/attachments/20121113/8ad82a99/attachment.html>


More information about the xorg-devel mailing list