|
libxkbcommon 1.13.0
Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state
|
#include <xkbcommon.h>
Public Member Functions | |
| XKB_EXPORT struct xkb_machine * | xkb_machine_new (struct xkb_keymap *keymap, const struct xkb_machine_options *options) |
| XKB_EXPORT struct xkb_machine * | xkb_machine_ref (struct xkb_machine *machine) |
| XKB_EXPORT void | xkb_machine_unref (struct xkb_machine *machine) |
| XKB_EXPORT struct xkb_keymap * | xkb_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) |
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.
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.