Add NoSymbol into the keysym table, so keysym <-> string conversion works for
that, too; also eliminate special-casing of VoidSymbol.
This will require special-casing in libX11 to preserve its API.
Signed-off-by: Daniel Stone <daniel@fooishbar.org>
{
int i, n, h, idx;
const unsigned char *entry;
+ static char ret[11];
unsigned char val1, val2, val3, val4;
- if (!ks || (ks & ((unsigned long) ~0x1fffffff)) != 0)
+ if ((ks & ((unsigned long) ~0x1fffffff)) != 0)
return NULL;
- if (ks == XK_VoidSymbol)
- ks = 0;
+ /* Not listed in keysymdef.h for hysterical raisins. */
+ if (ks == NoSymbol) {
+ sprintf(ret, "NoSymbol");
+ return ret;
+ }
if (ks <= 0x1fffffff) {
val1 = ks >> 24;
continue;
}
- if (info[ksnum].val == XK_VoidSymbol)
- info[ksnum].val = 0;
if (info[ksnum].val > 0x1fffffff) {
fprintf(stderr,
"ignoring illegal keysym (%s), remove it from .h file!\n",
}
}
+ /* Special case NoSymbol. */
+ info[ksnum].name = strdup("NoSymbol");
+ info[ksnum].val = 0L;
+ ksnum++;
+
printf("/* This file is generated from keysymdef.h. */\n");
printf("/* Do not edit. */\n");
printf("\n");
check_string Undo 0xFF65
check_key 0x1008FF56 XF86Close
check_string ThisKeyShouldNotExist NoSymbol
-check_key 0x0 NULL
+check_key 0x0 NoSymbol
check_string XF86_Switch_VT_5 0x1008FE05
check_key 0x1008FE20 XF86_Ungrab
+check_string VoidSymbol 0xFFFFFF