mirror of
https://github.com/qemu/qemu.git
synced 2026-07-08 17:56:38 +00:00
qemu-keymap: fix altgr modifier lookup for newer xkeyboard-config
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: 473f9bc32f
Try "AltGr" first, and fall back to "Mod5" for compatibility with
both old and new xkeyboard-config versions.
Signed-off-by: Dietmar Maurer <dietmar@proxmox.com>
Reviewed-by: Philippe Mathieu-Daudé <philmd@linaro.org>
Message-ID: <20260408091459.4001711-1-dietmar@proxmox.com>
Signed-off-by: Philippe Mathieu-Daudé <philmd@linaro.org>
This commit is contained in:
committed by
Philippe Mathieu-Daudé
parent
a34f546c5f
commit
4e6fb62fb0
@@ -230,6 +230,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);
|
||||
|
||||
Reference in New Issue
Block a user