Copyright
SPDX-FileCopyrightText: 2026 UnionTech Software Technology Co., Ltd.
SPDX-License-Identifier: MIT
configure input devices managed by treeland
This protocol allows a privileged client to discover seat capabilities
and configure compositor-managed mouse, touchpad, and keyboard devices.
A treeland_input_manager_v1 object is a global manager. It creates
settings objects that represent configuration state for existing input
devices; those settings objects are not the device objects themselves.
For mouse and touchpad devices, pointer device settings such as
acceleration speed, acceleration profile, natural scrolling, scroll
factor, handed mode, double-click interval, send events mode,
disable-while-typing and tap-to-click are managed through a
treeland_pointer_device_configuration_v1 object created from the
device-specific settings interface.
Keyboard settings include repeat behavior, num lock state, and XKB
layout, model, variant, and option strings for the target seat.
Warning! This protocol is EXPERIMENTAL and under active development.
It may change at any time, including in backward-incompatible ways,
without incrementing the interface major version and without prior
notice. No compatibility guarantees of any kind are provided. Clients
and compositors must track the upstream definition in treeland-protocols
and must not rely on the current interface names, requests, events, or
semantics remaining stable across releases.
Version 2
global input device manager
The treeland_input_manager_v1 interface is a global object used to
create per-device settings objects for input devices exposed by the
compositor.
The compositor advertises device capability changes with the
capability_available and capability_unavailable events.
For each target device or seat-level settings scope, the compositor
may allow at most one live settings object of a given interface
created from one manager object.
virtual-pointer and virtual-keyboard are not included in the list.
treeland_input_manager_v1
enum device_type {
mouse = 1,
touchpad = 2,
keyboard = 4,
}This is a bitfield
- mouse — mouse input device
- touchpad — touchpad input device
- keyboard — keyboard input device
treeland_input_manager_v1
request destroy()
Destructor
destroy the input manager
This informs the compositor that the treeland input manager object
will no longer be used.
Existing objects created through this interface are not destroyed
automatically. Clients should destroy those objects before destroying
the manager.
treeland_input_manager_v1
event capability_available(
type: uint<device_type>,
seat: object<wl_seat>,
)- type — type of the device capability
- seat — seat associated with the capability
report an available device capability
This event is emitted when the compositor detects that a seat
now exposes the specified device capability.
The compositor sends this event immediately after the
treeland_input_manager_v1 object is created to report
capabilities currently available on a seat.
The compositor may also send this event later when input
devices are hot-plugged and a seat gains the specified
capability.
A client may create a treeland_mouse_settings_v1 object for a
given seat only if the compositor has advertised device_type
mouse capability for that seat. Likewise, a client may create a
treeland_touchpad_settings_v1 or treeland_keyboard_settings_v1
object for a given seat only if the compositor has advertised
device_type touchpad or keyboard capability for that seat.
Version 1
pointer device configuration object
The treeland_pointer_device_configuration_v1 interface represents
pending configuration for pointer devices associated with the parent
device settings object.
This object is created via get_pointer_configuration on a
treeland_mouse_settings_v1 or treeland_touchpad_settings_v1 object.
It collects configuration that applies to the associated device
type.
Requests on this object update pending state. The compositor
applies the accumulated settings when the client sends apply.
Destroying the object before apply discards any pending state that
has not yet been applied.
The compositor sends configuration events after object creation to
report the current effective settings. It may later send additional
state batches when those effective settings change for
compositor-defined reasons. A done event terminates each event
batch.
treeland_pointer_device_configuration_v1
enum feature {
scroll_factor = 1,
handed_mode = 2,
accel_speed = 4,
acceleration_profile = 8,
send_events_mode = 16,
natural_scroll = 32,
disable_while_typing = 64,
tap_to_click = 128,
}This is a bitfield
- scroll_factor — device supports configuring scroll factor
- handed_mode — device supports configuring handed mode
- accel_speed — device supports configuring acceleration speed
- acceleration_profile — device supports configuring acceleration profile
- send_events_mode — device supports configuring event delivery mode
- natural_scroll — device supports configuring natural scrolling
- disable_while_typing — device supports disable-while-typing
- tap_to_click — device supports tap-to-click
pointer device features
Optional features supported by pointer devices. The compositor
sends a feature event to indicate which features are supported
by at least one device associated with the parent settings
object. A client must only send a set request if the
corresponding feature has been advertised. It is a protocol error
to send a set request for a feature that has not been
advertised.
treeland_pointer_device_configuration_v1
enum acceleration_profile {
none = 0,
flat = 1,
adaptive = 2,
custom = 4,
}- none — device does not have a configurable acceleration profile
- flat — use a flat acceleration profile
- adaptive — use an adaptive acceleration profile
- custom — use a custom acceleration profile
pointer acceleration profiles
Pointer acceleration profiles. The semantics correspond to
libinput acceleration profiles.
treeland_pointer_device_configuration_v1
enum send_events_mode {
enabled = 0,
disabled = 1,
disabled_on_external_mouse = 2,
}- enabled — send events from this device normally
- disabled — do not send events from this device
- disabled_on_external_mouse — if an external pointer device is plugged in, do not send events from this device; may be available on built-in pointer devices
pointer event delivery mode
Modes controlling whether the target pointer device should send
events and whether those events depend on the presence of an
external pointer device on the same seat.
treeland_pointer_device_configuration_v1
request set_scroll_factor(
factor: fixed,
)- factor — scaling factor applied to scroll axis delta,
The factor must be greater than 0.
set the scroll delta scaling factor
Set a scaling factor applied to scroll axis delta generated
by wheel and other continuous scrolling input sources. This
request requires the scroll_factor feature to be advertised via
the feature event.
The compositor multiplies scroll axis values by the specified
factor before forwarding them to clients. This affects
continuous scroll delta only and does not modify discrete
scroll step events.
This request updates only the pending state associated with
this object. The change takes effect after the next apply
request.
Sending this request or the corresponding apply request does
not by itself cause a scroll_factor event to be emitted.
delta = factor * _delta
treeland_pointer_device_configuration_v1
request set_handed_mode(
mode: uint<handed_mode>,
)- mode — desired handedness mode
set the handedness mode
Set whether primary and secondary buttons use left-handed or
right-handed ordering. This request requires the handed_mode
feature to be advertised via the feature event. The change
takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a handed_mode event to be emitted.
treeland_pointer_device_configuration_v1
request set_accel_speed(
accel_speed: fixed,
)- accel_speed — desired pointer acceleration speed, The valid range is -1.0 to 1.0,
where 0.0 is the neutral default meaning no acceleration adjustment. Negative
values reduce acceleration (cursor moves more slowly at higher speeds), positive
values increase acceleration (cursor moves faster at higher speeds).
set the pointer acceleration speed
Set the pointer acceleration speed. This request requires the
accel_speed feature to be advertised via the feature event. The
change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause an accel_speed event to be emitted.
treeland_pointer_device_configuration_v1
request set_acceleration_profile(
profile: uint<acceleration_profile>,
)- profile — desired acceleration profile
set the acceleration profile
Set the acceleration profile. This request requires the
acceleration_profile feature to be advertised via the feature
event. The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause an acceleration_profile event to be
emitted.
treeland_pointer_device_configuration_v1
request set_send_events_mode(
mode: uint<send_events_mode>,
)- mode — desired pointer event delivery mode
set the pointer event delivery mode
Set how events from the target pointer device are delivered.
This request requires the send_events_mode feature to be
advertised via the feature event. The change takes effect on the
next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a send_events_mode event to be emitted.
treeland_pointer_device_configuration_v1
request set_natural_scroll(
state: uint<treeland_input_manager_v1.state>,
)- state — desired natural scrolling state
enable or disable natural scrolling
Enable or disable natural scrolling. This request requires the
natural_scroll feature to be advertised via the feature event.
The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a natural_scroll event to be emitted.
treeland_pointer_device_configuration_v1
request set_disable_while_typing(
state: uint<treeland_input_manager_v1.state>,
)- state — desired disable-while-typing state
set disable-while-typing
Enable or disable temporarily disabling pointer devices while
the user is typing. This request requires the
disable_while_typing feature to be advertised via the feature
event. The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a disable_while_typing event to be
emitted.
treeland_pointer_device_configuration_v1
request set_tap_to_click(
state: uint<treeland_input_manager_v1.state>,
)- state — desired tap-to-click state
set tap-to-click
Enable or disable tap-to-click. This request requires the
tap_to_click feature to be advertised via the feature event.
The change takes effect on the next apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a tap_to_click event to be emitted.
treeland_pointer_device_configuration_v1
event feature(
feature: uint<feature>,
)- feature — supported pointer device features
report supported pointer device features
This event reports which optional features are supported by at
least one device associated with the parent settings object.
The compositor sends this event as part of the initial state
batch after the treeland_pointer_device_configuration_v1 object
is created.
The compositor may also send this event again when devices are
added to or removed from the target seat and the set of
supported features changes.
treeland_pointer_device_configuration_v1
event scroll_factor(
factor: fixed,
)- factor — current scroll factor
report the current scroll factor
This event reports the current scroll factor used for wheel and
similar scroll input.
The compositor sends this event immediately after the
treeland_pointer_device_configuration_v1 object is created as
part of the initial state batch.
Changes requested through set_scroll_factor do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event accel_speed(
accel_speed: fixed,
)- accel_speed — current pointer acceleration speed
report the current pointer acceleration speed
This event reports the current pointer acceleration speed.
The compositor sends this event immediately after the
treeland_pointer_device_configuration_v1 object is created as
part of the initial state batch.
Changes requested through set_accel_speed do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event disable_while_typing(
state: uint<treeland_input_manager_v1.state>,
)- state — current disable-while-typing state
report disable-while-typing state
This event reports whether pointer devices are temporarily
disabled while the user is typing.
The compositor sends this event as part of the initial state
batch if the disable_while_typing feature has been advertised.
Changes requested through set_disable_while_typing do not cause
this event to be emitted automatically.
treeland_pointer_device_configuration_v1
event tap_to_click(
state: uint<treeland_input_manager_v1.state>,
)- state — current tap-to-click state
report tap-to-click state
This event reports whether tap-to-click is enabled.
The compositor sends this event as part of the initial state
batch if the tap_to_click feature has been advertised.
Changes requested through set_tap_to_click do not cause this
event to be emitted automatically.
treeland_pointer_device_configuration_v1
event failed()
apply failed
This event indicates that the compositor failed to apply one or
more pending pointer device configuration changes carried by
this object.
This event does not destroy the object. The client may continue
using the object and send further requests.
treeland_pointer_device_configuration_v1
event done(
serial: uint,
)- serial — current configuration serial
end of a pointer device state batch
This event is sent once when all pointer device configuration
state events in the current batch have been sent.
The compositor must always end a batch of pointer device
configuration state events with this event, regardless of
whether it sends the initial state or a later update.
The serial is used in a future get_pointer_configuration
request to ensure the client's configuration is based on
up-to-date state.
Version 1
Version 1
Version 2
keyboard settings object
The treeland_keyboard_settings_v1 interface represents pending
settings for all keyboards associated with the target seat.
Requests on this object update pending keyboard state. The
compositor applies the accumulated settings when the client sends
apply.
The compositor sends keyboard-specific state events after object
creation to report the current effective settings for the target
seat. It may later send additional state batches when those
effective settings change for compositor-defined reasons. A done
event terminates each event batch.
treeland_keyboard_settings_v1
enum feature {
num_lock = 1,
}This is a bitfield
- num_lock — device supports configuring num lock state
keyboard features
Optional features supported by keyboard devices. The compositor
sends a feature event to indicate which features are supported
by at least one keyboard device associated with the target seat.
A client must only send a set request if the corresponding
feature has been advertised. It is a protocol error to send a
set request for a feature that has not been advertised.
treeland_keyboard_settings_v1
request set_repeat(
rate: int,
delay: int,
)- rate — repeat rate in characters per second
- delay — delay in milliseconds before repeating starts
set keyboard repeat rate and delay
Set the keyboard repeat rate and delay to apply on the next
apply request.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a repeat event to be emitted.
treeland_keyboard_settings_v1
request set_num_lock(
state: uint<toggle_state>,
)- state — desired num lock state
set num lock state
Set the num lock state to apply on the next apply request.
This request requires the num_lock feature to be advertised
via the feature event.
This request updates only the pending state tracked by this
object. Sending this request, or the following apply request,
does not by itself cause a num_lock event to be emitted.
treeland_keyboard_settings_v1
request set_xkb_rules(
layout: nullable string,
model: nullable string,
variant: nullable string,
options: nullable string,
)Available since version 2
- layout — comma-separated XKB layout names, or empty for the default
- model — XKB keyboard model, or empty for the default
- variant — comma-separated XKB variants, or empty for none
- options — comma-separated XKB options, or empty for none
set the pending XKB rules configuration
Set the XKB layout, model, variant, and options to apply on the
next apply request. These four values form one configuration
snapshot and replace the complete pending XKB rules state.
Layout contains one or more comma-separated layout names, for
example "us" or "cz,us". An empty layout selects the XKB
default layout, which is "us".
Model identifies the keyboard model, for example "pc104" or
"pc105". An empty model selects the XKB default model.
Variant contains a comma-separated list whose entries
correspond to the layouts, for example "" or ",dvorak".
Empty entries select no variant for the corresponding layout.
Options contains a comma-separated list of XKB options, for
example "grp:win_space_toggle". An empty options string
selects no extra options.
This request updates only the pending state tracked by this
object. Multiple calls before apply replace the complete
pending XKB rules configuration; only the last configuration
is applied. Sending this request, or the following apply
request, does not by itself cause an xkb_rules event to be
emitted.
treeland_keyboard_settings_v1
event feature(
feature: uint<feature>,
)- feature — supported keyboard features
report supported keyboard features
This event reports which optional features are supported by at
least one keyboard device associated with the target seat.
The compositor sends this event as part of the initial state
batch after the treeland_keyboard_settings_v1 object is created.
The compositor may also send this event again when keyboard
devices are added to or removed from the target seat and the
set of supported features changes.
treeland_keyboard_settings_v1
event repeat(
rate: int,
delay: int,
)- rate — repeat rate in characters per second
- delay — delay in milliseconds before repeating starts
report the current repeat configuration
This event reports the current keyboard repeat configuration.
The compositor sends this event immediately after the
treeland_keyboard_settings_v1 object is created as part of the
initial keyboard state batch.
Changes requested through set_repeat do not cause this event to
be emitted automatically.
treeland_keyboard_settings_v1
event num_lock(
state: uint<toggle_state>,
)- state — current num lock state
report the current num lock state
This event reports the current num lock state.
The compositor sends this event immediately after the
treeland_keyboard_settings_v1 object is created as part of the
initial keyboard state batch.
Changes requested through set_num_lock do not cause this event
to be emitted automatically.
treeland_keyboard_settings_v1
event failed()
apply failed
This event indicates that the compositor failed to apply one or
more pending keyboard settings carried by this object.
This event does not destroy the object. The client may continue
using the object and send further requests.
treeland_keyboard_settings_v1
event done()
end of a keyboard state batch
This event is sent once when all keyboard state events in the
current batch have been sent.
The compositor must always end a batch of keyboard state events
with this event, regardless of whether it sends the initial
state or a later update.
treeland_keyboard_settings_v1
event xkb_rules(
layout: string,
model: string,
variant: string,
options: string,
)Available since version 2
- layout — comma-separated XKB layout names, or empty for the default
- model — XKB keyboard model, or empty for the default
- variant — comma-separated XKB variants, or empty for none
- options — comma-separated XKB options, or empty for none
report the current XKB rules configuration
This event reports the current XKB layout, model, variant, and
options as one consistent configuration snapshot. The string
formats and empty-value semantics match set_xkb_rules.
The compositor sends this event after object creation as part
of the initial keyboard state batch. It may send the event
again in a later batch when any effective XKB rules value
changes.