2023-04-05 20:44:09 +02:00
|
|
|
typedef struct {
|
|
|
|
unsigned int mode;
|
|
|
|
unsigned int mod;
|
|
|
|
KeySym keysym;
|
2023-04-25 09:56:11 +02:00
|
|
|
void (*func)(Arg *);
|
|
|
|
Arg arg;
|
2023-04-05 20:44:09 +02:00
|
|
|
} Key;
|
|
|
|
|
2023-05-06 14:29:45 +02:00
|
|
|
// user friendly names for all the modifiers we're using, but there are many more
|
|
|
|
#define Ctrl ControlMask
|
|
|
|
#define Shift ShiftMask
|
|
|
|
#define Alt Mod1Mask
|
|
|
|
#define AltGr Mod3Mask
|
|
|
|
#define Super Mod4Mask
|
|
|
|
#define ShiftGr Mod5Mask
|
|
|
|
|
2023-03-08 17:20:32 +01:00
|
|
|
static void updatenumlockmask(void);
|
|
|
|
static void keypress(XEvent *e);
|
2023-03-13 21:21:40 +01:00
|
|
|
static void grabkeyboard(void);
|
2023-04-20 21:22:45 +02:00
|
|
|
static void getcapsstate(void);
|
|
|
|
|
2023-04-25 09:56:11 +02:00
|
|
|
static Key ckeys[256];
|
2023-04-20 21:22:45 +02:00
|
|
|
static char capstext[16] = "Caps Lock";
|