diff options
author | corvid <corvid@lavabit.com> | 2009-11-04 17:33:31 +0000 |
---|---|---|
committer | corvid <corvid@lavabit.com> | 2009-11-04 17:33:31 +0000 |
commit | 2b70a4bb1afb9c9b31ffbf4bb29a6e5e26433b10 (patch) | |
tree | 05adc2b4827e02207d39b69eaa0eae400b5b3410 | |
parent | e1a7010ec491edcf30a790cb54f4448f36dcbf83 (diff) |
allow keysyms in keysrc
-rw-r--r-- | ChangeLog | 1 | ||||
-rw-r--r-- | src/keys.cc | 4 | ||||
-rw-r--r-- | src/keysrc | 4 |
3 files changed, 9 insertions, 0 deletions
@@ -47,6 +47,7 @@ dillo-2.2 [??] - Fix segfault when radio button lacks name attribute. - Enable popup menu below bottom of page content (BUG#856). - Handle JPEGs with CMYK color space. + - Allow keysyms in keysrc. Patches: corvid +- Support for the letter-spacing property. Patch: Johannes Hofmann, corvid 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 { @@ -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. |