Skip to content

XF86keysym.h: reserve a range for Linux keysyms

The Linux kernel adds a few evdev keycodes roughly every other release. These aren't available through XKB until they have been added as keycode in xkeyboard-config and as keysym in the X11 proto headers.

In the past, this was done manually - a suitable keysym was picked at random and then added 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 Linux kernel codes. That's 4095 values, the kernel currently uses only 767 anyway. keysyms within that range have to match the kernel defines to make them easy to add and search for. Nothing in X must care about the actual keysym value anyway.

And now that we have that range, let's add keysyms for (some) keys added since 4.12.

Notes:

This is semi-automated: there's a script that can add new keysym (given libevdev and a kernel repository) but each of those will have to be manually reviewed in case it already has a mapping. For future keys it's likely easier, but there's a large backlog from the pre 3.16 kernels.

Matching xkeyboard-config MR is xkeyboard-config/xkeyboard-config!172 (merged)

cc @jwrdegoede, @bluetech, @svu

Edited by Peter Hutterer

Merge request reports

Loading