# HG changeset patch # User malcolmp # Date 1106176217 0 # Node ID f81997b69560658f17642d5e660e6dbe7fa6dad3 # Parent 5dbd65dc88566c2638bf888be313115884f7d3ff [xemacs-hg @ 2005-01-19 23:10:16 by malcolmp] event-gtk.c: Recognise AltGr as a valid modifier. diff -r 5dbd65dc8856 -r f81997b69560 src/ChangeLog --- 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 + + * event-gtk.c: Recognise AltGr as a valid modifier. + 2005-01-12 Ville Skyttä * console-x.h: #include X11/keysym.h before xintrinsic.h. diff -r 5dbd65dc8856 -r f81997b69560 src/event-gtk.c --- 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"