clickpad-softbuttons.rst 6.0 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566676869707172737475767778798081828384858687888990919293949596979899100101102103104105106107108109110111112113114115116117118119120121122123124125126127128129130131132133134135136137138139140141142143144
  1. .. _clickpad_softbuttons:
  2. ==============================================================================
  3. Clickpad software button behavior
  4. ==============================================================================
  5. "Clickpads" are touchpads without separate physical buttons. Instead, the
  6. whole touchpad acts as a button and left or right button clicks are
  7. distinguished by :ref:`the location of the fingers <software_buttons>` or
  8. the :ref:`number of fingers on the touchpad <clickfinger>`.
  9. "ClickPad" is a trademark by `Synaptics Inc. <http://www.synaptics.com/en/clickpad.php>`_
  10. but for simplicity we refer to any touchpad with the above feature as Clickpad,
  11. regardless of the manufacturer.
  12. The kernel marks clickpads with the
  13. `INPUT_PROP_BUTTONPAD <https://www.kernel.org/doc/Documentation/input/event-codes.txt>`_
  14. property. Without this property, libinput would not know whether a touchpad
  15. is a clickpad or not. To perform a right-click on a Clickpad, libinput
  16. provides :ref:`software_buttons` and :ref:`clickfinger`.
  17. .. note:: The term "click" refers refer to a physical button press
  18. and/or release of the touchpad, the term "button event" refers to
  19. the events generated by libinput in response to a click.
  20. .. _software_buttons:
  21. ------------------------------------------------------------------------------
  22. Software button areas
  23. ------------------------------------------------------------------------------
  24. The bottom of the touchpad is split into three distinct areas generate left,
  25. middle or right button events on click. The height of the button area
  26. depends on the hardware but is usually around 10mm.
  27. .. figure :: software-buttons-visualized.svg
  28. :align: center
  29. The locations of the virtual button areas.
  30. Left, right and middle button events can be triggered as follows:
  31. - if a finger is in the main area or the left button area, a click generates
  32. left button events.
  33. - if a finger is in the right area, a click generates right button events.
  34. - if a finger is in the middle area, a click generates middle button events.
  35. .. figure:: software-buttons.svg
  36. :align: center
  37. Left, right and middle-button click with software button areas
  38. The middle button is always centered on the touchpad and smaller in size
  39. than the left or right button. The actual size is device-dependent. Many
  40. touchpads do not have visible markings so the exact location of the button
  41. is unfortunately not visibly obvious.
  42. .. note:: If :ref:`middle button emulation <middle_button_emulation>` is
  43. enabled on a clickpad, only left and right button areas are
  44. available.
  45. If fingers are down in the main area in addition to fingers in the
  46. left or right button area, those fingers are ignored.
  47. A release event always releases the buttons logically down, regardless of
  48. the current finger position
  49. .. figure:: software-buttons-thumbpress.svg
  50. :align: center
  51. Only the location of the thumb determines whether it is a left, right or
  52. middle click.
  53. The movement of a finger can alter the button area behavior:
  54. - if a finger starts in the main area and moves into the software button
  55. area, the software buttons do not apply to that finger
  56. - once a finger has moved out of the button area, it cannot move back in and
  57. trigger a right or middle button event
  58. - a finger moving within the software button area does not move the pointer
  59. - once a finger moves out of the button area it will control the
  60. pointer (this only applies if there is no other finger down on the
  61. touchpad)
  62. .. figure:: software-buttons-conditions.svg
  63. :align: center
  64. **Left:** moving a finger into the right button area does not trigger a
  65. right-button click.
  66. **Right:** moving within the button areas does not generate pointer
  67. motion.
  68. On some touchpads, notably the 2015 Lenovo X1 Carbon 3rd series, the very
  69. bottom end of the touchpad is outside of the sensor range but it is possible
  70. to trigger a physical click there. To libinput, the click merely shows up as
  71. a left button click without any positional finger data and it is
  72. impossible to determine whether it is a left or a right click. libinput
  73. ignores such button clicks, this behavior is intentional.
  74. .. _clickfinger:
  75. ------------------------------------------------------------------------------
  76. Clickfinger behavior
  77. ------------------------------------------------------------------------------
  78. This is the default behavior on Apple touchpads. Here, a left, right, middle
  79. button event is generated when one, two, or three fingers are held down on the
  80. touchpad when a physical click is generated, given the default mapping. The
  81. location of the fingers does not matter and there are no software-defined
  82. button areas. It is possible to swap right and middle buttons, the same way as
  83. with :ref:`tapping <tapping>`.
  84. .. figure:: clickfinger.svg
  85. :align: center
  86. One, two and three-finger click with Clickfinger behavior
  87. On some touchpads, libinput imposes a limit on how the fingers may be placed
  88. on the touchpad. In the most common use-case this allows for a user to
  89. trigger a click with the thumb while leaving the pointer-moving finger on
  90. the touchpad.
  91. .. figure:: clickfinger-distance.svg
  92. :align: center
  93. Illustration of the distance detection algorithm
  94. In the illustration above the red area marks the proximity area around the
  95. first finger. Since the thumb is outside of that area libinput considers the
  96. click a single-finger click rather than a two-finger click.
  97. .. _special_clickpads:
  98. ------------------------------------------------------------------------------
  99. Special Clickpads
  100. ------------------------------------------------------------------------------
  101. The Lenovo \*40 series laptops have a clickpad that provides two software button sections, one at
  102. the top and one at the bottom. See :ref:`Lenovo \*40 series touchpad support <t440_support>`
  103. for details on the top software button.
  104. Some Clickpads, notably some Cypress ones, perform right button detection in
  105. firmware and appear to userspace as if the touchpad had physical buttons.
  106. While physically clickpads, these are not handled by the software and
  107. treated like traditional touchpads.