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.
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.
Warning! The protocol described in this file is currently in the testing
phase. Backward compatible changes may be added together with the
corresponding interface version bump. Backward incompatible changes can only
be done by creating a new major version of the extension.
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.
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.
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.
A new libinput device has been created. Not every river_input_device_v1
is necessarily a libinput device as well.
Create a acceleration config which can be applied
with river_libinput_device_v1.apply_accel_config.
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.
This request indicates that the client will no longer use the input
device object and that it may be safely destroyed.
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.
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.
Supported send events modes.
Default send events mode.
Current send events mode.
Set the send events mode for the device.
The number of fingers supported for tap-to-click/drag.
If finger_count is 0, tap-to-click and drag are unsupported.
Default tap-to-click state.
Current tap-to-click state.
Configure tap-to-click on this device, with a default mapping of
1, 2, 3 finger tap mapping to left, right, middle click, respectively.
Default tap-to-click button map.
Current tap-to-click button map.
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.
Default tap-and-drag state.
Current tap-and-drag state.
Configure tap-and-drag functionality on the device.
Default drag lock state.
Current drag lock state.
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.
The number of fingers supported for three/four finger drag.
If finger_count is less than 3, three finger drag is unsupported.
Default three finger drag state.
Current three finger drag state.
Configure three finger drag functionality for the device.
A calibration matrix is supported if the supported argument is non-zero.
Default calibration matrix.
Current calibration matrix.
Set calibration matrix.
Supported acceleration profiles.
Default acceleration profile.
Current acceleration profile.
Set the acceleration profile.
Default acceleration speed.
Current acceleration speed.
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 a pointer accleration config.
Natural scroll is supported if the supported argument is non-zero.
Default natural scroll.
Current natural scroll.
Set natural scroll state.
Left-handed mode is supported if the supported argument is non-zero.
Default left-handed mode.
Current left-handed mode.
Set left-handed mode state.
The click methods suppported by the device.
Default click method.
Current click method.
Set click method.
Default clickfinger button map.
Supported if click_methods.clickfinger is supported.
Current clickfinger button map.
Supported if click_methods.clickfinger is supported.
Set clickfinger button map.
Supported if click_methods.clickfinger is supported.
Middle mouse button emulation is supported if the supported argument is
non-zero.
Default middle mouse button emulation.
Current middle mouse button emulation.
Set middle mouse button emulation state.
The scroll methods suppported by the device.
Default scroll method.
Current scroll method.
Set scroll method.
Default scroll button.
Supported if scroll_methods.on_button_down is supported.
Current scroll button.
Supported if scroll_methods.on_button_down is supported.
Set scroll button.
Supported if scroll_methods.on_button_down is supported.
Default scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
Current scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
Set scroll button lock state.
Supported if scroll_methods.on_button_down is supported.
Disable-while-typing is supported if the supported argument is
non-zero.
Default disable-while-typing state.
Current disable-while-typing state.
Set disable-while-typing state.
Disable-while-trackpointing is supported if the supported argument is
non-zero.
Default disable-while-trackpointing state.
Current disable-while-trackpointing state.
Set disable-while-trackpointing state.
Rotation is supported if the supported argument is non-zero.
Default rotation angle.
Current rotation angle.
Set rotation angle in degrees clockwise off the logical neutral
position. Angle must be in the range [0-360).
The result returned by libinput on setting configuration for a device.
This request indicates that the client will no longer use the accel
config object and that it may be safely destroyed.
Defines the acceleration function for a given movement type
in an acceleration configuration with custom accel profile.
The result returned by libinput on setting configuration for a device.
The configuration was successfully applied to the device.
The configuration is unsupported by the device and was ignored.
The configuration is invalid and was ignored.