summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--include/X11/Xutil.h7
1 files changed, 7 insertions, 0 deletions
diff --git a/include/X11/Xutil.h b/include/X11/Xutil.h
index 931cfd0..82dab7d 100644
--- a/include/X11/Xutil.h
+++ b/include/X11/Xutil.h
@@ -247,12 +247,19 @@ typedef struct _XComposeStatus {
#define IsMiscFunctionKey(keysym) \
(((KeySym)(keysym) >= XK_Select) && ((KeySym)(keysym) <= XK_Break))
+#ifdef XK_XKB_KEYS
#define IsModifierKey(keysym) \
((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
|| (((KeySym)(keysym) >= XK_ISO_Lock) && \
((KeySym)(keysym) <= XK_ISO_Last_Group_Lock)) \
|| ((KeySym)(keysym) == XK_Mode_switch) \
|| ((KeySym)(keysym) == XK_Num_Lock))
+#else
+#define IsModifierKey(keysym) \
+ ((((KeySym)(keysym) >= XK_Shift_L) && ((KeySym)(keysym) <= XK_Hyper_R)) \
+ || ((KeySym)(keysym) == XK_Mode_switch) \
+ || ((KeySym)(keysym) == XK_Num_Lock))
+#endif
/*
* opaque reference to Region data type
*/