[client] wayland: correctly convert scan codes to numbers

Note that xkb scan code = linux scan code + 8.
This commit is contained in:
Quantum 2022-06-29 18:08:21 -04:00 committed by Geoffrey McRae
parent da04a6dd54
commit d24459b27f

View File

@ -211,6 +211,7 @@ done:
static int getCharcode(uint32_t key) static int getCharcode(uint32_t key)
{ {
key += 8; // xkb scancode is evdev scancode + 8
xkb_keysym_t sym = xkb_state_key_get_one_sym(wlWm.xkbState, key); xkb_keysym_t sym = xkb_state_key_get_one_sym(wlWm.xkbState, key);
if (sym == XKB_KEY_NoSymbol) if (sym == XKB_KEY_NoSymbol)
return 0; return 0;