From: Dietmar Maurer <[email protected]> xkeyboard-config 2.37 removed the "AltGr" virtual modifier in favor of mapping upper groups directly to Mod5. Since then, xkb_keymap_mod_get_index(map, "AltGr") returns XKB_MOD_INVALID, so AltGr-based keysyms were never generated.
See: https://gitlab.freedesktop.org/xkeyboard-config/xkeyboard-config/-/commit/473f9bc32f9ba869829cc0d06a75cd1f2560aa60 Try "AltGr" first, and fall back to "Mod5" for compatibility with both old and new xkeyboard-config versions. Signed-off-by: Dietmar Maurer <[email protected]> Reviewed-by: Philippe Mathieu-Daudé <[email protected]> Message-ID: <[email protected]> Signed-off-by: Philippe Mathieu-Daudé <[email protected]> (cherry picked from commit 4e6fb62fb0f33c815b089d0b59e1313b768c55d0) Signed-off-by: Michael Tokarev <[email protected]> diff --git a/qemu-keymap.c b/qemu-keymap.c index 6707067fea..402815139a 100644 --- a/qemu-keymap.c +++ b/qemu-keymap.c @@ -231,6 +231,9 @@ int main(int argc, char *argv[]) shift = get_mod(map, "Shift"); ctrl = get_mod(map, "Control"); altgr = get_mod(map, "AltGr"); + if (!altgr) { + altgr = get_mod(map, "Mod5"); + } numlock = get_mod(map, "NumLock"); state = xkb_state_new(map); -- 2.47.3
