aboutsummaryrefslogtreecommitdiffstats
path: root/src
diff options
context:
space:
mode:
authorGeoff Voelker1998-12-02 22:59:11 +0000
committerGeoff Voelker1998-12-02 22:59:11 +0000
commit1161d3675c35b7017a0e6ca2bef88157e691c039 (patch)
tree520e9d13f2b32948d06f0a6ec2256bfe1766d40c /src
parent3b313ca8d1f9a6bf2c3c422b9678aa3378bd01dd (diff)
downloademacs-1161d3675c35b7017a0e6ca2bef88157e691c039.tar.gz
emacs-1161d3675c35b7017a0e6ca2bef88157e691c039.zip
(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.
Diffstat (limited to 'src')
-rw-r--r--src/keyboard.c27
1 files changed, 21 insertions, 6 deletions
diff --git a/src/keyboard.c b/src/keyboard.c
index a81bb5b04aa..b5d9f3c1479 100644
--- a/src/keyboard.c
+++ b/src/keyboard.c
@@ -488,6 +488,7 @@ Lisp_Object Qfunction_key;
488Lisp_Object Qmouse_click; 488Lisp_Object Qmouse_click;
489#ifdef WINDOWSNT 489#ifdef WINDOWSNT
490Lisp_Object Qmouse_wheel; 490Lisp_Object Qmouse_wheel;
491Lisp_Object Qlanguage_change;
491#endif 492#endif
492Lisp_Object Qdrag_n_drop; 493Lisp_Object Qdrag_n_drop;
493/* Lisp_Object Qmouse_movement; - also an event header */ 494/* Lisp_Object Qmouse_movement; - also an event header */
@@ -3079,6 +3080,17 @@ kbd_buffer_get_event (kbp, used_mouse_menu)
3079 x_activate_menubar (XFRAME (event->frame_or_window)); 3080 x_activate_menubar (XFRAME (event->frame_or_window));
3080 } 3081 }
3081#endif 3082#endif
3083#ifdef WINDOWSNT
3084 else if (event->kind == language_change_event)
3085 {
3086 /* Make an event (language-change (FRAME CHARSET LCID)). */
3087 obj = Fcons (event->modifiers, Qnil);
3088 obj = Fcons (event->code, Qnil);
3089 obj = Fcons (event->frame_or_window, obj);
3090 obj = Fcons (Qlanguage_change, Fcons (obj, Qnil));
3091 kbd_fetch_ptr = event + 1;
3092 }
3093#endif
3082 /* Just discard these, by returning nil. 3094 /* Just discard these, by returning nil.
3083 With MULTI_KBOARD, these events are used as placeholders 3095 With MULTI_KBOARD, these events are used as placeholders
3084 when we need to randomly delete events from the queue. 3096 when we need to randomly delete events from the queue.
@@ -3620,15 +3632,15 @@ char *lispy_function_keys[] =
3620 3632
3621 0, 0, /* 0x0E .. 0x0F */ 3633 0, 0, /* 0x0E .. 0x0F */
3622 3634
3623 "shift", /* VK_SHIFT 0x10 */ 3635 0, /* VK_SHIFT 0x10 */
3624 "control", /* VK_CONTROL 0x11 */ 3636 0, /* VK_CONTROL 0x11 */
3625 "menu", /* VK_MENU 0x12 */ 3637 0, /* VK_MENU 0x12 */
3626 "pause", /* VK_PAUSE 0x13 */ 3638 "pause", /* VK_PAUSE 0x13 */
3627 "capital", /* VK_CAPITAL 0x14 */ 3639 "capslock", /* VK_CAPITAL 0x14 */
3628 3640
3629 0, 0, 0, 0, 0, 0, /* 0x15 .. 0x1A */ 3641 0, 0, 0, 0, 0, 0, /* 0x15 .. 0x1A */
3630 3642
3631 0, /* VK_ESCAPE 0x1B */ 3643 "escape", /* VK_ESCAPE 0x1B */
3632 3644
3633 0, 0, 0, 0, /* 0x1C .. 0x1F */ 3645 0, 0, 0, 0, /* 0x1C .. 0x1F */
3634 3646
@@ -3755,6 +3767,7 @@ char *lispy_function_keys[] =
3755 "noname", /* VK_NONAME 0xFC */ 3767 "noname", /* VK_NONAME 0xFC */
3756 "pa1", /* VK_PA1 0xFD */ 3768 "pa1", /* VK_PA1 0xFD */
3757 "oem_clear", /* VK_OEM_CLEAR 0xFE */ 3769 "oem_clear", /* VK_OEM_CLEAR 0xFE */
3770 0 /* 0xFF */
3758 }; 3771 };
3759 3772
3760#else /* not HAVE_NTGUI */ 3773#else /* not HAVE_NTGUI */
@@ -4789,7 +4802,7 @@ lispy_modifier_list (modifiers)
4789 SYMBOL's Qevent_symbol_element_mask property, and maintains the 4802 SYMBOL's Qevent_symbol_element_mask property, and maintains the
4790 Qevent_symbol_elements property. */ 4803 Qevent_symbol_elements property. */
4791 4804
4792static Lisp_Object 4805Lisp_Object
4793parse_modifiers (symbol) 4806parse_modifiers (symbol)
4794 Lisp_Object symbol; 4807 Lisp_Object symbol;
4795{ 4808{
@@ -8917,6 +8930,8 @@ syms_of_keyboard ()
8917#ifdef WINDOWSNT 8930#ifdef WINDOWSNT
8918 Qmouse_wheel = intern ("mouse-wheel"); 8931 Qmouse_wheel = intern ("mouse-wheel");
8919 staticpro (&Qmouse_wheel); 8932 staticpro (&Qmouse_wheel);
8933 Qlanguage_change = intern ("language-change");
8934 staticpro (&Qlanguage_change);
8920#endif 8935#endif
8921 Qdrag_n_drop = intern ("drag-n-drop"); 8936 Qdrag_n_drop = intern ("drag-n-drop");
8922 staticpro (&Qdrag_n_drop); 8937 staticpro (&Qdrag_n_drop);