summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Stone <daniel@fooishbar.org>2012-05-09 20:18:30 +0100
committerDaniel Stone <daniel@fooishbar.org>2012-05-09 20:18:30 +0100
commit5a3771d149dd12266ea01c13c56de0277ba901c8 (patch)
tree89a4d282da859f47a445e2b0ce154af030f7afc4
parent693d0578f258eab612615e1a3d14b28f6e6825d8 (diff)
downloadxorg-lib-libxkbcommon-5a3771d149dd12266ea01c13c56de0277ba901c8.tar.gz
Add common LED names to xkbcommon-names.h
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
-rw-r--r--include/xkbcommon/xkbcommon-names.h4
-rw-r--r--test/state.c4
2 files changed, 6 insertions, 2 deletions
diff --git a/include/xkbcommon/xkbcommon-names.h b/include/xkbcommon/xkbcommon-names.h
index 45e9df5..c302a35 100644
--- a/include/xkbcommon/xkbcommon-names.h
+++ b/include/xkbcommon/xkbcommon-names.h
@@ -32,4 +32,8 @@
#define XKB_MOD_NAME_ALT "Mod1"
#define XKB_MOD_NAME_LOGO "Mod4"
+#define XKB_LED_NAME_CAPS "Caps Lock"
+#define XKB_LED_NAME_NUM "Num Lock"
+#define XKB_LED_NAME_SCROLL "Scroll Lock"
+
#endif
diff --git a/test/state.c b/test/state.c
index 45e7ca9..a147aea 100644
--- a/test/state.c
+++ b/test/state.c
@@ -152,7 +152,7 @@ test_update_key(struct xkb_keymap *keymap)
print_state(state);
assert(xkb_state_mod_name_is_active(state, XKB_MOD_NAME_CAPS,
XKB_STATE_LOCKED));
- assert(xkb_state_led_name_is_active(state, XKB_MOD_NAME_CAPS));
+ assert(xkb_state_led_name_is_active(state, XKB_LED_NAME_CAPS));
num_syms = xkb_key_get_syms(state, KEY_Q + EVDEV_OFFSET, &syms);
assert(num_syms == 1 && syms[0] == XKB_KEY_Q);
@@ -161,7 +161,7 @@ test_update_key(struct xkb_keymap *keymap)
xkb_state_update_key(state, KEY_CAPSLOCK + EVDEV_OFFSET, XKB_KEY_UP);
assert(!xkb_state_mod_name_is_active(state, XKB_MOD_NAME_CAPS,
XKB_STATE_EFFECTIVE));
- assert(!xkb_state_led_name_is_active(state, XKB_MOD_NAME_CAPS));
+ assert(!xkb_state_led_name_is_active(state, XKB_LED_NAME_CAPS));
num_syms = xkb_key_get_syms(state, KEY_Q + EVDEV_OFFSET, &syms);
assert(num_syms == 1 && syms[0] == XKB_KEY_q);