Module Input.Tablet_tool

A tool being used by a device with the Device.Capability.t.Tablet_tool capability.

Tablet events generated by such a device are bound to a specific tool rather than coming from the device directly. Depending on the hardware it is possible to track the same physical tool across multiple Device.t devices. See get_serial for more details.

type t
module Type : sig ... end
val get_type : t -> Type.t
val get_tool_id : t -> int64 option

get_tool_id t returns the tool ID for a tool object, if any.

This number identifies the specific type of the tool with more precision than the type returned in get_type.

val has_pressure : t -> bool
val has_distance : t -> bool
val has_tilt : t -> bool
val has_rotation : t -> bool
val has_slider : t -> bool
val has_size : t -> bool
val has_wheel : t -> bool
val has_button : t -> int -> bool
val is_unique : t -> bool

is_unique t indicates whether the physical tool can be uniquely identified by libinput.

If a tool can be uniquely identified, keeping a reference to the tool allows tracking the tool across proximity out sequences and across compatible tablets. See get_serial for more details.

val get_serial : t -> int64 option

get_serial t returns the serial number of the tool, if any.

module Config : sig ... end

Tool configuration.

val pp : t Fmt.t