changeset 12173:f31fca0fcdb0

(modify_event_symbol): Mask out high bits here, and only for certain purposes. table_size now unsigned. (modify_event_symbol) [HAVE_X_WINDOWS]: Use x_get_keysym_name. (make_lispy_event): Don't mask high bits here. Supply -1 as table_size for system-specific keys.
author Karl Heuer <kwzh@gnu.org>
date Fri, 09 Jun 1995 19:15:55 +0000
parents 58ce63f11008
children 13759a6c745b
files src/keyboard.c
diffstat 1 files changed, 16 insertions(+), 4 deletions(-) [+]
line wrap: on
line diff
--- a/src/keyboard.c	Fri Jun 09 19:15:28 1995 +0000
+++ b/src/keyboard.c	Fri Jun 09 19:15:55 1995 +0000
@@ -440,6 +440,8 @@
 Lisp_Object Fthis_command_keys ();
 Lisp_Object Qextended_command_history;
 
+extern char *x_get_keysym_name ();
+
 Lisp_Object Qpolling_period;
 
 extern Lisp_Object Vprint_level, Vprint_length;
@@ -3003,11 +3005,11 @@
 	     since we can't make a vector long enuf.  */
 	  if (NILP (system_key_syms))
 	    system_key_syms = Fcons (Qnil, Qnil);
-	  return modify_event_symbol (event->code & 0xffffff,
+	  return modify_event_symbol (event->code,
 				      event->modifiers,
 				      Qfunction_key,
 				      current_kboard->Vsystem_key_alist,
-				      0, &system_key_syms, 0xffffff);
+				      0, &system_key_syms, (unsigned)-1);
 	}
 
       return modify_event_symbol (event->code - 0xff00,
@@ -3722,12 +3724,13 @@
      Lisp_Object name_alist;
      char **name_table;
      Lisp_Object *symbol_table;
-     int table_size;
+     unsigned int table_size;
 {
   Lisp_Object value;
   Lisp_Object symbol_int;
 
-  XSETINT (symbol_int, symbol_num);
+  /* Get rid of the "vendor-specific" bit here.  */
+  XSETINT (symbol_int, symbol_num & 0xffffff);
 
   /* Is this a request for a valid symbol?  */
   if (symbol_num < 0 || symbol_num >= table_size)
@@ -3763,6 +3766,15 @@
       else if (name_table[symbol_num])
 	value = intern (name_table[symbol_num]);
 
+#ifdef HAVE_X_WINDOWS
+      if (NILP (value))
+	{
+	  char *name = x_get_keysym_name (symbol_num);
+	  if (name)
+	    value = intern (name);
+	}
+#endif
+
       if (NILP (value))
 	{
 	  char buf[20];