Is there a way to get informations on current active modifiers in X? E.g. if Capslock is active, if shift is pressed, etc.
According to the xkbcommon-keysyms.h this is a list of all X11 modifiers:
#define XKB_KEY_Shift_L 0xffe1 /* Left shift */
#define XKB_KEY_Shift_R 0xffe2 /* Right shift */
#define XKB_KEY_Control_L 0xffe3 /* Left control */
#define XKB_KEY_Control_R 0xffe4 /* Right control */
#define XKB_KEY_Caps_Lock 0xffe5 /* Caps lock */
#define XKB_KEY_Shift_Lock 0xffe6 /* Shift lock */
#define XKB_KEY_Meta_L 0xffe7 /* Left meta */
#define XKB_KEY_Meta_R 0xffe8 /* Right meta */
#define XKB_KEY_Alt_L 0xffe9 /* Left alt */
#define XKB_KEY_Alt_R 0xffea /* Right alt */
#define XKB_KEY_Super_L 0xffeb /* Left super */
#define XKB_KEY_Super_R 0xffec /* Right super */
#define XKB_KEY_Hyper_L 0xffed /* Left hyper */
#define XKB_KEY_Hyper_R 0xffee /* Right hyper */
But how can I get the status of these keys? I did not find an according function for this. Thanks in advance!