spmenu/libs/x11/key.h
speedie ca624e1ca6 Default to the default value of $XDG_CACHE_DIR in case $XDG_CACHE_DIR is
not set.

Both the current behavior and this commit are valid according to the XDG
base directory standard, however realistically no one wants dotfiles in
their home directory, and that's what would happen if $XDG_CACHE_DIR
is unset.

Also fix key inconsistency between X and Wayland.
2023-06-22 00:17:23 +02:00

26 lines
642 B
C

/* See LICENSE file for copyright and license details. */
typedef struct {
unsigned int mode;
unsigned int mod;
KeySym keysym;
void (*func)(Arg *);
Arg arg;
} Key;
// 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
static void updatenumlockmask(void);
static void keypress_x11(XEvent *e);
static void grabkeyboard_x11(void);
static void getcapsstate(void);
static Key ckeys[256];
static Key hkeys[1] = { { -1, Ctrl|Alt, XK_Delete, quit, {0} } };