xsetwacom accepts keys in X11 KeySyms format. To make the interface user friendly, we mapped a set of modifiers to aliases that can be recognized by most users. But, there are a few less recognizable or confusing keys/modifiers left. This patch tells users where to find the X11 KeySyms code they are looking for.
Return key is added as a bonus (by-product ;). Signed-off-by: Ping Cheng <pi...@wacom.com> Tested-by: Kelly Price <strredw...@gmail.com> --- man/xsetwacom.man | 13 +++++++------ tools/xsetwacom.c | 4 ++++ 2 files changed, 11 insertions(+), 6 deletions(-) diff --git a/man/xsetwacom.man b/man/xsetwacom.man index 1930d67..8276e32 100644 --- a/man/xsetwacom.man +++ b/man/xsetwacom.man @@ -109,17 +109,18 @@ button-number will produce a press of X11 button 3 (i.e. right click). Action mappings allow button presses to perform many events. They take the form of a string of keywords and arguments. -The "key" keyword is following by a list of key names. These can optionally +The "key" keyword is followed by a list of key names. These can optionally be preceded by "+" for press and "-" for release. If +/- is not given, press-and-release is assumed, except for modifier keys which are left pressed. -Key names can be X11 KeySyms or some aliases such as 'shift' or 'f1' (the +Key names can be X11 KeySyms code or some aliases such as 'shift' or 'f1' (the full list can be seen with the .B list modifiers -command). +command). To assign a key that is not in the modifiers list, look for its KeySyms +code in keysymdef.h under /usr/include/X11 on your system. -For example, "key +a +shift b -shift -a" converts the button into a series of -keystrokes, in this example "press a, press shift, press and release b, -release shift, release a". +For example, "key +a +shift b -shift -a 0xff0d" converts the button into a +series of keystrokes, in this example "press a, press shift, press and release b, +release shift, release a, then enter". The "button" keyword is similar except that its arguments are X11 button numbers. diff --git a/tools/xsetwacom.c b/tools/xsetwacom.c index 2f75d78..aa5f7a1 100644 --- a/tools/xsetwacom.c +++ b/tools/xsetwacom.c @@ -605,6 +605,8 @@ static struct modifier specialkeys[] = { {"backspace", "BackSpace"}, {"Backspace", "BackSpace"}, + {"return", "Return"}, + {"tab", "Tab"}, {"PgUp", "Prior"}, {"PgDn", "Next"}, @@ -937,6 +939,8 @@ static void list_mod(Display *dpy) m = specialkeys; while(m->name) printf(" %s\n", m++->name); + + printf("If you don't see your special key listed above, please use its keysyms code or refer to man page for details.\n"); } static void list(Display *dpy, int argc, char **argv) -- 1.9.1 ------------------------------------------------------------------------------ _______________________________________________ Linuxwacom-devel mailing list Linuxwacom-devel@lists.sourceforge.net https://lists.sourceforge.net/lists/listinfo/linuxwacom-devel