libinput  0.5.0
A wrapper library for input devices
 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Macros Groups Pages
Enumerations | Functions
Device configuration

Enable, disable, change and/or check for device-specific features. More...

Enumerations

enum  libinput_config_status { LIBINPUT_CONFIG_STATUS_SUCCESS, LIBINPUT_CONFIG_STATUS_UNSUPPORTED, LIBINPUT_CONFIG_STATUS_INVALID }
 Status codes returned when applying configuration settings. More...
 
enum  libinput_config_tap_state { LIBINPUT_CONFIG_TAP_DISABLED, LIBINPUT_CONFIG_TAP_ENABLED }
 

Functions

const char * libinput_config_status_to_str (enum libinput_config_status status)
 Return a string describing the error. More...
 
int libinput_device_config_tap_get_finger_count (struct libinput_device *device)
 Check if the device supports tap-to-click. 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 tapping is enabled on this device. More...
 

Detailed Description

Enable, disable, change and/or check for device-specific features.

For all features, libinput assigns a default based on the hardware configuration. This default can be obtained with the respective get_default call.

Some configuration option may be dependent on or mutually exclusive with with other options. The behavior in those cases is implementation-defined, the caller must ensure that the options are set in the right order.

Enumeration Type Documentation

Status codes returned when applying configuration settings.

Enumerator
LIBINPUT_CONFIG_STATUS_SUCCESS 

Config applied successfully.

LIBINPUT_CONFIG_STATUS_UNSUPPORTED 

Configuration not available on this device.

LIBINPUT_CONFIG_STATUS_INVALID 

Invalid parameter range.

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

const char* libinput_config_status_to_str ( enum libinput_config_status  status)

Return a string describing the error.

Parameters
statusThe status to translate to a string
Returns
A human-readable string representing the error or NULL for an invalid status.
enum libinput_config_tap_state libinput_device_config_tap_get_default_enabled ( struct libinput_device *  device)

Return the default setting for whether tapping is enabled on this device.

Parameters
deviceThe device to configure
Returns
LIBINPUT_CONFIG_TAP_ENABLED if tapping is enabled by default, or LIBINPUT_CONFIG_TAP_DISABLED 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_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 0.

Parameters
deviceThe device to configure
Returns
LIBINPUT_CONFIG_TAP_ENABLED if tapping is currently enabled, or LIBINPUT_CONFIG_TAP_DISABLED 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.

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_set_enabled_get_default
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