Upgrade microcode to pass X keysyms in keyboard events through to Edwin.
authorArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 6 Aug 1991 15:12:05 +0000 (15:12 +0000)
committerArthur Gleckler <edu/mit/csail/zurich/arthur>
Tue, 6 Aug 1991 15:12:05 +0000 (15:12 +0000)
v7/src/microcode/version.h
v7/src/microcode/x11base.c
v8/src/microcode/version.h

index 8a7f23f06b26c4a155d0d1e760483fbdec50898c..996219ffd941a0c6557dbe37e31cbcb6b2f974b8 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.91 1991/07/24 19:47:41 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/Attic/version.h,v 11.92 1991/08/06 15:12:05 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     91
+#define SUBVERSION     92
 #endif
index 7f9c3c2c8d1e4dd0947056b7da7c3263c1ec76dd..4b79c89479edbf56bba43983b496101390e999ed 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.24 1991/07/26 21:52:37 arthur Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v7/src/microcode/x11base.c,v 1.25 1991/08/06 15:11:28 arthur Exp $
 
 Copyright (c) 1989-91 Massachusetts Institute of Technology
 
@@ -543,6 +543,8 @@ enum event_type
 #define EVENT_2 4
 #define EVENT_3 5
 
+#define EVENT_EXTRA(max_event) (max_event - 1)
+
 #define EVENT_INTEGER(event, slot, number)                             \
   VECTOR_SET ((event), (slot), (long_to_integer (number)))
 
@@ -625,28 +627,37 @@ DEFUN (key_event, (xw, event, type),
                    (sizeof (copy_buffer)),
                    (&keysym),
                    (&compose_status)));
-  if ((nbytes < 1) || (IsModifierKey (keysym)))
+  if (IsModifierKey (keysym))
     return (SHARP_F);
   else
     {
       long bucky = 0;
 
-      SCHEME_OBJECT result = (make_event_object (xw, type, 2));
-      if (nbytes == 1)
-      {
-       /* Convert to Scheme bucky bits (kept independent of the */
-       /* character).  Let X handle controlification. */
-       if ((event -> state) & Mod1Mask) /* Meta */
-         bucky |= 1;
-       if ((event -> state) & Mod2Mask) /* Super */
-         bucky |= 4;
-       if ((event -> state) & Mod3Mask) /* Hyper */
-         bucky |= 8;
-       if ((event -> state) & Mod4Mask) /* Top */
-         bucky |= 16;
-      }
+      SCHEME_OBJECT result
+       = (make_event_object (xw, type, EVENT_EXTRA (EVENT_2)));
+
+      /* Create Scheme bucky bits (kept independent of the */
+      /* character).  X has already controlified, so Scheme may */
+      /* choose to ignore the control bucky bit. */
+      if ((event -> state) & Mod1Mask) /* Meta */
+       bucky |= 1;
+      if ((event -> state) & ControlMask) /* Control */
+       bucky |= 2;
+      if ((event -> state) & Mod2Mask) /* Super */
+       bucky |= 4;
+      if ((event -> state) & Mod3Mask) /* Hyper */
+       bucky |= 8;
+      if ((event -> state) & Mod4Mask) /* Top */
+       bucky |= 16;
       VECTOR_SET (result, EVENT_0, (memory_to_string (nbytes, copy_buffer)));
       VECTOR_SET (result, EVENT_1, LONG_TO_UNSIGNED_FIXNUM (bucky));
+      /* Move vendor-specific bit from bit 28 (zero-based) to bit 23 */
+      /* so that all keysym values will fit in Scheme fixnums. */
+      VECTOR_SET
+       (result,
+        EVENT_2,
+        LONG_TO_UNSIGNED_FIXNUM ((keysym & 0xffffff)
+                                 | (0x800000 & (keysym >> 5))));
       return (result);
     }
 }
index 46d8c37b5b07839633d30a1d6a3a3818b6fb7e31..62547bb7b948d378904959ac46991f59f67210f2 100644 (file)
@@ -1,6 +1,6 @@
 /* -*-C-*-
 
-$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.91 1991/07/24 19:47:41 jinx Exp $
+$Header: /Users/cph/tmp/foo/mit-scheme/mit-scheme/v8/src/microcode/version.h,v 11.92 1991/08/06 15:12:05 arthur Exp $
 
 Copyright (c) 1988-91 Massachusetts Institute of Technology
 
@@ -46,5 +46,5 @@ MIT in each case. */
 #define VERSION                11
 #endif
 #ifndef SUBVERSION
-#define SUBVERSION     91
+#define SUBVERSION     92
 #endif