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.
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.
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.
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.
create a acceleration config
Request
Since Version 1
Create a acceleration config which can be applied
with river_libinput_device_v1.apply_accel_config.
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.
A new libinput device has been created. Not every river_input_device_v1
is necessarily a libinput device as well.
| Entry | Value | Since | Description |
|---|
| invalid_arg | 0 | 1 | invalid enum value or similar |
| invalid_destroy | 1 | 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.
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.
Set the send events mode for the device.
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.
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.
Configure tap-and-drag functionality on the device.
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.
set three finger drag state
Request
Since Version 1
Configure three finger drag functionality for the device.
Set the acceleration profile.
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.
apply acceleration config
Request
Since Version 1
Apply a pointer accleration config.
Set natural scroll state.
set left-handed mode state
Request
Since Version 1
Set left-handed mode state.
set clickfinger button map
Request
Since Version 1
Set clickfinger button map.
Supported if click_methods.clickfinger is supported.
set middle mouse button emulation state
Request
Since Version 1
Set middle mouse button emulation state.
Set scroll button.
Supported if scroll_methods.on_button_down is supported.
set scroll button lock state
Request
Since Version 1
Set scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
set disable-while-typing state
Request
Since Version 1
Set disable-while-typing state.
set disable-while-trackpointing state
Request
Since Version 1
Set disable-while-trackpointing state.
Set rotation angle in degrees clockwise off the logical neutral
position. Angle must be in the range [0-360).
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.
corresponding river input device
Event
Since Version 1
supported send events modes
Event
Since Version 1
Supported send events modes.
Default send events mode.
Current send events mode.
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.
| Argument | Type | Description |
|---|
| finger_count | int | |
default tap-to-click state
Event
Since Version 1
Default tap-to-click state.
current tap-to-click state
Event
Since Version 1
Current tap-to-click state.
default tap-to-click button map
Event
Since Version 1
Default tap-to-click button map.
current tap-to-click button map
Event
Since Version 1
Current tap-to-click button map.
default tap-and-drag state
Event
Since Version 1
Default tap-and-drag state.
current tap-and-drag state
Event
Since Version 1
Current tap-and-drag state.
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.
| Argument | Type | Description |
|---|
| finger_count | int | |
default three finger drag state
Event
Since Version 1
Default three finger drag state.
current three finger drag state
Event
Since Version 1
Current three finger drag state.
support for a calibration matrix
Event
Since Version 1
A calibration matrix is supported if the supported argument is non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
default calibration matrix
Event
Since Version 1
Default calibration matrix.
| Argument | Type | Description |
|---|
| matrix | array | array of 6 floats |
current calibration matrix
Event
Since Version 1
Current calibration matrix.
| Argument | Type | Description |
|---|
| matrix | array | array of 6 floats |
supported acceleration profiles
Event
Since Version 1
Supported acceleration profiles.
default acceleration profile
Event
Since Version 1
Default acceleration profile.
Current acceleration profile.
default acceleration speed
Event
Since Version 1
Default acceleration speed.
| Argument | Type | Description |
|---|
| speed | array | double |
current acceleration speed
Event
Since Version 1
Current acceleration speed.
| Argument | Type | Description |
|---|
| speed | array | double |
support for natural scroll
Event
Since Version 1
Natural scroll is supported if the supported argument is non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
current natural scroll state
Event
Since Version 1
support for left-handed mode
Event
Since Version 1
Left-handed mode is supported if the supported argument is non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
Default left-handed mode.
current left-handed mode state
Event
Since Version 1
Current left-handed mode.
The click methods supported by the device.
default clickfinger button map
Event
Since Version 1
Default clickfinger button map.
Supported if click_methods.clickfinger is supported.
current clickfinger button map
Event
Since Version 1
Current clickfinger button map.
Supported if click_methods.clickfinger is supported.
support for middle mouse button emulation
Event
Since Version 1
Middle mouse button emulation is supported if the supported argument is
non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
default middle mouse button emulation
Event
Since Version 1
Default middle mouse button emulation.
current middle mouse button emulation state
Event
Since Version 1
Current middle mouse button emulation.
The scroll methods supported by the device.
Default scroll button.
Supported if scroll_methods.on_button_down is supported.
| Argument | Type | Description |
|---|
| button | uint | |
Current scroll button.
Supported if scroll_methods.on_button_down is supported.
| Argument | Type | Description |
|---|
| button | uint | |
default scroll button lock state
Event
Since Version 1
Default scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
current scroll button lock state
Event
Since Version 1
Current scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
support for disable-while-typing
Event
Since Version 1
Disable-while-typing is supported if the supported argument is
non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
default disable-while-typing state
Event
Since Version 1
Default disable-while-typing state.
current disable-while-typing state
Event
Since Version 1
Current disable-while-typing state.
support for disable-while-trackpointing
Event
Since Version 1
Disable-while-trackpointing is supported if the supported argument is
non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
default disable-while-trackpointing state
Event
Since Version 1
Default disable-while-trackpointing state.
current disable-while-trackpointing state
Event
Since Version 1
Current disable-while-trackpointing state.
Rotation is supported if the supported argument is non-zero.
| Argument | Type | Description |
|---|
| supported | int | boolean |
| Argument | Type | Description |
|---|
| angle | uint | |
| Argument | Type | Description |
|---|
| angle | uint | |
| Entry | Value | Since | Description |
|---|
| invalid_arg | 0 | 1 | invalid enum value or similar |
Bitfield
Enum
Since Version 1
| Entry | Value | Since | Description |
|---|
| enabled | 0 | 1 | |
| disabled | 1 | 1 | |
| disabled_on_external_mouse | 2 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| lrm | 0 | 1 | 1/2/3 finger tap maps to left/right/middle |
| lmr | 1 | 1 | 1/2/3 finger tap maps to left/middle/right |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled_timeout | 1 | 1 | |
| enabled_sticky | 2 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled_3fg | 1 | 1 | |
| enabled_4fg | 2 | 1 | |
| Entry | Value | Since | Description |
|---|
| none | 0 | 1 | |
| flat | 1 | 1 | |
| adaptive | 2 | 1 | |
| custom | 4 | 1 | |
Bitfield
Enum
Since Version 1
| Entry | Value | Since | Description |
|---|
| none | 0 | 1 | |
| flat | 1 | 1 | |
| adaptive | 2 | 1 | |
| custom | 4 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| none | 0 | 1 | |
| button_areas | 1 | 1 | |
| clickfinger | 2 | 1 | |
Bitfield
Enum
Since Version 1
| Entry | Value | Since | Description |
|---|
| none | 0 | 1 | |
| button_areas | 1 | 1 | |
| clickfinger | 2 | 1 | |
| Entry | Value | Since | Description |
|---|
| lrm | 0 | 1 | |
| lmr | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| no_scroll | 0 | 1 | |
| two_finger | 1 | 1 | |
| edge | 2 | 1 | |
| on_button_down | 4 | 1 | |
Bitfield
Enum
Since Version 1
| Entry | Value | Since | Description |
|---|
| no_scroll | 0 | 1 | |
| two_finger | 1 | 1 | |
| edge | 2 | 1 | |
| on_button_down | 4 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
| Entry | Value | Since | Description |
|---|
| disabled | 0 | 1 | |
| enabled | 1 | 1 | |
The result returned by libinput on setting configuration for a device.
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.
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.
| Entry | Value | Since | Description |
|---|
| invalid_arg | 0 | 1 | invalid enum value or similar |
| Entry | Value | Since | Description |
|---|
| fallback | 0 | 1 | |
| motion | 1 | 1 | |
| scroll | 2 | 1 | |
config application result
Interface
Version 1
The result returned by libinput on setting configuration for a device.
Destructor
Event
Since Version 1
The configuration was successfully applied to the device.
Destructor
Event
Since Version 1
The configuration is unsupported by the device and was ignored.
Destructor
Event
Since Version 1
The configuration is invalid and was ignored.
Copyright
SPDX-FileCopyrightText: © 2025 Isaac Freund
SPDX-License-Identifier: MIT
Permission is hereby granted, free of charge, to any person obtaining a copy
of this software and associated documentation files (the "Software"), to
deal in the Software without restriction, including without limitation the
rights to use, copy, modify, merge, publish, distribute, sublicense, and/or
sell copies of the Software, and to permit persons to whom the Software is
furnished to do so, subject to the following conditions:
The above copyright notice and this permission notice shall be included in
all copies or substantial portions of the Software.
THE SOFTWARE IS PROVIDED "AS IS", WITHOUT WARRANTY OF ANY KIND, EXPRESS OR
IMPLIED, INCLUDING BUT NOT LIMITED TO THE WARRANTIES OF MERCHANTABILITY,
FITNESS FOR A PARTICULAR PURPOSE AND NONINFRINGEMENT. IN NO EVENT SHALL THE
AUTHORS OR COPYRIGHT HOLDERS BE LIABLE FOR ANY CLAIM, DAMAGES OR OTHER
LIABILITY, WHETHER IN AN ACTION OF CONTRACT, TORT OR OTHERWISE, ARISING
FROM, OUT OF OR IN CONNECTION WITH THE SOFTWARE OR THE USE OR OTHER DEALINGS
IN THE SOFTWARE.