- Keys from Linux ≤ 2.6.11. Most are TODOs made explicit.
- Add `XF86XK_MonBrightnessAuto` and make `XF86XK_BrightnessAuto` its
deprecated alias, for consistency with `XF86XK_BrightnessMin`
- Add `XF86XK_LinkPhone` from Linux 6.14
- Add `XF86XK_PerformanceMode" from Linux 6.17
- Fix and improve the keysym generator script
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Co-authored-by: Kai Uwe Broulik <kde@privat.broulik.de>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/103>
Some keysyms were renamed compared to their Linux kernel counterparts,
to avoid names that are too ambiguous. Names are inspired by the “HID
usage table for USB”.
Some keys were left unmapped due to their ambiguous function.
Also fixed the keysyms script to handle minor new use cases.
Miscellaneous notes:
- `KEY_CHANNEL`: Described as “Go to the next favorite channel” in the
Linux RC tables, thus mapped to `XF86XK_NextFavorite`.
- `KEY_PVR`: The accronym means “personal video recorder”, but there
are multiple comments in the kernel refering to it as “Media Select
Home”.
- `KEY_MODE`: Described as labelled "MONO/STEREO" with the function
"Change sound mode" in the Linux RC tables, thus mapped to the more
explicit `XF86XK_AudioChannelMode`.
- `KEY_DIGITS`: Describe as “Use more than one digit for channel”, it
denotes various number entry modes that depend on the device, thus
mapped to the more explicit `XF86XK_NumberEntryMode`, inspired by its
entry in the CEC protocol.
Resources:
- Linux Remote controller tables:
https://www.kernel.org/doc/html/v6.14/userspace-api/media/rc/rc-tables.html
- Linux HID key mmappings:
https://git.kernel.org/pub/scm/linux/kernel/git/torvalds/linux.git/tree/drivers/hid/hid-input.c
- HID Usage Tables for USB:
https://usb.org/sites/default/files/hut1_6.pdf
- Kodi: https://github.com/xbmc/xbmc
Co-authored-by: Oliver Gerlich <oliver.gerlich@gmx.de>
Co-authored-by: Pierre Le Marre <dev@wismill.eu>
Part-of: <https://gitlab.freedesktop.org/xorg/proto/xorgproto/-/merge_requests/93>
- Harmonize format by using lower case hexadecimal notation.
- Normalize keysym padding: use spaces instead of tabulations
with the same amount everywhere.
- Update generator to new format.
autotools can't pass arguments, so let's default to 'verify' in the script
itself and for distcheck to succeed, we need to set an environment variable to
search for the header (it's an out-of-tree build).
And due to the very faint chance of there being no python during the
xorgproto build, let's make that conditional too.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>
The Linux kernel adds a few evdev keycodes roughly every other release. These
aren't available as keysyms through XKB until they have been added as keycode
in xkeyboard-config and mapped there to a newly defined keysym in the X11
proto headers.
In the past, this was done manually, a suitable keysym was picked at
random and the mapping updated accordingly. This doesn't scale very well and,
given we have a large reserved range for XF86 keysyms anyway, can be done
easier.
Let's reserve the range 0x10081XXX range for a 1:1 mapping of Linux kernel
codes. That's 4095 values, the kernel currently uses only 767 anyway. The
lower 3 bytes of keysyms within that range have to match the kernel value to
make them easy to add and search for. Nothing in X must care about the actual
keysym value anyway.
Since we expect this to be parsed by other scripts for automatic updating, the
format of those #defines is quite strict. Add a script to generate keycodes as
well as verify that the existing ones match the current expected format.
The script is integrated into the CI and meson test, so we will fail if an
update breaks the expectations.
Signed-off-by: Peter Hutterer <peter.hutterer@who-t.net>