libxkbcommon: xkb_state Struct Reference

libxkbcommon 1.13.2 Library implementing the XKB specification for parsing keyboard descriptions and handling keyboard state

Loading...
Searching...
No Matches
Public Member Functions
xkb_state Struct Reference

`#include <xkbcommon.h>`

## Public Member Functions
XKB_EXPORT struct xkb_state * | xkb_state_new (struct xkb_keymap *keymap)
XKB_EXPORT struct xkb_state * | xkb_state_ref (struct xkb_state *state)
XKB_EXPORT void | xkb_state_unref (struct xkb_state *state)
XKB_EXPORT struct xkb_keymap * | xkb_state_get_keymap (struct xkb_state *state)
XKB_EXPORT enum xkb_state_component | xkb_state_update_key (struct xkb_state *state, xkb_keycode_t key, enum xkb_key_direction direction)
XKB_EXPORT enum xkb_state_component | xkb_state_update_latched_locked (struct xkb_state *state, xkb_mod_mask_t affect_latched_mods, xkb_mod_mask_t latched_mods, bool affect_latched_layout, int32_t latched_layout, xkb_mod_mask_t affect_locked_mods, xkb_mod_mask_t locked_mods, bool affect_locked_layout, int32_t locked_layout)
XKB_EXPORT enum xkb_state_component | xkb_state_update_mask (struct xkb_state *state, xkb_mod_mask_t depressed_mods, xkb_mod_mask_t latched_mods, xkb_mod_mask_t locked_mods, xkb_layout_index_t depressed_layout, xkb_layout_index_t latched_layout, xkb_layout_index_t locked_layout)
XKB_EXPORT int | xkb_state_key_get_syms (struct xkb_state *state, xkb_keycode_t key, const xkb_keysym_t **syms_out)
XKB_EXPORT int | xkb_state_key_get_utf8 (struct xkb_state *state, xkb_keycode_t key, char *buffer, size_t size)
XKB_EXPORT uint32_t | xkb_state_key_get_utf32 (struct xkb_state *state, xkb_keycode_t key)
XKB_EXPORT xkb_keysym_t | xkb_state_key_get_one_sym (struct xkb_state *state, xkb_keycode_t key)
XKB_EXPORT xkb_layout_index_t | xkb_state_key_get_layout (struct xkb_state *state, xkb_keycode_t key)
XKB_EXPORT xkb_level_index_t | xkb_state_key_get_level (struct xkb_state *state, xkb_keycode_t key, xkb_layout_index_t layout)
XKB_EXPORT xkb_mod_mask_t | xkb_state_serialize_mods (struct xkb_state *state, enum xkb_state_component components)
XKB_EXPORT xkb_layout_index_t | xkb_state_serialize_layout (struct xkb_state *state, enum xkb_state_component components)
XKB_EXPORT int | xkb_state_mod_name_is_active (struct xkb_state *state, const char *name, enum xkb_state_component type)
XKB_EXPORT int | xkb_state_mod_names_are_active (struct xkb_state *state, enum xkb_state_component type, enum xkb_state_match match,...)
XKB_EXPORT int | xkb_state_mod_index_is_active (struct xkb_state *state, xkb_mod_index_t idx, enum xkb_state_component type)
XKB_EXPORT int | xkb_state_mod_indices_are_active (struct xkb_state *state, enum xkb_state_component type, enum xkb_state_match match,...)
XKB_EXPORT xkb_mod_mask_t | xkb_state_key_get_consumed_mods2 (struct xkb_state *state, xkb_keycode_t key, enum xkb_consumed_mode mode)
XKB_EXPORT xkb_mod_mask_t | xkb_state_key_get_consumed_mods (struct xkb_state *state, xkb_keycode_t key)
XKB_EXPORT int | xkb_state_mod_index_is_consumed2 (struct xkb_state *state, xkb_keycode_t key, xkb_mod_index_t idx, enum xkb_consumed_mode mode)
XKB_EXPORT int | xkb_state_mod_index_is_consumed (struct xkb_state *state, xkb_keycode_t key, xkb_mod_index_t idx)
XKB_EXPORT xkb_mod_mask_t | xkb_state_mod_mask_remove_consumed (struct xkb_state *state, xkb_keycode_t key, xkb_mod_mask_t mask)
XKB_EXPORT int | xkb_state_layout_name_is_active (struct xkb_state *state, const char *name, enum xkb_state_component type)
XKB_EXPORT int | xkb_state_layout_index_is_active (struct xkb_state *state, xkb_layout_index_t idx, enum xkb_state_component type)
XKB_EXPORT int | xkb_state_led_name_is_active (struct xkb_state *state, const char *name)
XKB_EXPORT int | xkb_state_led_index_is_active (struct xkb_state *state, xkb_led_index_t idx)
XKB_EXPORT struct xkb_state * | xkb_x11_state_new_from_device (struct xkb_keymap *keymap, xcb_connection_t *connection, int32_t device_id)

## Detailed Description

Opaque keyboard state object.

State objects contain the active state of a keyboard (or keyboards), such as the currently effective layout and the active modifiers. It acts as a simple state machine, wherein key presses and releases are the input, and key symbols (keysyms) are the output.

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

- include/xkbcommon/xkbcommon.h
- include/xkbcommon/xkbcommon-x11.h