comparison src/keyboard.c @ 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 eac4b475c2ea
children 5ad15fde58a9
comparison
equal deleted inserted replaced
23797:5475f2331d88 23798:594b3116e1b0
486 /* Symbols to denote kinds of events. */ 486 /* Symbols to denote kinds of events. */
487 Lisp_Object Qfunction_key; 487 Lisp_Object Qfunction_key;
488 Lisp_Object Qmouse_click; 488 Lisp_Object Qmouse_click;
489 #ifdef WINDOWSNT 489 #ifdef WINDOWSNT
490 Lisp_Object Qmouse_wheel; 490 Lisp_Object Qmouse_wheel;
491 Lisp_Object Qlanguage_change;
491 #endif 492 #endif
492 Lisp_Object Qdrag_n_drop; 493 Lisp_Object Qdrag_n_drop;
493 /* Lisp_Object Qmouse_movement; - also an event header */ 494 /* Lisp_Object Qmouse_movement; - also an event header */
494 495
495 /* Properties of event headers. */ 496 /* Properties of event headers. */
3077 input_pending = readable_events (0); 3078 input_pending = readable_events (0);
3078 if (FRAME_LIVE_P (XFRAME (event->frame_or_window))) 3079 if (FRAME_LIVE_P (XFRAME (event->frame_or_window)))
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.
3085 (They shouldn't otherwise be found in the buffer, 3097 (They shouldn't otherwise be found in the buffer,
3086 but on some machines it appears they do show up 3098 but on some machines it appears they do show up
3618 "clear", /* VK_CLEAR 0x0C */ 3630 "clear", /* VK_CLEAR 0x0C */
3619 "return", /* VK_RETURN 0x0D */ 3631 "return", /* VK_RETURN 0x0D */
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
3635 0, /* VK_SPACE 0x20 */ 3647 0, /* VK_SPACE 0x20 */
3636 "prior", /* VK_PRIOR 0x21 */ 3648 "prior", /* VK_PRIOR 0x21 */
3753 "play", /* VK_PLAY 0xFA */ 3765 "play", /* VK_PLAY 0xFA */
3754 "zoom", /* VK_ZOOM 0xFB */ 3766 "zoom", /* VK_ZOOM 0xFB */
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 */
3761 3774
3762 #ifdef XK_kana_A 3775 #ifdef XK_kana_A
4787 MASK is the set of modifiers present in SYMBOL's name. 4800 MASK is the set of modifiers present in SYMBOL's name.
4788 This is similar to parse_modifiers_uncached, but uses the cache in 4801 This is similar to parse_modifiers_uncached, but uses the cache in
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
4792 static Lisp_Object 4805 Lisp_Object
4793 parse_modifiers (symbol) 4806 parse_modifiers (symbol)
4794 Lisp_Object symbol; 4807 Lisp_Object symbol;
4795 { 4808 {
4796 Lisp_Object elements; 4809 Lisp_Object elements;
4797 4810
8915 Qmouse_click = intern ("mouse-click"); 8928 Qmouse_click = intern ("mouse-click");
8916 staticpro (&Qmouse_click); 8929 staticpro (&Qmouse_click);
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);
8923 8938
8924 Qmenu_enable = intern ("menu-enable"); 8939 Qmenu_enable = intern ("menu-enable");