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