libxkbcommon
0.5.0
|
Typedefs | |
typedef void(* | xkb_keymap::xkb_keymap_key_iter_t )(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) |
Enumeration of state components in a keymap.
typedef void(* xkb_keymap_key_iter_t)(struct xkb_keymap *keymap, xkb_keycode_t key, void *data) |
xkb_keycode_t xkb_keymap_min_keycode | ( | struct xkb_keymap * | keymap | ) |
xkb_keycode_t xkb_keymap_max_keycode | ( | struct xkb_keymap * | keymap | ) |
void xkb_keymap_key_for_each | ( | struct xkb_keymap * | keymap, |
xkb_keymap_key_iter_t | iter, | ||
void * | data | ||
) |
Run a specified function for every valid keycode in the keymap.
If a keymap is sparse, this function may be called fewer than (max_keycode - min_keycode + 1) times.
xkb_mod_index_t xkb_keymap_num_mods | ( | struct xkb_keymap * | keymap | ) |
Get the number of modifiers in the keymap.
const char * xkb_keymap_mod_get_name | ( | struct xkb_keymap * | keymap, |
xkb_mod_index_t | idx | ||
) |
Get the name of a modifier by index.
xkb_mod_index_t xkb_keymap_mod_get_index | ( | struct xkb_keymap * | keymap, |
const char * | name | ||
) |
Get the index of a modifier by name.
xkb_layout_index_t xkb_keymap_num_layouts | ( | struct xkb_keymap * | keymap | ) |
Get the number of layouts in the keymap.
const char * xkb_keymap_layout_get_name | ( | struct xkb_keymap * | keymap, |
xkb_layout_index_t | idx | ||
) |
Get the name of a layout by index.
xkb_layout_index_t xkb_keymap_layout_get_index | ( | struct xkb_keymap * | keymap, |
const char * | name | ||
) |
Get the index of a layout by name.
xkb_led_index_t xkb_keymap_num_leds | ( | struct xkb_keymap * | keymap | ) |
Get the number of LEDs in the keymap.
const char * xkb_keymap_led_get_name | ( | struct xkb_keymap * | keymap, |
xkb_led_index_t | idx | ||
) |
Get the name of a LED by index.
xkb_led_index_t xkb_keymap_led_get_index | ( | struct xkb_keymap * | keymap, |
const char * | name | ||
) |
Get the index of a LED by name.
xkb_layout_index_t xkb_keymap_num_layouts_for_key | ( | struct xkb_keymap * | keymap, |
xkb_keycode_t | key | ||
) |
Get the number of layouts for a specific key.
This number can be different from xkb_keymap_num_layouts(), but is always smaller. It is the appropriate value to use when iterating over the layouts of a key.
xkb_level_index_t xkb_keymap_num_levels_for_key | ( | struct xkb_keymap * | keymap, |
xkb_keycode_t | key, | ||
xkb_layout_index_t | layout | ||
) |
Get the number of shift levels for a specific key and layout.
If layout
is out of range for this key (that is, larger or equal to the value returned by xkb_keymap_num_layouts_for_key()), it is brought back into range in a manner consistent with xkb_state_key_get_layout().
int xkb_keymap_key_get_syms_by_level | ( | struct xkb_keymap * | keymap, |
xkb_keycode_t | key, | ||
xkb_layout_index_t | layout, | ||
xkb_level_index_t | level, | ||
const xkb_keysym_t ** | syms_out | ||
) |
Get the keysyms obtained from pressing a key in a given layout and shift level.
This function is like xkb_state_key_get_syms(), only the layout and shift level are not derived from the keyboard state but are instead specified explicitly.
[in] | keymap | The keymap. |
[in] | key | The keycode of the key. |
[in] | layout | The layout for which to get the keysyms. |
[in] | level | The shift level in the layout for which to get the keysyms. This must be smaller than: xkb_keymap_num_levels_for_key(keymap, key)
|
[out] | syms_out | An immutable array of keysyms corresponding to the key in the given layout and shift level. |
If layout
is out of range for this key (that is, larger or equal to the value returned by xkb_keymap_num_layouts_for_key()), it is brought back into range in a manner consistent with xkb_state_key_get_layout().
int xkb_keymap_key_repeats | ( | struct xkb_keymap * | keymap, |
xkb_keycode_t | key | ||
) |
Determine whether a key should repeat or not.
A keymap may specify different repeat behaviors for different keys. Most keys should generally exhibit repeat behavior; for example, holding the 'a' key down in a text editor should normally insert a single 'a' character every few milliseconds, until the key is released. However, there are keys which should not or do not need to be repeated. For example, repeating modifier keys such as Left/Right Shift or Caps Lock is not generally useful or desired.