X-Git-Url: https://git.artsoft.org/?a=blobdiff_plain;f=src%2Flibgame%2Fx11.h;h=99dc4c9cf6cdb0f4f909a5ab64f67cd6a492bd00;hb=d703f1f2c94e753d668d793e7d2c6c6c71fc9fa8;hp=4ef96acbd976f5553dcbb751d58375626bb51c7e;hpb=608be3bcd270eb45628a274eddb6dbcc8940accf;p=rocksndiamonds.git diff --git a/src/libgame/x11.h b/src/libgame/x11.h index 4ef96acb..99dc4c9c 100644 --- a/src/libgame/x11.h +++ b/src/libgame/x11.h @@ -58,6 +58,7 @@ typedef struct X11DrawableInfo DrawBuffer; /* "Cursor" is already defined */ typedef KeySym Key; +typedef unsigned int KeyMod; typedef XEvent Event; typedef XButtonEvent ButtonEvent; @@ -315,6 +316,21 @@ struct XY #define KSYM_FKEY_LAST KSYM_F24 #define KSYM_NUM_FKEYS (KSYM_FKEY_LAST - KSYM_FKEY_FIRST + 1) +#define KMOD_None None +#define KMOD_Shift_L 0x0001 +#define KMOD_Shift_R 0x0002 +#define KMOD_Control_L 0x0040 +#define KMOD_Control_R 0x0080 +#define KMOD_Meta_L 0x0400 +#define KMOD_Meta_R 0x0800 +#define KMOD_Alt_L 0x0100 +#define KMOD_Alt_R 0x0200 + +#define KMOD_Shift (KMOD_Shift_L | KMOD_Shift_R) +#define KMOD_Control (KMOD_Control_L | KMOD_Control_R) +#define KMOD_Meta (KMOD_Meta_L | KMOD_Meta_R) +#define KMOD_Alt (KMOD_Alt_L | KMOD_Alt_R) + /* X11 function definitions */