touchpad-thumb-detection.rst 3.9 KB

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