Pointer acceleration configuration

Enumerations

enum  libinput_config_accel_profile { LIBINPUT_CONFIG_ACCEL_PROFILE_NONE, LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT, LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE }
 

Functions

int libinput_device_config_accel_is_available (struct libinput_device *device)
 Check if a device uses libinput-internal pointer-acceleration. More...
 
enum libinput_config_status libinput_device_config_accel_set_speed (struct libinput_device *device, double speed)
 Set the pointer acceleration speed of this pointer device within a range of [-1, 1], where 0 is the default acceleration for this device, -1 is the slowest acceleration and 1 is the maximum acceleration available on this device. More...
 
double libinput_device_config_accel_get_speed (struct libinput_device *device)
 Get the current pointer acceleration setting for this pointer device. More...
 
double libinput_device_config_accel_get_default_speed (struct libinput_device *device)
 Return the default speed setting for this device, normalized to a range of [-1, 1]. More...
 
uint32_t libinput_device_config_accel_get_profiles (struct libinput_device *device)
 Returns a bitmask of the configurable acceleration modes available on this device. More...
 
enum libinput_config_status libinput_device_config_accel_set_profile (struct libinput_device *device, enum libinput_config_accel_profile mode)
 Set the pointer acceleration profile of this pointer device to the given mode. More...
 
enum libinput_config_accel_profile libinput_device_config_accel_get_profile (struct libinput_device *device)
 Get the current pointer acceleration profile for this pointer device. More...
 
enum libinput_config_accel_profile libinput_device_config_accel_get_default_profile (struct libinput_device *device)
 Return the default pointer acceleration profile for this pointer device. More...
 

Detailed Description

Enumeration Type Documentation

Enumerator
LIBINPUT_CONFIG_ACCEL_PROFILE_NONE 

Placeholder for devices that don't have a configurable pointer acceleration profile.

LIBINPUT_CONFIG_ACCEL_PROFILE_FLAT 

A flat acceleration profile.

Pointer motion is accelerated by a constant (device-specific) factor, depending on the current speed.

See also
libinput_device_config_accel_set_speed
LIBINPUT_CONFIG_ACCEL_PROFILE_ADAPTIVE 

An adaptive acceleration profile.

Pointer acceleration depends on the input speed. This is the default profile for most devices.

Function Documentation

enum libinput_config_accel_profile libinput_device_config_accel_get_default_profile ( struct libinput_device device)

Return the default pointer acceleration profile for this pointer device.

Parameters
deviceThe device to configure
Returns
The default acceleration profile for this device.
double libinput_device_config_accel_get_default_speed ( struct libinput_device device)

Return the default speed setting for this device, normalized to a range of [-1, 1].

See libinput_device_config_accel_set_speed() for details.

Parameters
deviceThe device to configure
Returns
The default speed setting for this device.
enum libinput_config_accel_profile libinput_device_config_accel_get_profile ( struct libinput_device device)

Get the current pointer acceleration profile for this pointer device.

Parameters
deviceThe device to configure
Returns
The currently configured pointer acceleration profile.
uint32_t libinput_device_config_accel_get_profiles ( struct libinput_device device)

Returns a bitmask of the configurable acceleration modes available on this device.

Parameters
deviceThe device to configure
Returns
A bitmask of all configurable modes available on this device.
double libinput_device_config_accel_get_speed ( struct libinput_device device)

Get the current pointer acceleration setting for this pointer device.

The returned value is normalized to a range of [-1, 1]. See libinput_device_config_accel_set_speed() for details.

Parameters
deviceThe device to configure
Returns
The current speed, range -1 to 1
int libinput_device_config_accel_is_available ( struct libinput_device device)

Check if a device uses libinput-internal pointer-acceleration.

Parameters
deviceThe device to configure
Returns
0 if the device is not accelerated, nonzero if it is accelerated
enum libinput_config_status libinput_device_config_accel_set_profile ( struct libinput_device device,
enum libinput_config_accel_profile  mode 
)

Set the pointer acceleration profile of this pointer device to the given mode.

Parameters
deviceThe device to configure
modeThe mode to set the device to.
Returns
A config status code
enum libinput_config_status libinput_device_config_accel_set_speed ( struct libinput_device device,
double  speed 
)

Set the pointer acceleration speed of this pointer device within a range of [-1, 1], where 0 is the default acceleration for this device, -1 is the slowest acceleration and 1 is the maximum acceleration available on this device.

The actual pointer acceleration mechanism is implementation-dependent, as is the number of steps available within the range. libinput picks the semantically closest acceleration step if the requested value does not match a discrete setting.

Parameters
deviceThe device to configure
speedThe normalized speed, in a range of [-1, 1]
Returns
A config status code