2018-07-10 17:32:35 +10:00
|
|
|
.. _clickpad_softbuttons:
|
|
|
|
|
|
|
|
|
|
==============================================================================
|
|
|
|
|
Clickpad software button behavior
|
|
|
|
|
==============================================================================
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
"Clickpads" are touchpads without separate physical buttons. Instead, the
|
|
|
|
|
whole touchpad acts as a button and left or right button clicks are
|
|
|
|
|
distinguished by :ref:`the location of the fingers <software_buttons>` or
|
|
|
|
|
the :ref:`number of fingers on the touchpad <clickfinger>`.
|
|
|
|
|
"ClickPad" is a trademark by `Synaptics Inc. <http://www.synaptics.com/en/clickpad.php>`_
|
2018-07-24 11:56:13 +10:00
|
|
|
but for simplicity we refer to any touchpad with the above feature as Clickpad,
|
|
|
|
|
regardless of the manufacturer.
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
The kernel marks clickpads with the
|
2018-07-10 17:32:35 +10:00
|
|
|
`INPUT_PROP_BUTTONPAD <https://www.kernel.org/doc/Documentation/input/event-codes.txt>`_
|
2018-07-31 18:17:48 +10:00
|
|
|
property. Without this property, libinput would not know whether a touchpad
|
|
|
|
|
is a clickpad or not. To perform a right-click on a Clickpad, libinput
|
|
|
|
|
provides :ref:`software_buttons` and :ref:`clickfinger`.
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
.. note:: The term "click" refers refer to a physical button press
|
|
|
|
|
and/or release of the touchpad, the term "button event" refers to
|
|
|
|
|
the events generated by libinput in response to a click.
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. _software_buttons:
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
Software button areas
|
|
|
|
|
------------------------------------------------------------------------------
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
The bottom of the touchpad is split into three distinct areas generate left,
|
|
|
|
|
middle or right button events on click. The height of the button area
|
|
|
|
|
depends on the hardware but is usually around 10mm.
|
|
|
|
|
|
|
|
|
|
.. figure :: software-buttons-visualized.svg
|
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
|
|
The locations of the virtual button areas.
|
|
|
|
|
|
2014-12-18 10:49:58 -08:00
|
|
|
|
2014-12-22 10:04:58 +10:00
|
|
|
Left, right and middle button events can be triggered as follows:
|
2018-07-24 11:25:16 +10:00
|
|
|
|
2014-12-22 10:04:58 +10:00
|
|
|
- if a finger is in the main area or the left button area, a click generates
|
|
|
|
|
left button events.
|
|
|
|
|
- if a finger is in the right area, a click generates right button events.
|
2016-04-04 10:06:36 +10:00
|
|
|
- if a finger is in the middle area, a click generates middle button events.
|
|
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. figure:: software-buttons.svg
|
|
|
|
|
:align: center
|
2015-05-28 10:46:02 +10:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
Left, right and middle-button click with software button areas
|
|
|
|
|
|
|
|
|
|
The middle button is always centered on the touchpad and smaller in size
|
|
|
|
|
than the left or right button. The actual size is device-dependent. Many
|
|
|
|
|
touchpads do not have visible markings so the exact location of the button
|
|
|
|
|
is unfortunately not visibly obvious.
|
2018-07-10 17:32:35 +10:00
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
.. note:: If :ref:`middle button emulation <middle_button_emulation>` is
|
|
|
|
|
enabled on a clickpad, only left and right button areas are
|
|
|
|
|
available.
|
2016-06-30 15:49:40 +10:00
|
|
|
|
2014-12-22 10:04:58 +10:00
|
|
|
If fingers are down in the main area in addition to fingers in the
|
|
|
|
|
left or right button area, those fingers are are ignored.
|
|
|
|
|
A release event always releases the buttons logically down, regardless of
|
|
|
|
|
the current finger position
|
|
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
.. figure:: software-buttons-thumbpress.svg
|
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
|
|
Only the location of the thumb determines whether it is a left, right or
|
|
|
|
|
middle click.
|
|
|
|
|
|
2014-12-22 10:04:58 +10:00
|
|
|
The movement of a finger can alter the button area behavior:
|
2018-07-24 11:25:16 +10:00
|
|
|
|
2014-12-22 10:04:58 +10:00
|
|
|
- if a finger starts in the main area and moves into the software button
|
|
|
|
|
area, the software buttons do not apply to that finger
|
2014-12-18 10:49:58 -08:00
|
|
|
- once a finger has moved out of the button area, it cannot move back in and
|
2014-12-22 10:04:58 +10:00
|
|
|
trigger a right or middle button event
|
2018-07-31 18:17:48 +10:00
|
|
|
- a finger moving within the software button area does not move the pointer
|
|
|
|
|
- once a finger moves out out of the button area it will control the
|
|
|
|
|
pointer (this only applies if there is no other finger down on the
|
|
|
|
|
touchpad)
|
|
|
|
|
|
|
|
|
|
.. figure:: software-buttons-conditions.svg
|
|
|
|
|
:align: center
|
|
|
|
|
|
|
|
|
|
**Left:** moving a finger into the right button area does not trigger a
|
|
|
|
|
right-button click.
|
|
|
|
|
**Right:** moving within the button areas does not generate pointer
|
|
|
|
|
motion.
|
2014-12-22 10:04:58 +10:00
|
|
|
|
2015-02-06 14:32:05 +10:00
|
|
|
On some touchpads, notably the 2015 Lenovo X1 Carbon 3rd series, the very
|
|
|
|
|
bottom end of the touchpad is outside of the sensor range but it is possible
|
|
|
|
|
to trigger a physical click there. To libinput, the click merely shows up as
|
|
|
|
|
a left button click without any positional finger data and it is
|
|
|
|
|
impossible to determine whether it is a left or a right click. libinput
|
|
|
|
|
ignores such button clicks, this behavior is intentional.
|
|
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. _clickfinger:
|
|
|
|
|
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
Clickfinger behavior
|
|
|
|
|
------------------------------------------------------------------------------
|
2014-12-22 10:04:58 +10:00
|
|
|
|
2024-04-09 18:46:42 -03:00
|
|
|
This is the default behavior on Apple touchpads. Here, a left, right, middle
|
|
|
|
|
button event is generated when one, two, or three fingers are held down on the
|
|
|
|
|
touchpad when a physical click is generated, given the default mapping. The
|
|
|
|
|
location of the fingers does not matter and there are no software-defined
|
|
|
|
|
button areas. It is possible to swap right and middle buttons, the same way as
|
|
|
|
|
with :ref:`tapping <tapping>`.
|
2014-12-22 10:04:58 +10:00
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. figure:: clickfinger.svg
|
|
|
|
|
:align: center
|
|
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
One, two and three-finger click with Clickfinger behavior
|
2015-05-28 10:46:02 +10:00
|
|
|
|
2015-06-03 12:15:51 +10:00
|
|
|
On some touchpads, libinput imposes a limit on how the fingers may be placed
|
|
|
|
|
on the touchpad. In the most common use-case this allows for a user to
|
|
|
|
|
trigger a click with the thumb while leaving the pointer-moving finger on
|
|
|
|
|
the touchpad.
|
|
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. figure:: clickfinger-distance.svg
|
|
|
|
|
:align: center
|
|
|
|
|
|
2018-07-31 18:17:48 +10:00
|
|
|
Illustration of the distance detection algorithm
|
2015-06-03 12:15:51 +10:00
|
|
|
|
|
|
|
|
In the illustration above the red area marks the proximity area around the
|
|
|
|
|
first finger. Since the thumb is outside of that area libinput considers the
|
|
|
|
|
click a single-finger click rather than a two-finger click.
|
2014-12-22 10:04:58 +10:00
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
.. _special_clickpads:
|
2014-12-22 10:04:58 +10:00
|
|
|
|
2018-07-10 17:32:35 +10:00
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
Special Clickpads
|
|
|
|
|
------------------------------------------------------------------------------
|
|
|
|
|
|
|
|
|
|
The Lenovo \*40 series laptops have a clickpad that provides two software button sections, one at
|
|
|
|
|
the top and one at the bottom. See :ref:`Lenovo \*40 series touchpad support <t440_support>`
|
2014-12-22 10:04:58 +10:00
|
|
|
for details on the top software button.
|
|
|
|
|
|
|
|
|
|
Some Clickpads, notably some Cypress ones, perform right button detection in
|
|
|
|
|
firmware and appear to userspace as if the touchpad had physical buttons.
|
|
|
|
|
While physically clickpads, these are not handled by the software and
|
|
|
|
|
treated like traditional touchpads.
|