aboutsummaryrefslogtreecommitdiff
path: root/src
diff options
context:
space:
mode:
Diffstat (limited to 'src')
-rw-r--r--src/keys.cc4
-rw-r--r--src/keysrc4
2 files changed, 8 insertions, 0 deletions
diff --git a/src/keys.cc b/src/keys.cc
index 54194334..1a39f4c8 100644
--- a/src/keys.cc
+++ b/src/keys.cc
@@ -11,6 +11,7 @@
#include <fltk/events.h>
#include <stdio.h>
+#include <stdlib.h> /* strtol */
#include <string.h>
#include <ctype.h>
@@ -310,6 +311,9 @@ void Keys::parseKey(char *key, char *commandName)
// Get key code
if (!key[1]) {
keycode = *key;
+ } else if (key[0] == '0' && key[1] == 'x') {
+ /* keysym. For details on values reported, see fltk's fltk/events.h */
+ keycode = strtol(key, NULL, 0x10);
} else if ((st = getKeyCode(keystr)) == -1) {
MSG("Keys::parseKey unknown keyname: %s\n", keystr);
} else {
diff --git a/src/keysrc b/src/keysrc
index 1e4f0d34..3f53674f 100644
--- a/src/keysrc
+++ b/src/keysrc
@@ -10,6 +10,10 @@
# "F1" through "F12", "Home", "Insert", "Left", "PageDown", "PageUp",
# "Print", "Return", "Right", "Space", "Tab", "Up".
#
+# If Dillo is running under X11, keys whose names are not recognized can
+# be specified using their keysym value in hexadecimal. Use xev to get
+# the keysym. Example rule: "0x1008ff27 = forward".
+#
# The action "nop" (no operation) can be used to remove a binding.
# "open" lets you browse your local files for one to open.