Skip to content

Commit

Permalink
Add XKB_LED_NAME_COMPOSE and XKB_LED_NAME_KANA
Browse files Browse the repository at this point in the history
  • Loading branch information
C0rn3j authored and wismill committed Sep 3, 2024
1 parent 5e539bf commit 9af1f9f
Show file tree
Hide file tree
Showing 2 changed files with 11 additions and 1 deletion.
4 changes: 4 additions & 0 deletions changes/api/+compose-and-kana-led-names.features.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
`xkbcommon-names.h`: Add `XKB_LED_NAME_COMPOSE` and `XKB_LED_NAME_KANA` definitions
to cover all LEDs defined in [USB HID](https://usb.org/sites/default/files/hid1_11.pdf).

Contributed by Martin Rys
8 changes: 7 additions & 1 deletion include/xkbcommon/xkbcommon-names.h
Original file line number Diff line number Diff line change
Expand Up @@ -31,15 +31,21 @@
* @brief Predefined names for common modifiers and LEDs.
*/

/* Real modifiers names are hardcoded in libxkbcommon */
#define XKB_MOD_NAME_SHIFT "Shift"
#define XKB_MOD_NAME_CAPS "Lock"
#define XKB_MOD_NAME_CTRL "Control"
#define XKB_MOD_NAME_ALT "Mod1"
#define XKB_MOD_NAME_NUM "Mod2"
#define XKB_MOD_NAME_LOGO "Mod4"

#define XKB_LED_NAME_CAPS "Caps Lock"
/* LEDs names are encoded in xkeyboard-config, in the keycodes and compat files.
* They have been stable since the beginning of the project and are unlikely to
* ever change. */
#define XKB_LED_NAME_NUM "Num Lock"
#define XKB_LED_NAME_CAPS "Caps Lock"
#define XKB_LED_NAME_SCROLL "Scroll Lock"
#define XKB_LED_NAME_COMPOSE "Compose"
#define XKB_LED_NAME_KANA "Kana"

#endif

0 comments on commit 9af1f9f

Please sign in to comment.