Debian Codegraph @

doc/user/touchpad-thumb-detection.rst

raw
1 .. _thumb_detection:
2
3 ==============================================================================
4 Thumb detection
5 ==============================================================================
6
7 Thumb detection tries to identify touches triggered by a thumb rather than a
8 pointer-moving finger. This is necessary on :ref:`touchpads_buttons_clickpads`
9 as a finger pressing a button always creates a new touch, causing
10 misinterpretation of gestures. Click-and-drag with two fingers (one holding
11 the button, one moving) would be interpreted as two-finger scrolling without
12 working thumb detection.
13
14 libinput has built-in thumb detection, partially dependent on
15 hardware-specific capabilities.
16
17 - :ref:`thumb_pressure`
18 - :ref:`thumb_areas`
19 - :ref:`thumb_speed`
20
21 Thumb detection uses multiple approaches and the final decision on whether
22 to ignore a thumb depends on the interaction at the time.
23
24 .. _thumb_pressure:
25
26 ------------------------------------------------------------------------------
27 Thumb detection based on pressure or size
28 ------------------------------------------------------------------------------
29
30 The simplest form of thumb detection identifies a touch as thumb when the
31 pressure value goes above a certain threshold. This threshold is usually
32 high enough that it cannot be triggered by a finger movement.
33
34 On touchpads that support the ``ABS_MT_TOUCH_MAJOR`` axes, libinput can perform
35 thumb detection based on the size of the touch ellipse. This works similar to
36 the pressure-based palm detection in that a touch is labelled as palm when
37 it exceeds the (device-specific) touch size threshold.
38
39 Pressure- and size-based thumb detection depends on the location of the
40 thumb and usually only applies within the :ref:`thumb_areas`.
41
42 For some information on how to detect pressure on a touch and debug the
43 pressure ranges, see :ref:`touchpad_pressure`. Pressure- and size-based
44 thumb detection require thresholds set in the :ref:`device-quirks`.
45
46 .. _thumb_areas:
47
48 ------------------------------------------------------------------------------
49 Thumb detection areas
50 ------------------------------------------------------------------------------
51
52 Pressure and size readings are unreliable at the far bottom of the touchpad.
53 A thumb hanging mostly off the touchpad will have a small surface area.
54 libinput has a definitive thumb zone where any touch is considered a
55 thumb. Immediately above that area is the area where libinput will label a
56 thumb as such if the pressure or size thresholds are exceeded.
57
58
59 .. figure:: thumb-detection.svg
60 :align: center
61
62 The picture above shows the two detection areas. In the larger (light red)
63 area, a touch is labelled as thumb when it exceeds a device-specific
64 pressure threshold. In the lower (dark red) area, a touch is always labelled
65 as thumb.
66
67 Moving outside the areas generally releases the thumb from being a thumb.
68
69 .. _thumb_speed:
70
71 ------------------------------------------------------------------------------
72 Thumb movement based on speed
73 ------------------------------------------------------------------------------
74
75 Regular interactions with thumbs do not usually move the thumb. When fingers
76 are moving across the touchpad and a thumb is dropped, this can cause
77 erroneous scroll motion or similar issues. libinput observes the finger
78 motion speed for all touches - where a finger has been moving a newly
79 dropped finger is more likely to be labeled as thumb.
80
81 ------------------------------------------------------------------------------
82 Thumb detection based on finger positions
83 ------------------------------------------------------------------------------
84
85 The shape of the human hand and the interactions that usually involve a
86 thumb imply that a thumb is situated in a specific position relative to
87 other fingers (usually to the side and below). This is used by libinput to
88 detect thumbs during some interactions that do not implicitly require a
89 thumb (e.g. pinch-and-rotate).