summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--tools/xsetwacom.c8
1 files changed, 8 insertions, 0 deletions
diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c
index d475947..69b5486 100644
--- a/tools/xsetwacom.c
+++ b/tools/xsetwacom.c
@@ -1078,7 +1078,15 @@ static int special_map_keystrokes(Display *dpy, int argc, char **argv, unsigned
} else
need_press = need_release = 1;
+
ks = XStringToKeysym(key);
+ if (ks == 0) {
+ key = convert_specialkey(key);
+ ks = XStringToKeysym(key);
+ if (ks == 0)
+ fprintf(stderr, "Warning: unable to map '%s' to a keycode.\n", key);
+ }
+
kc = keysym_to_keycode(dpy, ks);
if (need_press)