Module Input.Device

Input devices.

type t

An input device.

val pp : t Fmt.t

Summary information about a device.

val dump : t Fmt.t

Show verbose information about a device.

Device metadata

val get_sysname : t -> string

get_sysname t is the system name of t, e.g. "event1".

val get_name : t -> string

get_name t is the descriptive device name as advertised by the kernel and/or the hardware itself (e.g. "Logitech USB Optical Mouse").

It may return the empty string.

val get_context : t -> [ `Udev | `Path ] Context.t
val get_id_bustype : t -> int
val get_id_product : t -> int
val get_id_vendor : t -> int
val get_output_name : t -> string option
val get_size : t -> (float * float) option
val get_device_group : t -> Device_group.t

Seats

val get_seat : t -> Seat.t
val set_seat_logical_name : t -> string -> unit

Change the logical seat associated with this device by removing the device and adding it to the new seat.

Capabilities

module Capability : sig ... end

A device may have one or more "capabilities" at a time. Capabilities remain static for the lifetime of the device.

val has_capability : t -> Capability.t -> bool
module Keyboard : sig ... end
module Pointer : sig ... end
module Touch : sig ... end
module Switch : sig ... end
module Tablet_pad : sig ... end

LEDs

module Led : sig ... end
val led_update : t -> Led.t -> unit

Configuration

module Config : sig ... end

Enable, disable, change and/or check for device-specific features.

Internals

val import : [< `Udev | `Path ] Context.t -> [ `Libinput_device ] Ctypes.structure Ctypes.ptr -> t
val use : t -> [ `Libinput_device ] Ctypes.structure Ctypes.ptr