aboutsummaryrefslogtreecommitdiff
path: root/nx-X11/lib
diff options
context:
space:
mode:
Diffstat (limited to 'nx-X11/lib')
-rw-r--r--nx-X11/lib/X11/StrKeysym.c13
1 files changed, 13 insertions, 0 deletions
diff --git a/nx-X11/lib/X11/StrKeysym.c b/nx-X11/lib/X11/StrKeysym.c
index 9bdc80d32..98629ed18 100644
--- a/nx-X11/lib/X11/StrKeysym.c
+++ b/nx-X11/lib/X11/StrKeysym.c
@@ -152,5 +152,18 @@ XStringToKeysym(_Xconst char *s)
return val;
return val | 0x01000000;
}
+
+ /* Stupid inconsistency between the headers and XKeysymDB: the former has
+ * no separating underscore, while some XF86* syms in the latter did.
+ * As a last ditch effort, try without. */
+ if (strncmp(s, "XF86_", 5) == 0) {
+ KeySym ret;
+ char *tmp = strdup(s);
+ memmove(&tmp[4], &tmp[5], strlen(s) - 5 + 1);
+ ret = XStringToKeysym(tmp);
+ free(tmp);
+ return ret;
+ }
+
return NoSymbol;
}