summaryrefslogtreecommitdiff
path: root/doc/touchpad-tap-state-machine.svg
AgeCommit message (Collapse)AuthorFilesLines
2016-01-27touchpad: add a config option to disable tap-and-dragPeter Hutterer1-712/+755
There are a number of use-cases where tapping may be desirable, but tap-and-drag is not, e.g. where tapping is used to select multiple items in a list. Having tap-and-drag on hinders this, and the nature of the interaction means it cannot be detected based on timeouts, movement thresholds, etc. Provide an option instead to turn tap-an-drag off. Tap-and-drag remains enabled by default (though tapping is disabled by default). For the touchpad tap state diagram, the new option disables the transition from state TOUCH to state TAPPED and releases the button immediately instead. This means that multitap-and-drag is disabled too since we now just loop around in the single-tap state for multitap. It also makes tapping more responsive - we don't have to wait for the timeout before we know whether it's a tap event. The first touch time is noted, we now send the button press with the time of the first touch and the release with the time of the release. This ensures a realistic time diff between the two events. https://bugs.freedesktop.org/show_bug.cgi?id=93502 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.netto> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-09-19touchpad: fix the number of button clicks in multitapPeter Hutterer1-759/+706
tap-tap-down-move should emit 1 click + press, not 2 clicks + press https://bugs.freedesktop.org/show_bug.cgi?id=92016 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-09-07touchpad: don't tap for 2fg down, followed by a single finger upPeter Hutterer1-96/+158
The following sequence currently generates a right-button event: finger 1 down finger 2 down finger 1 up finger 2 held down This is easily triggered with short scroll events. There are two issues here: first is that the tapping code elsewhere treats any tap with a second finger down as a left-button tap, not a right button one. So if anything, we should generate a left button click here, not a right button click. Arguably, generating a button click here is wrong though, it's not a very well defined sequence and relatively difficult to trigger intentionally. So the best solution here is to simply ignore the release event and move straight back to state HOLD - unless the second finger is released within the timeout. If the finger is set down again during the timeout, we move straight to TOUCH_2_HOLD - this could eventually be interpreted as a tap, but not for now. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-07-09touchpad: work thumb detection into the tap state machinePeter Hutterer1-0/+18
Most thumbs are detected a few events into the sequence. Work this into parts of the tapping state machine. Only the most common use-case is handled here - if the first finger ends up being marked as a thumb, we return to the idle state and ignore that touch sequence. At any other state, we handle thumbs like any other finger. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-06-23touchpad: hook up drag lock configurationPeter Hutterer1-343/+385
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2015-05-18touchpad: end tap-and-drag with an extra tapVelimir Lisec1-216/+263
Currently for the tap-and-drag gesture to end user has to wait for a timeout to expire. Make it possible to end the drag gesture by just tapping. The allowed finger sequences to start and end a drag are thus: tap, down, .... move ...., up <wait for timeout> tap, down, .... move ...., up, tap https://bugs.freedesktop.org/show_bug.cgi?id=90255 Signed-off-by: Velimir Lisec <lisec.velimir@gmail.com> Reviewed-by: Peter Hutterer <peter.hutterer@who-t.net> State diagram changes and a doc change squashed in. Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
2015-04-17touchpad: introduce MULTITAP for multi-tap-and-dragPeter Hutterer1-627/+965
Once we have a doubletap, enter a loop in the state machine where we can tap multiple times and either get a multi-click or a multi-click drag-and-drop. The sequence down/up down/up down/up produces a triple-click. The sequence down/up down/up down/up down produces a triple-click with a button down for dragging. Yes, that glorious octuple-tap-and-drag, it is now possible. World domination has been achieved, thank you for playing. We don't know when we finish tapping now, so add a timeout to send the last click event once the finger has been released for the last time. This guarantees that the timestamp of the last button down is later than the last release. This avoids the bug fixed in synaptics commit xf86-input-synaptics-1.8.0-21-g37d34f0 (some application don't handle doubletap correctly without the timestamps). This works for double-tap immediately, for multi-tap we need to remember the timestamp of the first press event and use it for the release event so that there's a forced gap between the release and the second press. https://bugs.freedesktop.org/show_bug.cgi?id=89511 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-09-02touchpad: Only break out of tap FSM for clickpad button pressesJonas Ådahl1-567/+567
It should be possible to initiate a drag by tapping-drag, but continue it by pressing a physical button continuing to drag by subsequent finger motions. As the generic evdev layer helps us ignore multiple button presses we can have the tap machine run completely separate from and uneffected by regular physical button presses, making the tap FSM much simpler than adding new states for handling button presse life times from outside of the tap state machine. A touchpad test is updated to test click while tapping instead of tap FSM break out. The updated test is re-added but only for clickpads only. The tap FSM svg is updated to say "clickpad button press" instead of "phys button press". Signed-off-by: Jonas Ådahl <jadahl@gmail.com> Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-07-02touchpad: disable tapping for fingers exceeding the timeout/motion thresholdPeter Hutterer1-771/+756
The current code triggers multi-finger tapping even if the finger released was previously held on the touchpad for a while. For an event sequence of: 1. first finger down 2. first finger move past threshold/wait past timeout 3. second finger down 4. first finger up The second finger initiates the two-finger tap state, but the button event is sent when the first finger releases - despite that finger not meeting the usual tap constraints. This sequence can happen whenever a user swaps fingers. Add the finger state to the actual touchpoints and update them whenever the constrains are broken. Then, discard button events if the respective touch did not meet the conditions. http://bugs.freedesktop.org/76760 Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net> Reviewed-by: Hans de Goede <hdegoede@redhat.com>
2014-03-24touchpad: add support for multi-finger tappingPeter Hutterer1-0/+771
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>