Commit e92efc63 authored by Peter Hutterer's avatar Peter Hutterer
Browse files

makekeys: handle the new _EVDEVK xorgproto symbols

These keys are all defined through a macro in the form:
   #define XF86XK_BrightnessAuto		_EVDEVK(0x0F4)

The _EVDEVK macro is simply an offset of 0x10081000.
Let's parse these lines correctly so those keysyms end up in our
Signed-off-by: Peter Hutterer's avatarPeter Hutterer <>
parent d01d2337
Pipeline #367886 passed with stages
in 8 minutes and 33 seconds
......@@ -78,6 +78,18 @@ parse_line(const char *buf, char *key, KeySym *val, char *prefix)
return 1;
/* See if we can parse one of the _EVDEVK symbols */
i = sscanf(buf, "#define %127s _EVDEVK(0x%lx)", key, val);
if (i == 2 && (tmp = strstr(key, "XK_"))) {
memcpy(prefix, key, (size_t)(tmp - key));
prefix[tmp - key] = '\0';
tmp += 3;
memmove(key, tmp, strlen(tmp) + 1);
*val += 0x10081000;
return 1;
/* Now try to catch alias (XK_foo XK_bar) definitions, and resolve them
* immediately: if the target is in the form XF86XK_foo, we need to
* canonicalise this to XF86foo before we do the lookup. */
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment