`xkbcomp -C` mangles the names of virtual-modifier masks
Do, for example:
setxkbmap us -print | xkbcomp -C - - | grep 'vmod_\w*Mask' | less
The #define
lines are okay, with vmod_NumLockMask
, vmod_AltMask
, and so on. But all the lines after that have things like vmod_NumLocMask
, vmod_AlMask
, vmod_LevelThreMask
... They are all missing the final letter of the virtual modifier's name.
The problem is in src/xkbtext.c
, around line 130:
len = strlen(tmp) + 1;
if (format == XkbCFile)
len += 4;
...
if (format == XkbCFile) {
snprintf(rtrn, len, "vmod_%s", tmp);
}
When producing a C-header file, 4 is added to the printing length, to make room for the prefix, but... the prefix vmod_
has 5 bytes. Oops.
A merge request is coming up.