From d24459b27f54d48f058ffd51dbb33b28503272ac Mon Sep 17 00:00:00 2001 From: Quantum Date: Wed, 29 Jun 2022 18:08:21 -0400 Subject: [PATCH] [client] wayland: correctly convert scan codes to numbers Note that xkb scan code = linux scan code + 8. --- client/displayservers/Wayland/input.c | 1 + 1 file changed, 1 insertion(+) diff --git a/client/displayservers/Wayland/input.c b/client/displayservers/Wayland/input.c index 9be2c2ff..816ae2ef 100644 --- a/client/displayservers/Wayland/input.c +++ b/client/displayservers/Wayland/input.c @@ -211,6 +211,7 @@ done: 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); if (sym == XKB_KEY_NoSymbol) return 0;