diff options
author | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-03-17 20:33:17 +0000 |
---|---|---|
committer | Alexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de> | 2004-03-17 20:33:17 +0000 |
commit | c014496ab841a19c3954be2d7eb573aa09363b69 (patch) | |
tree | 2bc7b5fce62e2747e18f6ef6af1d57798b48c42a | |
parent | 7586b1379149e9596c78b0595362c7e6499e9de8 (diff) |
merge with XORG-RELEASE-1 (tag XORG-CYGWIN-LAST-MERGE)CYGWIN-RELEASE-1-MERGE
-rw-r--r-- | exec.c | 18 | ||||
-rw-r--r-- | handle.c | 2 | ||||
-rw-r--r-- | wq.h | 2 | ||||
-rw-r--r-- | xmodmap.c | 2 | ||||
-rw-r--r-- | xmodmap.h | 2 | ||||
-rw-r--r-- | xmodmap.man | 2 |
6 files changed, 20 insertions, 8 deletions
@@ -1,3 +1,4 @@ +/* $XdotOrg: xc/programs/xmodmap/exec.c,v 1.1.4.2.4.1 2004/03/04 17:49:16 eich Exp $ */ /* $Xorg: exec.c,v 1.4 2001/02/09 02:05:56 xorgcvs Exp $ */ /* @@ -212,8 +213,13 @@ void PrintModifierMapping(XModifierKeymap *map, FILE *fp) { int i, k = 0; + int min_keycode, max_keycode, keysyms_per_keycode = 0; - fprintf (fp, + XDisplayKeycodes (dpy, &min_keycode, &max_keycode); + XGetKeyboardMapping (dpy, min_keycode, (max_keycode - min_keycode + 1), + &keysyms_per_keycode); + + fprintf (fp, "%s: up to %d keys per modifier, (keycodes in parentheses):\n\n", ProgramName, map->max_keypermod); for (i = 0; i < 8; i++) { @@ -222,8 +228,14 @@ PrintModifierMapping(XModifierKeymap *map, FILE *fp) fprintf(fp, "%-10s", modifier_table[i].name); for (j = 0; j < map->max_keypermod; j++) { if (map->modifiermap[k]) { - KeySym ks = XKeycodeToKeysym(dpy, map->modifiermap[k], 0); - char *nm = XKeysymToString(ks); + KeySym ks; + int index = 0; + char *nm; + do { + ks = XKeycodeToKeysym(dpy, map->modifiermap[k], index); + index++; + } while ( !ks && index < keysyms_per_keycode); + nm = XKeysymToString(ks); fprintf (fp, "%s %s (0x%0x)", (j > 0 ? "," : ""), (nm ? nm : "BadKey"), map->modifiermap[k]); @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xmodmap/handle.c,v 3.7 2001/12/14 20:02:13 dawes Exp $ */ +/* $XFree86: xc/programs/xmodmap/handle.c,v 3.6 2001/07/25 15:05:27 dawes Exp $ */ #include <X11/Xos.h> #include <X11/Xlib.h> @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xmodmap/wq.h,v 1.5 2001/12/14 20:02:13 dawes Exp $ */ +/* $XFree86: xc/programs/xmodmap/wq.h,v 1.4 2001/01/17 23:46:21 dawes Exp $ */ #ifndef _WQ_H #define _WQ_H @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xmodmap/xmodmap.c,v 1.9 2003/05/27 22:27:08 tsi Exp $ */ +/* $XFree86: xc/programs/xmodmap/xmodmap.c,v 1.8tsi Exp $ */ #include <X11/Xos.h> #include <X11/Xlib.h> @@ -26,7 +26,7 @@ other dealings in this Software without prior written authorization from The Open Group. */ -/* $XFree86: xc/programs/xmodmap/xmodmap.h,v 1.5 2001/12/14 20:02:13 dawes Exp $ */ +/* $XFree86: xc/programs/xmodmap/xmodmap.h,v 1.4 2001/01/17 23:46:21 dawes Exp $ */ extern char *ProgramName; extern Display *dpy; diff --git a/xmodmap.man b/xmodmap.man index 2597184..34a19e3 100644 --- a/xmodmap.man +++ b/xmodmap.man @@ -24,7 +24,7 @@ .\" other dealings in this Software without prior written authorization .\" from The Open Group. .\" -.\" $XFree86: xc/programs/xmodmap/xmodmap.man,v 1.13 2003/06/26 10:19:49 eich Exp $ +.\" $XFree86: xc/programs/xmodmap/xmodmap.man,v 1.11 2002/10/12 16:06:48 herrb Exp $ .\" .de EX \"Begin example .ne 5 |