Re: [PATCH] qemu-keymap: fix altgr modifier lookup for newer xkeyboard-config

Philippe Mathieu-Daudé <[email protected]> Sun, 12 Apr 2026 19:23:46 +0200
Newsgroups org.nongnu.qemu-trivial,org.nongnu.qemu-devel
Message-ID <[email protected]>
On 12/4/26 09:10, Michael Tokarev wrote:
> On 08.04.2026 12:14, Dietmar Maurer wrote:
>> 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.
> 
> Maybe we can go the other way 'round, namely, first try Mod5,
> and if that's not available, try AltGr?  This way, "current"
> way will be tried first, and "compat" way will be a last resort?

Hmm clever. Dietmar, do you mind posting a follow-up cleanup patch?

> 
> But anyway,
> 
> Reviewed-by: Michael Tokarev <[email protected]>
> 
> Thanks,
> 
> /mjt