diff options
author | Ran Benita <ran@unusedvar.com> | 2020-10-11 09:55:14 +0300 |
---|---|---|
committer | GitHub <noreply@github.com> | 2020-10-11 09:55:14 +0300 |
commit | 21e640fbc7ec2e53244e4e531ae7c32f249b023f (patch) | |
tree | 9ad92098e55a3474cfa256ec32ecea1000768788 | |
parent | 2c295b10aa87e9bd8c11954adcf7e92b031b92f9 (diff) | |
download | libxkbcommon-21e640fbc7ec2e53244e4e531ae7c32f249b023f.tar.gz libxkbcommon-21e640fbc7ec2e53244e4e531ae7c32f249b023f.tar.bz2 libxkbcommon-21e640fbc7ec2e53244e4e531ae7c32f249b023f.zip |
doc: add note about "short" layout names (#194)
Fixes: https://github.com/xkbcommon/libxkbcommon/issues/193
Signed-off-by: Ran Benita <ran@unusedvar.com>
-rw-r--r-- | xkbcommon/xkbcommon.h | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/xkbcommon/xkbcommon.h b/xkbcommon/xkbcommon.h index d6a02a7..ee7143c 100644 --- a/xkbcommon/xkbcommon.h +++ b/xkbcommon/xkbcommon.h @@ -208,6 +208,15 @@ typedef uint32_t xkb_keysym_t; * Therefore, it is not safe to use the name as a unique identifier for a * layout. Layout names are case-sensitive. * + * Layout names are specified in the layout's definition, for example + * "English (US)". These are different from the (conventionally) short names + * which are used to locate the layout, for example "us" or "us(intl)". These + * names are not present in a compiled keymap. + * + * If the user selects layouts from a list generated from the XKB registry + * (using libxkbregistry or directly), and this metadata is needed later on, it + * is recommended to store it along with the keymap. + * * Layouts are also called "groups" by XKB. * * @sa xkb_keymap_num_layouts() xkb_keymap_num_layouts_for_key() @@ -1087,6 +1096,7 @@ xkb_keymap_num_layouts(struct xkb_keymap *keymap); * a name, returns NULL. * * @sa xkb_layout_index_t + * For notes on layout names. * @memberof xkb_keymap */ const char * @@ -1099,6 +1109,8 @@ xkb_keymap_layout_get_name(struct xkb_keymap *keymap, xkb_layout_index_t idx); * XKB_LAYOUT_INVALID. If more than one layout in the keymap has this name, * returns the lowest index among them. * + * @sa xkb_layout_index_t + * For notes on layout names. * @memberof xkb_keymap */ xkb_layout_index_t |