libxkbcommon 1.13.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
Loading...
Searching...
No Matches
Public Member Functions
xkb_machine Struct Reference

#include <xkbcommon.h>

Public Member Functions

XKB_EXPORT struct xkb_machinexkb_machine_new (struct xkb_keymap *keymap, const struct xkb_machine_options *options)
 
XKB_EXPORT struct xkb_machinexkb_machine_ref (struct xkb_machine *machine)
 
XKB_EXPORT void xkb_machine_unref (struct xkb_machine *machine)
 
XKB_EXPORT struct xkb_keymapxkb_machine_get_keymap (const struct xkb_machine *machine)
 
XKB_EXPORT enum xkb_error_code xkb_machine_process_key (struct xkb_machine *machine, xkb_keycode_t key, enum xkb_key_direction direction, struct xkb_events *events)
 
XKB_EXPORT enum xkb_error_code xkb_machine_process_synthetic (struct xkb_machine *machine, const struct xkb_state_update *update, struct xkb_events *events)
 

Detailed Description

Opaque XKB state machine object.

xkb_machine is a Mealy machine: it is a finite-state machine that takes a stream of raw key events – a pair (keycode, direction) – as input, and produces a stream of atomic XKB events as output. Output depends on both the input and the current internal state (active modifiers, current layout, etc.).

This is the authoritative object for server-side XKB processing.

Note
To query the resulting keyboard state (active modifiers, current layout, LED states, etc.), pair this object with an xkb_state updated via xkb_state::xkb_state_update_event(). The xkb_state object is the observable state of the machine and provides the full query API.

See Server State and Client State for details.

See the example for a Wayland server in the quick guide.

Since
1.14.0

The documentation for this struct was generated from the following file: