libxkbcommon
0.2.0
|
Enumeration of state components in a keymap. More...
Functions | |
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_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. | |
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. | |
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. | |
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. | |
int | xkb_keymap_key_repeats (struct xkb_keymap *keymap, xkb_keycode_t key) |
Determine whether a key should repeat or not. |
Enumeration of state components in a keymap.
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_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.
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. This must be smaller than: xkb_keymap_num_layouts_for_key(keymap, key)
xkb_state_key_get_layout(state, key)
|
[in] | level | The shift level in the layout for which to get the keysyms. This must be smaller than: xkb_keymap_num_layouts_for_key(keymap, key)
xkb_state_key_get_level(state, key, layout)
|
[out] | syms_out | An immutible array of keysyms corresponding the key in the given layout and shift level. |
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.
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.