river-libinput-config-v1

configure libinput devices

(index)

This protocol exposes libinput device configuration APIs. The libinput documentation should be referred to for detailed information on libinput's behavior.

This protocol is designed so that (hopefully) any backwards compatible change to libinput's API can be matched with a backwards compatible change to this protocol.

Note: the libinput API uses floating point types (float and double in C) which are not (yet?) natively supported by the Wayland protocol. However, the Wayland protocol does support sending arbitrary bytes through the array argument type. This protocol uses e.g. type="array" summary="double" to indicate a native-endian IEEE-754 64-bit double value.

The key words "must", "must not", "required", "shall", "shall not", "should", "should not", "recommended", "may", and "optional" in this document are to be interpreted as described in IETF RFC 2119.

river_libinput_config_v1

libinput config global interface

Interface
Version 1

Global interface for configuring libinput devices. This global should only be advertised if river_input_manager_v1 is advertised as well.

river_libinput_config_v1.stop

stop sending events

Request
Since Version 1

This request indicates that the client no longer wishes to receive events on this object.

The Wayland protocol is asynchronous, which means the server may send further events until the stop request is processed. The client must wait for a river_libinput_config_v1.finished event before destroying this object.

river_libinput_config_v1.destroy

destroy the river_libinput_config_v1 object

Destructor Request
Since Version 1

This request should be called after the finished event has been received to complete destruction of the object.

It is a protocol error to make this request before the finished event has been received.

If a client wishes to destroy this object it should send a river_libinput_config_v1.stop request and wait for a river_libinput_config_v1.finished event. Once the finished event is received it is safe to destroy this object and any other objects created through this interface.

river_libinput_config_v1.create_accel_config

create a acceleration config

Request
Since Version 1

Create a acceleration config which can be applied with river_libinput_device_v1.apply_accel_config.

ArgumentTypeDescription
idnew_id<river_libinput_accel_config_v1>

profileuint<river_libinput_device_v1.accel_profile>

river_libinput_config_v1.finished

the server has finished with the object

Event
Since Version 1

This event indicates that the server will send no further events on this object. The client should destroy the object. See river_libinput_config_v1.destroy for more information.

river_libinput_config_v1.libinput_device

new libinput device

Event
Since Version 1

A new libinput device has been created. Not every river_input_device_v1 is necessarily a libinput device as well.

ArgumentTypeDescription
idnew_id<river_libinput_device_v1>

EntryValueSinceDescription
invalid_arg01

invalid enum value or similar

invalid_destroy11

river_libinput_device_v1

a libinput device

Interface
Version 1

In general, *_support events will be sent exactly once directly after the river_libinput_device_v1 is created. *_default events will be sent after *_support events if the config option is supported, and *_current events willl be sent after the *_default events and again whenever the config option is changed.

river_libinput_device_v1.destroy

destroy the libinput device object

Destructor Request
Since Version 1

This request indicates that the client will no longer use the input device object and that it may be safely destroyed.

river_libinput_device_v1.set_send_events

set send events mode

Request
Since Version 1

Set the send events mode for the device.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

modeuint<send_events_modes>

river_libinput_device_v1.set_tap

enable/disable tap-to-click

Request
Since Version 1

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

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<tap_state>

river_libinput_device_v1.set_tap_button_map

set tap-to-click button map

Request
Since Version 1

Set the finger number to button number mapping for tap-to-click. The default mapping on most devices is to have a 1, 2 and 3 finger tap to map to the left, right and middle button, respectively.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

button_mapuint<tap_button_map>

river_libinput_device_v1.set_drag

set tap-and-drag state

Request
Since Version 1

Configure tap-and-drag functionality on the device.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<drag_state>

river_libinput_device_v1.set_drag_lock

set drag lock state

Request
Since Version 1

Configure drag-lock during tapping on this device. When enabled, a finger may be lifted and put back on the touchpad and the drag process continues. A timeout for lifting the finger is optional. When disabled, lifting the finger during a tap-and-drag will immediately stop the drag. See the libinput documentation for more details.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<drag_lock_state>

river_libinput_device_v1.set_three_finger_drag

set three finger drag state

Request
Since Version 1

Configure three finger drag functionality for the device.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<three_finger_drag_state>

river_libinput_device_v1.set_calibration_matrix

set calibration matrix

Request
Since Version 1

Set calibration matrix.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

matrixarray

array of 6 floats

river_libinput_device_v1.set_accel_profile

set send events mode

Request
Since Version 1

Set the acceleration profile.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

profileuint<accel_profile>

river_libinput_device_v1.set_accel_speed

set acceleration speed

Request
Since Version 1

Set the acceleration speed 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.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

speedarray

double

river_libinput_device_v1.apply_accel_config

apply acceleration config

Request
Since Version 1

Apply a pointer accleration config.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

configobject<river_libinput_accel_config_v1>

river_libinput_device_v1.set_natural_scroll

set natural scroll state

Request
Since Version 1

Set natural scroll state.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<natural_scroll_state>

river_libinput_device_v1.set_left_handed

set left-handed mode state

Request
Since Version 1

Set left-handed mode state.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<left_handed_state>

river_libinput_device_v1.set_click_method

set click method

Request
Since Version 1

Set click method.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

methoduint<click_method>

river_libinput_device_v1.set_clickfinger_button_map

set clickfinger button map

Request
Since Version 1

Set clickfinger button map. Supported if click_methods.clickfinger is supported.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

button_mapuint<clickfinger_button_map>

river_libinput_device_v1.set_middle_emulation

set middle mouse button emulation state

Request
Since Version 1

Set middle mouse button emulation state.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<middle_emulation_state>

river_libinput_device_v1.set_scroll_method

set scroll method

Request
Since Version 1

Set scroll method.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

methoduint<scroll_method>

river_libinput_device_v1.set_scroll_button

set scroll button

Request
Since Version 1

Set scroll button. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

buttonuint

river_libinput_device_v1.set_scroll_button_lock

set scroll button lock state

Request
Since Version 1

Set scroll button lock state. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<scroll_button_lock_state>

river_libinput_device_v1.set_dwt

set disable-while-typing state

Request
Since Version 1

Set disable-while-typing state.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<dwt_state>

river_libinput_device_v1.set_dwtp

set disable-while-trackpointing state

Request
Since Version 1

Set disable-while-trackpointing state.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

stateuint<dwtp_state>

river_libinput_device_v1.set_rotation

set rotation angle

Request
Since Version 1

Set rotation angle in degrees clockwise off the logical neutral position. Angle must be in the range [0-360).

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

angleuint

river_libinput_device_v1.removed

the libinput device is removed

Event
Since Version 1

This event indicates that the libinput device has been removed.

The server will send no further events on this object and ignore any request (other than river_libinput_device_v1.destroy) made after this event is sent. The client should destroy this object with the river_libinput_device_v1.destroy request to free up resources.

river_libinput_device_v1.input_device

corresponding river input device

Event
Since Version 1

The river_input_device_v1 corresponding to this libinput device. This event will always be the first event sent on the river_libinput_device_v1 object, and it will be sent exactly once.

ArgumentTypeDescription
deviceobject<river_input_device_v1>

river_libinput_device_v1.send_events_support

supported send events modes

Event
Since Version 1

Supported send events modes.

ArgumentTypeDescription
modesuint<send_events_modes>

river_libinput_device_v1.send_events_default

default send events mode

Event
Since Version 1

Default send events mode.

ArgumentTypeDescription
modeuint<send_events_modes>

river_libinput_device_v1.send_events_current

current send events mode

Event
Since Version 1

Current send events mode.

ArgumentTypeDescription
modeuint<send_events_modes>

river_libinput_device_v1.tap_support

tap-to-click/drag support

Event
Since Version 1

The number of fingers supported for tap-to-click/drag. If finger_count is 0, tap-to-click and drag are unsupported.

ArgumentTypeDescription
finger_countint

river_libinput_device_v1.tap_default

default tap-to-click state

Event
Since Version 1

Default tap-to-click state.

ArgumentTypeDescription
stateuint<tap_state>

river_libinput_device_v1.tap_current

current tap-to-click state

Event
Since Version 1

Current tap-to-click state.

ArgumentTypeDescription
stateuint<tap_state>

river_libinput_device_v1.tap_button_map_default

default tap-to-click button map

Event
Since Version 1

Default tap-to-click button map.

ArgumentTypeDescription
button_mapuint<tap_button_map>

river_libinput_device_v1.tap_button_map_current

current tap-to-click button map

Event
Since Version 1

Current tap-to-click button map.

ArgumentTypeDescription
button_mapuint<tap_button_map>

river_libinput_device_v1.drag_default

default tap-and-drag state

Event
Since Version 1

Default tap-and-drag state.

ArgumentTypeDescription
stateuint<drag_state>

river_libinput_device_v1.drag_current

current tap-and-drag state

Event
Since Version 1

Current tap-and-drag state.

ArgumentTypeDescription
stateuint<drag_state>

river_libinput_device_v1.drag_lock_default

default drag lock state

Event
Since Version 1

Default drag lock state.

ArgumentTypeDescription
stateuint<drag_lock_state>

river_libinput_device_v1.drag_lock_current

current drag lock state

Event
Since Version 1

Current drag lock state.

ArgumentTypeDescription
stateuint<drag_lock_state>

river_libinput_device_v1.three_finger_drag_support

three finger drag support

Event
Since Version 1

The number of fingers supported for three/four finger drag. If finger_count is less than 3, three finger drag is unsupported.

ArgumentTypeDescription
finger_countint

river_libinput_device_v1.three_finger_drag_default

default three finger drag state

Event
Since Version 1

Default three finger drag state.

ArgumentTypeDescription
stateuint<three_finger_drag_state>

river_libinput_device_v1.three_finger_drag_current

current three finger drag state

Event
Since Version 1

Current three finger drag state.

ArgumentTypeDescription
stateuint<three_finger_drag_state>

river_libinput_device_v1.calibration_matrix_support

support for a calibration matrix

Event
Since Version 1

A calibration matrix is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.calibration_matrix_default

default calibration matrix

Event
Since Version 1

Default calibration matrix.

ArgumentTypeDescription
matrixarray

array of 6 floats

river_libinput_device_v1.calibration_matrix_current

current calibration matrix

Event
Since Version 1

Current calibration matrix.

ArgumentTypeDescription
matrixarray

array of 6 floats

river_libinput_device_v1.accel_profiles_support

supported acceleration profiles

Event
Since Version 1

Supported acceleration profiles.

ArgumentTypeDescription
profilesuint<accel_profiles>

river_libinput_device_v1.accel_profile_default

default acceleration profile

Event
Since Version 1

Default acceleration profile.

ArgumentTypeDescription
profileuint<accel_profile>

river_libinput_device_v1.accel_profile_current

current send events mode

Event
Since Version 1

Current acceleration profile.

ArgumentTypeDescription
profileuint<accel_profile>

river_libinput_device_v1.accel_speed_default

default acceleration speed

Event
Since Version 1

Default acceleration speed.

ArgumentTypeDescription
speedarray

double

river_libinput_device_v1.accel_speed_current

current acceleration speed

Event
Since Version 1

Current acceleration speed.

ArgumentTypeDescription
speedarray

double

river_libinput_device_v1.natural_scroll_support

support for natural scroll

Event
Since Version 1

Natural scroll is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.natural_scroll_default

default natural scroll

Event
Since Version 1

Default natural scroll.

ArgumentTypeDescription
stateuint<natural_scroll_state>

river_libinput_device_v1.natural_scroll_current

current natural scroll state

Event
Since Version 1

Current natural scroll.

ArgumentTypeDescription
stateuint<natural_scroll_state>

river_libinput_device_v1.left_handed_support

support for left-handed mode

Event
Since Version 1

Left-handed mode is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.left_handed_default

default left-handed mode

Event
Since Version 1

Default left-handed mode.

ArgumentTypeDescription
stateuint<left_handed_state>

river_libinput_device_v1.left_handed_current

current left-handed mode state

Event
Since Version 1

Current left-handed mode.

ArgumentTypeDescription
stateuint<left_handed_state>

river_libinput_device_v1.click_method_support

supported click methods

Event
Since Version 1

The click methods supported by the device.

ArgumentTypeDescription
methodsuint<click_methods>

river_libinput_device_v1.click_method_default

default click method

Event
Since Version 1

Default click method.

ArgumentTypeDescription
methoduint<click_method>

river_libinput_device_v1.click_method_current

current click method

Event
Since Version 1

Current click method.

ArgumentTypeDescription
methoduint<click_method>

river_libinput_device_v1.clickfinger_button_map_default

default clickfinger button map

Event
Since Version 1

Default clickfinger button map. Supported if click_methods.clickfinger is supported.

ArgumentTypeDescription
button_mapuint<clickfinger_button_map>

river_libinput_device_v1.clickfinger_button_map_current

current clickfinger button map

Event
Since Version 1

Current clickfinger button map. Supported if click_methods.clickfinger is supported.

ArgumentTypeDescription
button_mapuint<clickfinger_button_map>

river_libinput_device_v1.middle_emulation_support

support for middle mouse button emulation

Event
Since Version 1

Middle mouse button emulation is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.middle_emulation_default

default middle mouse button emulation

Event
Since Version 1

Default middle mouse button emulation.

ArgumentTypeDescription
stateuint<middle_emulation_state>

river_libinput_device_v1.middle_emulation_current

current middle mouse button emulation state

Event
Since Version 1

Current middle mouse button emulation.

ArgumentTypeDescription
stateuint<middle_emulation_state>

river_libinput_device_v1.scroll_method_support

supported scroll methods

Event
Since Version 1

The scroll methods supported by the device.

ArgumentTypeDescription
methodsuint<scroll_methods>

river_libinput_device_v1.scroll_method_default

default scroll method

Event
Since Version 1

Default scroll method.

ArgumentTypeDescription
methoduint<scroll_method>

river_libinput_device_v1.scroll_method_current

current scroll method

Event
Since Version 1

Current scroll method.

ArgumentTypeDescription
methoduint<scroll_method>

river_libinput_device_v1.scroll_button_default

default scroll button

Event
Since Version 1

Default scroll button. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
buttonuint

river_libinput_device_v1.scroll_button_current

current scroll button

Event
Since Version 1

Current scroll button. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
buttonuint

river_libinput_device_v1.scroll_button_lock_default

default scroll button lock state

Event
Since Version 1

Default scroll button lock state. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
stateuint<scroll_button_lock_state>

river_libinput_device_v1.scroll_button_lock_current

current scroll button lock state

Event
Since Version 1

Current scroll button lock state. Supported if scroll_methods.on_button_down is supported.

ArgumentTypeDescription
stateuint<scroll_button_lock_state>

river_libinput_device_v1.dwt_support

support for disable-while-typing

Event
Since Version 1

Disable-while-typing is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.dwt_default

default disable-while-typing state

Event
Since Version 1

Default disable-while-typing state.

ArgumentTypeDescription
stateuint<dwt_state>

river_libinput_device_v1.dwt_current

current disable-while-typing state

Event
Since Version 1

Current disable-while-typing state.

ArgumentTypeDescription
stateuint<dwt_state>

river_libinput_device_v1.dwtp_support

support for disable-while-trackpointing

Event
Since Version 1

Disable-while-trackpointing is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.dwtp_default

default disable-while-trackpointing state

Event
Since Version 1

Default disable-while-trackpointing state.

ArgumentTypeDescription
stateuint<dwtp_state>

river_libinput_device_v1.dwtp_current

current disable-while-trackpointing state

Event
Since Version 1

Current disable-while-trackpointing state.

ArgumentTypeDescription
stateuint<dwtp_state>

river_libinput_device_v1.rotation_support

support for rotation

Event
Since Version 1

Rotation is supported if the supported argument is non-zero.

ArgumentTypeDescription
supportedint

boolean

river_libinput_device_v1.rotation_default

default rotation angle

Event
Since Version 1

Default rotation angle.

ArgumentTypeDescription
angleuint

river_libinput_device_v1.rotation_current

current rotation angle

Event
Since Version 1

Current rotation angle.

ArgumentTypeDescription
angleuint

EntryValueSinceDescription
invalid_arg01

invalid enum value or similar

river_libinput_device_v1.send_events_modes

Bitfield Enum
Since Version 1
EntryValueSinceDescription
enabled01

disabled11

disabled_on_external_mouse21

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
lrm01

1/2/3 finger tap maps to left/right/middle

lmr11

1/2/3 finger tap maps to left/middle/right

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
disabled01

enabled_timeout11

enabled_sticky21

EntryValueSinceDescription
disabled01

enabled_3fg11

enabled_4fg21

EntryValueSinceDescription
none01

flat11

adaptive21

custom41

river_libinput_device_v1.accel_profiles

Bitfield Enum
Since Version 1
EntryValueSinceDescription
none01

flat11

adaptive21

custom41

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
none01

button_areas11

clickfinger21

river_libinput_device_v1.click_methods

Bitfield Enum
Since Version 1
EntryValueSinceDescription
none01

button_areas11

clickfinger21

EntryValueSinceDescription
lrm01

lmr11

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
no_scroll01

two_finger11

edge21

on_button_down41

river_libinput_device_v1.scroll_methods

Bitfield Enum
Since Version 1
EntryValueSinceDescription
no_scroll01

two_finger11

edge21

on_button_down41

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
disabled01

enabled11

EntryValueSinceDescription
disabled01

enabled11

river_libinput_accel_config_v1

acceleration config

Interface
Version 1

The result returned by libinput on setting configuration for a device.

river_libinput_accel_config_v1.destroy

destroy the accel object

Destructor Request
Since Version 1

This request indicates that the client will no longer use the accel config object and that it may be safely destroyed.

river_libinput_accel_config_v1.set_points

define custom acceleration function

Request
Since Version 1

Defines the acceleration function for a given movement type in an acceleration configuration with custom accel profile.

ArgumentTypeDescription
resultnew_id<river_libinput_result_v1>

typeuint<accel_type>

steparray

double

pointsarray

array of doubles

EntryValueSinceDescription
invalid_arg01

invalid enum value or similar

EntryValueSinceDescription
fallback01

motion11

scroll21

river_libinput_result_v1

config application result

Interface
Version 1

The result returned by libinput on setting configuration for a device.

river_libinput_result_v1.success

config success

Destructor Event
Since Version 1

The configuration was successfully applied to the device.

river_libinput_result_v1.unsupported

config unsupported

Destructor Event
Since Version 1

The configuration is unsupported by the device and was ignored.

river_libinput_result_v1.invalid

config invalid

Destructor Event
Since Version 1

The configuration is invalid and was ignored.

Copyright