changeset 2489:f81997b69560

[xemacs-hg @ 2005-01-19 23:10:16 by malcolmp] event-gtk.c: Recognise AltGr as a valid modifier.
author malcolmp
date Wed, 19 Jan 2005 23:10:17 +0000
parents 5dbd65dc8856
children 1e634d6d5ac9
files src/ChangeLog src/event-gtk.c
diffstat 2 files changed, 17 insertions(+), 0 deletions(-) [+]
line wrap: on
line diff
--- a/src/ChangeLog	Wed Jan 19 22:50:55 2005 +0000
+++ b/src/ChangeLog	Wed Jan 19 23:10:17 2005 +0000
@@ -1,3 +1,7 @@
+2005-01-20  Malcolm Purvis  <malcolmp@xemacs.org>
+
+	* event-gtk.c: Recognise AltGr as a valid modifier.
+
 2005-01-12  Ville Skyttä  <scop@xemacs.org>
 
 	* console-x.h: #include X11/keysym.h before xintrinsic.h.
--- a/src/event-gtk.c	Wed Jan 19 22:50:55 2005 +0000
+++ b/src/event-gtk.c	Wed Jan 19 23:10:17 2005 +0000
@@ -97,10 +97,23 @@
 Lisp_Object Qkey_mapping;
 Lisp_Object Qsans_modifiers;
 
+/*
+ * Identify if the keysym is a modifier.  This implementation mirrors x.org's
+ * IsModifierKey(), but for GDK keysyms.
+ */
+#ifdef GDK_ISO_Lock
+#define IS_MODIFIER_KEY(keysym)  \
+  ((((keysym) >= GDK_Shift_L) && ((keysym) <= GDK_Hyper_R)) \
+   || (((keysym) >= GDK_ISO_Lock) && \
+       ((keysym) <= GDK_ISO_Last_Group_Lock)) \
+   || ((keysym) == GDK_Mode_switch) \
+   || ((keysym) == GDK_Num_Lock))
+#else
 #define IS_MODIFIER_KEY(keysym)  \
   ((((keysym) >= GDK_Shift_L) && ((keysym) <= GDK_Hyper_R)) \
    || ((keysym) == GDK_Mode_switch) \
    || ((keysym) == GDK_Num_Lock))
+#endif
 
 #define THIS_IS_GTK
 #include "event-xlike-inc.c"