package libinput

  1. Overview
  2. Docs

Module Input.EventSource

Events (e.g. keypresses) reported to the application from libinput.

Sourcetype +_ t

An event notification related to a device.

Use get to get the next event from libinput.

See https://wayland.freedesktop.org/libinput/doc/latest/api/group__base.html

Sourceval get : [ `Udev | `Path ] Context.t -> [ `Unclassified ] t option

get context retrieves the next event from libinput's internal event queue.

Events are added to the queue by Context.dispatch. Use get_type to examine the event.

Sourceval destroy : _ t -> unit

destroy t frees the C event and marks the OCaml wrapper as destroyed.

This will be called automatically when the event gets GC'd anyway, but you may prefer to free the event manually earlier.

Sourceval pp : _ t Fmt.t
Sourceval get_context : _ t -> [ `Udev | `Path ] Context.t
Sourceval get_device : _ t -> Device.t
Sourcemodule Device : sig ... end

Events about devices being added and removed.

Sourcemodule Keyboard : sig ... end

Events from keyboard devices.

Sourcemodule Pointer : sig ... end

Events from mice, touchpads, etc.

Sourcemodule Touch : sig ... end

Events from touch screens (but not graphics tablets or touchpads).

Sourcemodule Tablet_tool : sig ... end

Events from graphics tablet tools (e.g. pens).

Sourcemodule Tablet_pad : sig ... end

Events from graphics tablet controls.

Sourcemodule Gesture : sig ... end

Gestures (e.g. pinch-to-zoom on a touchpad).

Sourcemodule Switch : sig ... end

Simple on/off switches.

Sourceval get_type : _ t -> ty

get_type t classifies an event by its type, and provides access to type-specific details.

Sourceval pp_ty : [< ty ] Fmt.t