changeset 23798:594b3116e1b0

(Qlanguage_change): New variable. (syms_of_keyboard): Init it. (kbd_buffer_get_event) [WINDOWSNT]: Generate language-change events. (lispy_function_keys) [HAVE_NTGUI]: Remove names for modifier keys; add name for Escape key; extend to 256 elements. (parse_modifiers): Make non-static.
author Geoff Voelker <voelker@cs.washington.edu>
date Wed, 02 Dec 1998 22:59:11 +0000
parents 5475f2331d88
children 0bf811ce5c67
files src/keyboard.c
diffstat 1 files changed, 21 insertions(+), 6 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Wed Dec 02 19:36:22 1998 +0000
+++ b/src/keyboard.c	Wed Dec 02 22:59:11 1998 +0000
@@ -488,6 +488,7 @@
 Lisp_Object Qmouse_click;
 #ifdef WINDOWSNT
 Lisp_Object Qmouse_wheel;
+Lisp_Object Qlanguage_change;
 #endif
 Lisp_Object Qdrag_n_drop;
 /* Lisp_Object Qmouse_movement; - also an event header */
@@ -3079,6 +3080,17 @@
 	    x_activate_menubar (XFRAME (event->frame_or_window));
 	}
 #endif
+#ifdef WINDOWSNT
+      else if (event->kind == language_change_event)
+	{
+	  /* Make an event (language-change (FRAME CHARSET LCID)).  */
+	  obj = Fcons (event->modifiers, Qnil);
+	  obj = Fcons (event->code, Qnil);
+	  obj = Fcons (event->frame_or_window, obj);
+	  obj = Fcons (Qlanguage_change, Fcons (obj, Qnil));
+	  kbd_fetch_ptr = event + 1;
+	}
+#endif
       /* Just discard these, by returning nil.
 	 With MULTI_KBOARD, these events are used as placeholders
 	 when we need to randomly delete events from the queue.
@@ -3620,15 +3632,15 @@
     
     0, 0,             /*    0x0E .. 0x0F        */
   
-    "shift",          /* VK_SHIFT          0x10 */
-    "control",        /* VK_CONTROL        0x11 */
-    "menu",           /* VK_MENU           0x12 */
+    0,                /* VK_SHIFT          0x10 */
+    0,                /* VK_CONTROL        0x11 */
+    0,                /* VK_MENU           0x12 */
     "pause",          /* VK_PAUSE          0x13 */
-    "capital",        /* VK_CAPITAL        0x14 */
+    "capslock",       /* VK_CAPITAL        0x14 */
     
     0, 0, 0, 0, 0, 0, /*    0x15 .. 0x1A        */
     
-    0,                /* VK_ESCAPE         0x1B */
+    "escape",         /* VK_ESCAPE         0x1B */
     
     0, 0, 0, 0,       /*    0x1C .. 0x1F        */
     
@@ -3755,6 +3767,7 @@
     "noname",        /* VK_NONAME         0xFC */
     "pa1",           /* VK_PA1            0xFD */
     "oem_clear",     /* VK_OEM_CLEAR      0xFE */
+    0 /* 0xFF */
   };
 
 #else /* not HAVE_NTGUI */
@@ -4789,7 +4802,7 @@
    SYMBOL's Qevent_symbol_element_mask property, and maintains the
    Qevent_symbol_elements property.  */
 
-static Lisp_Object
+Lisp_Object
 parse_modifiers (symbol)
      Lisp_Object symbol;
 {
@@ -8917,6 +8930,8 @@
 #ifdef WINDOWSNT
   Qmouse_wheel = intern ("mouse-wheel");
   staticpro (&Qmouse_wheel);
+  Qlanguage_change = intern ("language-change");
+  staticpro (&Qlanguage_change);
 #endif
   Qdrag_n_drop = intern ("drag-n-drop");
   staticpro (&Qdrag_n_drop);