diff src/event-Xt.c @ 2699:96036853a107

[xemacs-hg @ 2005-03-29 02:58:56 by aidan] Support X11 keysyms of the form UABCD.
author aidan
date Tue, 29 Mar 2005 02:59:21 +0000
parents 3d8143fc88e1
children a25c824ed558
line wrap: on
line diff
--- a/src/event-Xt.c	Tue Mar 29 02:52:50 2005 +0000
+++ b/src/event-Xt.c	Tue Mar 29 02:59:21 2005 +0000
@@ -71,6 +71,8 @@
 extern int mswindows_is_blocking;
 #endif
 
+EXFUN (Funicode_to_char, 2);  /* In unicode.c.  */
+
 /* used in glyphs-x.c */
 void enqueue_focus_event (Widget wants_it, Lisp_Object frame, int in_p);
 static void handle_focus_event_1 (struct frame *f, int in_p);
@@ -201,6 +203,15 @@
   if ((keysym & 0xff) < 0xa0)
     return Qnil;
 
+  /* The spec says keysyms in the range #x01000100 to #x0110FFFF and
+     only those should correspond directly to Unicode code points, in
+     the range #x100-#x10FFFF; actual implementations can have the Latin
+     1 code points do the same thing with keysyms
+     #x010000A0-#x01000100. Oops. */
+
+  if (keysym >= 0x010000A0 && keysym <= 0x0110FFFF) 
+    return Funicode_to_char (make_int(keysym & 0xffffff), Qnil);
+
   switch (keysym >> 8)
     {
     case 0: /* ASCII + Latin1 */