Tap-to-click configuration

Enumerations

enum  libinput_config_tap_state { LIBINPUT_CONFIG_TAP_DISABLED, LIBINPUT_CONFIG_TAP_ENABLED }
 

Functions

int libinput_device_config_tap_get_finger_count (struct libinput_device *device)
 Check if the device supports tap-to-click and how many fingers can be used for tapping. More...
 
enum libinput_config_status libinput_device_config_tap_set_enabled (struct libinput_device *device, enum libinput_config_tap_state enable)
 Enable or disable tap-to-click on this device, with a default mapping of 1, 2, 3 finger tap mapping to left, right, middle click, respectively. More...
 
enum libinput_config_tap_state libinput_device_config_tap_get_enabled (struct libinput_device *device)
 Check if tap-to-click is enabled on this device. More...
 
enum libinput_config_tap_state libinput_device_config_tap_get_default_enabled (struct libinput_device *device)
 Return the default setting for whether tap-to-click is enabled on this device. More...
 
enum libinput_config_status libinput_device_config_tap_set_drag_enabled (struct libinput_device *device, enum libinput_config_drag_state enable)
 Enable or disable tap-and-drag on this device. More...
 
enum libinput_config_drag_state libinput_device_config_tap_get_drag_enabled (struct libinput_device *device)
 Return whether tap-and-drag is enabled or disabled on this device. More...
 
enum libinput_config_drag_state libinput_device_config_tap_get_default_drag_enabled (struct libinput_device *device)
 Return whether tap-and-drag is enabled or disabled by default on this device. More...
 
enum libinput_config_status libinput_device_config_tap_set_drag_lock_enabled (struct libinput_device *device, enum libinput_config_drag_lock_state enable)
 Enable or disable drag-lock during tapping on this device. More...
 
enum libinput_config_drag_lock_state libinput_device_config_tap_get_drag_lock_enabled (struct libinput_device *device)
 Check if drag-lock during tapping is enabled on this device. More...
 
enum libinput_config_drag_lock_state libinput_device_config_tap_get_default_drag_lock_enabled (struct libinput_device *device)
 Check if drag-lock during tapping is enabled by default on this device. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
LIBINPUT_CONFIG_TAP_DISABLED 

Tapping is to be disabled, or is currently disabled.

LIBINPUT_CONFIG_TAP_ENABLED 

Tapping is to be enabled, or is currently enabled.

Function Documentation

enum libinput_config_drag_state libinput_device_config_tap_get_default_drag_enabled ( struct libinput_device device)

Return whether tap-and-drag is enabled or disabled by default on this device.

Parameters
deviceThe device to check
Return values
LIBINPUT_CONFIG_DRAG_ENABLEDif tap-and-drag is enabled by default
LIBINPUT_CONFIG_DRAG_DISABLEDif tap-and-drag is disabled by default
See also
libinput_device_config_tap_drag_set_enabled
libinput_device_config_tap_drag_get_enabled
enum libinput_config_drag_lock_state libinput_device_config_tap_get_default_drag_lock_enabled ( struct libinput_device device)

Check if drag-lock during tapping is enabled by default on this device.

If the device does not support tapping, this function always returns LIBINPUT_CONFIG_DRAG_LOCK_DISABLED.

Drag lock may be enabled by default even when tapping is disabled by default.

Parameters
deviceThe device to configure
Return values
LIBINPUT_CONFIG_DRAG_LOCK_ENABLEDIf drag lock is enabled by default
LIBINPUT_CONFIG_DRAG_LOCK_DISABLEDIf drag lock is disabled by default
See also
libinput_device_config_tap_set_drag_lock_enabled
libinput_device_config_tap_get_drag_lock_enabled
enum libinput_config_tap_state libinput_device_config_tap_get_default_enabled ( struct libinput_device device)

Return the default setting for whether tap-to-click is enabled on this device.

Parameters
deviceThe device to configure
Return values
LIBINPUT_CONFIG_TAP_ENABLEDIf tapping is enabled by default
LIBINPUT_CONFIG_TAP_DISABLEDIf tapping Is disabled by default
See also
libinput_device_config_tap_get_finger_count
libinput_device_config_tap_set_enabled
libinput_device_config_tap_get_enabled
enum libinput_config_drag_state libinput_device_config_tap_get_drag_enabled ( struct libinput_device device)

Return whether tap-and-drag is enabled or disabled on this device.

Parameters
deviceThe device to check
Return values
LIBINPUT_CONFIG_DRAG_ENABLEDif tap-and-drag is enabled
LIBINPUT_CONFIG_DRAG_DISABLEDif tap-and-drag is disabled
See also
libinput_device_config_tap_drag_set_enabled
libinput_device_config_tap_drag_get_default_enabled
enum libinput_config_drag_lock_state libinput_device_config_tap_get_drag_lock_enabled ( struct libinput_device device)

Check if drag-lock during tapping is enabled on this device.

If the device does not support tapping, this function always returns LIBINPUT_CONFIG_DRAG_LOCK_DISABLED.

Drag lock may be enabled even when tapping is disabled.

Parameters
deviceThe device to configure
Return values
LIBINPUT_CONFIG_DRAG_LOCK_ENABLEDIf drag lock is currently enabled
LIBINPUT_CONFIG_DRAG_LOCK_DISABLEDIf drag lock is currently disabled
See also
libinput_device_config_tap_set_drag_lock_enabled
libinput_device_config_tap_get_default_drag_lock_enabled
enum libinput_config_tap_state libinput_device_config_tap_get_enabled ( struct libinput_device device)

Check if tap-to-click is enabled on this device.

If the device does not support tapping, this function always returns LIBINPUT_CONFIG_TAP_DISABLED.

Parameters
deviceThe device to configure
Return values
LIBINPUT_CONFIG_TAP_ENABLEDIf tapping is currently enabled
LIBINPUT_CONFIG_TAP_DISABLEDIf tapping is currently disabled
See also
libinput_device_config_tap_get_finger_count
libinput_device_config_tap_set_enabled
libinput_device_config_tap_get_default_enabled
int libinput_device_config_tap_get_finger_count ( struct libinput_device device)

Check if the device supports tap-to-click and how many fingers can be used for tapping.

See libinput_device_config_tap_set_enabled() for more information.

Parameters
deviceThe device to configure
Returns
The number of fingers that can generate a tap event, or 0 if the device does not support tapping.
See also
libinput_device_config_tap_set_enabled
libinput_device_config_tap_get_enabled
libinput_device_config_tap_get_default_enabled
enum libinput_config_status libinput_device_config_tap_set_drag_enabled ( struct libinput_device device,
enum libinput_config_drag_state  enable 
)

Enable or disable tap-and-drag on this device.

When enabled, a single-finger tap immediately followed by a finger down results in a button down event, subsequent finger motion thus triggers a drag. The button is released on finger up. See Tap-and-drag for more details.

Parameters
deviceThe device to configure
enableLIBINPUT_CONFIG_DRAG_ENABLED to enable, LIBINPUT_CONFIG_DRAG_DISABLED to disable tap-and-drag
See also
libinput_device_config_tap_drag_get_enabled
libinput_device_config_tap_drag_get_default_enabled
enum libinput_config_status libinput_device_config_tap_set_drag_lock_enabled ( struct libinput_device device,
enum libinput_config_drag_lock_state  enable 
)

Enable or disable drag-lock during tapping on this device.

When enabled, a finger may be lifted and put back on the touchpad within a timeout and the drag process continues. When disabled, lifting the finger during a tap-and-drag will immediately stop the drag. See Tap-and-drag for details.

Enabling drag lock on a device that has tapping disabled is permitted, but has no effect until tapping is enabled.

Parameters
deviceThe device to configure
enableLIBINPUT_CONFIG_DRAG_LOCK_ENABLED to enable drag lock or LIBINPUT_CONFIG_DRAG_LOCK_DISABLED to disable drag lock
Returns
A config status code. Disabling drag lock on a device that does not support tapping always succeeds.
See also
libinput_device_config_tap_get_drag_lock_enabled
libinput_device_config_tap_get_default_drag_lock_enabled
enum libinput_config_status libinput_device_config_tap_set_enabled ( struct libinput_device device,
enum libinput_config_tap_state  enable 
)

Enable or disable tap-to-click on this device, with a default mapping of 1, 2, 3 finger tap mapping to left, right, middle click, respectively.

Tapping is limited by the number of simultaneous touches supported by the device, see libinput_device_config_tap_get_finger_count().

Parameters
deviceThe device to configure
enableLIBINPUT_CONFIG_TAP_ENABLED to enable tapping or LIBINPUT_CONFIG_TAP_DISABLED to disable tapping
Returns
A config status code. Disabling tapping on a device that does not support tapping always succeeds.
See also
libinput_device_config_tap_get_finger_count
libinput_device_config_tap_get_enabled
libinput_device_config_tap_get_default_enabled