summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:33:17 +0000
committerAlexander Gottwald <alexander.gottwald@s1999.tu-chemnitz.de>2004-03-17 20:33:17 +0000
commitc014496ab841a19c3954be2d7eb573aa09363b69 (patch)
tree2bc7b5fce62e2747e18f6ef6af1d57798b48c42a
parent7586b1379149e9596c78b0595362c7e6499e9de8 (diff)
merge with XORG-RELEASE-1 (tag XORG-CYGWIN-LAST-MERGE)CYGWIN-RELEASE-1-MERGE
-rw-r--r--exec.c18
-rw-r--r--handle.c2
-rw-r--r--wq.h2
-rw-r--r--xmodmap.c2
-rw-r--r--xmodmap.h2
-rw-r--r--xmodmap.man2
6 files changed, 20 insertions, 8 deletions
diff --git a/exec.c b/exec.c
index d23bf49..ab2e067 100644
--- a/exec.c
+++ b/exec.c
@@ -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]);
diff --git a/handle.c b/handle.c
index 9d91d55..09f40cb 100644
--- a/handle.c
+++ b/handle.c
@@ -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>
diff --git a/wq.h b/wq.h
index 5caa8a1..3aab10f 100644
--- a/wq.h
+++ b/wq.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
diff --git a/xmodmap.c b/xmodmap.c
index 6cdb7f1..a67493f 100644
--- a/xmodmap.c
+++ b/xmodmap.c
@@ -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>
diff --git a/xmodmap.h b/xmodmap.h
index 1a9a91c..0d2f779 100644
--- a/xmodmap.h
+++ b/xmodmap.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