Mercurial > hg > xemacs-beta
comparison src/event-Xt.c @ 4780:2fd201d73a92
Call character_to_event on characters received from XIM, event-Xt.c
src/ChangeLog addition:
2009-12-17 Aidan Kehoe <kehoea@parhasard.net>
* events.h (character_to_event_meta_behavior): New enumeration,
describing what character_to_event should do with characters in
the range ?\x80-?\xFF, and passed as the third argument to
character_to_event instead of the binary use_console_meta_flag.
* events.c (character_to_event, Fcharacter_to_event):
* event-unixoid.c (read_event_from_tty_or_stream_desc):
* event-stream.c (maybe_kbd_translate, maybe_kbd_translate):
* event-msw.c (mswindows_need_event):
Use the new enumeration.
* event-Xt.c (x_to_emacs_keysym):
Call character_to_event when we receive XLookupChars events,
passing latin_1_maps_to_itself as the meta_behavior flag,
addressing the problem FKtPp sees in 87bpi9mwpu.fsf@yahoo.com.cn
author | Aidan Kehoe <kehoea@parhasard.net> |
---|---|
date | Thu, 17 Dec 2009 17:51:38 +0000 |
parents | 726060ee587c |
children | bc4f2511bbea |
comparison
equal
deleted
inserted
replaced
4779:fd98353950a4 | 4780:2fd201d73a92 |
---|---|
965 while ((ch = Lstream_get_ichar (istr)) != EOF) | 965 while ((ch = Lstream_get_ichar (istr)) != EOF) |
966 { | 966 { |
967 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); | 967 Lisp_Object emacs_event = Fmake_event (Qnil, Qnil); |
968 Lisp_Event *ev = XEVENT (emacs_event); | 968 Lisp_Event *ev = XEVENT (emacs_event); |
969 ev->channel = DEVICE_CONSOLE (d); | 969 ev->channel = DEVICE_CONSOLE (d); |
970 XSET_EVENT_TYPE (emacs_event, key_press_event); | |
971 /* Make sure space and linefeed and so on get the proper | |
972 keysyms. */ | |
973 character_to_event (ch, ev, XCONSOLE (ev->channel), | |
974 latin_1_maps_to_itself, 0); | |
970 ev->timestamp = event->time; | 975 ev->timestamp = event->time; |
971 XSET_EVENT_TYPE (emacs_event, key_press_event); | |
972 XSET_EVENT_KEY_MODIFIERS (emacs_event, 0); | |
973 XSET_EVENT_KEY_KEYSYM (emacs_event, make_char (ch)); | |
974 enqueue_dispatch_event (emacs_event); | 976 enqueue_dispatch_event (emacs_event); |
975 } | 977 } |
976 Lstream_close (istr); | 978 Lstream_close (istr); |
977 UNGCPRO; | 979 UNGCPRO; |
978 Lstream_delete (istr); | 980 Lstream_delete (istr); |