[PATCH xkbcomp] keycodes: Ignore high keycodes
Ran Benita
ran234 at gmail.com
Thu Apr 6 18:57:26 UTC 2017
On Thu, Apr 06, 2017 at 05:37:28PM +0100, Daniel Stone wrote:
> Rather than throwing a fatal error when a keycode definition exceeds the
> declared maximum (i.e. 255), just ignore the definition and continue.
>
> This allows xkeyboard-config to start shipping datasets including high
> keycodes, which will work in xkbcommon as it ignores explicit range
> declarations.
I always hoped that Wayland systems could switch to a new keycode file,
which uses the full evdev key names (xkbcommon no longer has the 4
character limit), and the evdev codes (without the + 8 offset), and
aliases for backward compat with existing keymaps. But I guess that
would be a lot of pain for little gain.
So this seems like a good idea to me, to move things forward.
My only concern about the patch is that I think that it will issue a
million warnings if keymaps start to use this? I looked at utils.c (a
true relic) and it seems that there is no filtering on these ERROR2 and
ACTION2, they just print. Add to that other files which would start to
use the new keycodes, and you get more warnings (hopefully not fatal
errors).
I think a reasonable test plan would be:
- Add ~15 new >255 keycodes.
- Use them in some symbols file.
- Try to load this with a patched xkbcomp.
- See that:
- There's not a huge log spam.
- That it actually doesn't fail.
Note that I say ~15, because I vaguely remember that there are "allow 10
errors then give up" checks in some places.
Ran
More information about the xorg-devel
mailing list