commit 75c98dc
Michael Forney
·
2014-02-09 12:41:00 +0000 UTC
parent 90211ed
bindings: Add some comments about which keysyms are used
1 files changed,
+2,
-0
+2,
-0
1@@ -73,6 +73,7 @@ bool handle_key(struct swc_keyboard * keyboard, uint32_t time,
2 {
3 xkb_keysym_t keysym;
4
5+ /* First try the keysym the keymap generates in it's current state. */
6 keysym = xkb_state_key_get_one_sym(keyboard->xkb.state, XKB_KEY(key));
7
8 if (handle_binding(&key_bindings, time, keyboard->modifiers, keysym, state))
9@@ -81,6 +82,7 @@ bool handle_key(struct swc_keyboard * keyboard, uint32_t time,
10 xkb_layout_index_t layout;
11 const xkb_keysym_t * keysyms;
12
13+ /* Then try the keysym associated with shift-level 0 for the key. */
14 layout = xkb_state_key_get_layout(keyboard->xkb.state, XKB_KEY(key));
15 xkb_keymap_key_get_syms_by_level(keyboard->xkb.keymap.map, XKB_KEY(key),
16 layout, 0, &keysyms);