Bug 90261 - Clickfinger behavior generates scroll events for some actions
Summary: Clickfinger behavior generates scroll events for some actions
Status: RESOLVED FIXED
Alias: None
Product: Wayland
Classification: Unclassified
Component: libinput (show other bugs)
Version: unspecified
Hardware: All All
: medium enhancement
Assignee: Wayland bug list
QA Contact:
URL:
Whiteboard:
Keywords:
Depends on: 90526 90528
Blocks:
  Show dependency treegraph
 
Reported: 2015-04-30 23:00 UTC by César Izurieta
Modified: 2015-07-09 02:47 UTC (History)
1 user (show)

See Also:
i915 platform:
i915 features:


Attachments
Index finger start drag with thumb click (120.25 KB, text/plain)
2015-05-07 00:57 UTC, César Izurieta
Details
Index finger start drag with thumb click scroll at end (211.07 KB, text/plain)
2015-05-07 00:59 UTC, César Izurieta
Details
Move cursor with thumb finger resting (109.43 KB, text/plain)
2015-05-07 01:00 UTC, César Izurieta
Details
0001-touchpad-add-pressure-based-thumb-detection.patch (10.22 KB, patch)
2015-07-03 04:24 UTC, Peter Hutterer
Details | Splinter Review

Description César Izurieta 2015-04-30 23:00:00 UTC
When trying to click and drag, or select text, on a MacBook trackpad, the usual method is to click with the thumb in the lower part of the trackpad and use the index finger to drag or select text. This works partially with libinput. There are some cases where it doesn't work and a (two-finger) scroll event is generated.

1) When is it working:

* Move the cursor with the index finger to the initial position
* Raise the index finger from the trackpad
* Click with the thumb on the lower part of the trackpad
* Touch again with the index finger and move to drag => OK

2) When it doesn't work:

* Move the cursor with the index finger to the initial position
* Keep the index finger on the trackpad (do not raise it)
* Click with the thumb on the lower part of the trackpad
* Move the index finger to drag => a scroll event is generated

3) Another case that generates a scroll event is the following:

* Repeat the same steps as 1)
* Without raising the finger, release the thumb finger click (keep the finger touching the trackpad)
* Move the index finger => a scroll event is generated

I believe that the right behavior might be to ignore a thumb finger in the lower part of the trackpad at all times. Detecting a thumb finger might not be feasible but some ideas come to mind (similar to how the palm detection works):

* Check the lower 20% of the trackpad only
* A finger in that area that doesn't move vertically (or move little) should be ignored
* A finger that moves from that area vertically should generate move events
* Maybe scroll events should be generated if both fingers move.

There's some more information on how OS X handles that in the "Finger position while tracking" section on the trackpad user guide at https://support.apple.com/en-us/HT201849
Comment 1 Peter Hutterer 2015-05-01 06:39:57 UTC
pls list what version of libinput this happens with, just in case. Also can you record evemu sequences that reproduce these issues please (one recording per issue). makes it a lot easier to debug and figure out a test case for it later. thanks.
Comment 2 César Izurieta 2015-05-07 00:57:13 UTC
Created attachment 115608 [details]
Index finger start drag with thumb click

The following movements where executed:

* Using the index finger move the cursor to the drag start position
* Keep the finger on the trackpad
* Click with the thumb finger in the lower part of the trackpad

RESULT: Generated secondary click
EXPECTED: Start dragging
Comment 3 César Izurieta 2015-05-07 00:59:25 UTC
Created attachment 115609 [details]
Index finger start drag with thumb click scroll at end

The following movements where executed:

* Using the index finger move the cursor to the drag start position
* Lift the finger on the trackpad (in contrast to the drag-1.events where the finger is kept on the trackpad)
* Click with the thumb finger in the lower part of the trackpad
* Keep thumb finger clicking
* Touch and drag with index finger to target position
* Lift thumb finger to end click but keep it touching the trackpad
* Move index finger

RESULT: Generated scroll event
EXPECTED: Pointer movement
Comment 4 César Izurieta 2015-05-07 01:00:56 UTC
Created attachment 115610 [details]
Move cursor with thumb finger resting

The following movements where executed:

* Place thumb finger on the trackpad in the lower part
* Place and move index finger

RESULT: Generated scroll event
EXPECTED: Pointer movement
Comment 5 César Izurieta 2015-05-07 01:02:12 UTC
I'm using libinput10-0.15-33.1.x86_64 from openSUSE Tumbleweed X11 Wayland repository at http://download.opensuse.org/repositories/X11:/Wayland/openSUSE_Factory/
Comment 6 Peter Hutterer 2015-05-20 05:20:28 UTC
sorry about the delay, I was on vacation.

I filed Bug 90526 for the thumb-click from comment #2, please cc yourself on that.
I filed Bug 90527 for the thumb-rest issue from comment #4, please cc yourself on that.

Your comment #3 is a version of Bug 90527, but may be solved differently, I'm not sure yet. So let's leave this bug here for that case only (clicking, resting after a click) and let's handle the other bugs separately from that.
Comment 7 Peter Hutterer 2015-07-03 04:24:44 UTC
Created attachment 116905 [details] [review]
0001-touchpad-add-pressure-based-thumb-detection.patch

preliminary patch. not the final version yet, there'll be a few tweaks to it and it requires the touchpad-gestures branch to be merged first (which should happen next week)
Comment 8 Peter Hutterer 2015-07-09 02:47:51 UTC
ommit 3dcf28b919ae598506852b408829a6627168e803
Author: Peter Hutterer <peter.hutterer@who-t.net>
Date:   Wed May 27 18:25:49 2015 +1000

    touchpad: add pressure-based thumb-detection


Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.