add hkeys array which allows us to press ctrl+alt+shift+delete to exit
out of spmenu even if we unbind our quit keybind
This commit is contained in:
parent
12b69656a7
commit
e7ecfd4114
|
@ -30,6 +30,9 @@ void keypress(XEvent *e) {
|
|||
|
||||
keysym = XkbKeycodeToKeysym(dpy, (KeyCode)ev->keycode, 0, 0);
|
||||
|
||||
// this makes sure we always have a way to exit if we unbind our quit key
|
||||
if (keysym == hkeys[0].keysym && CLEANMASK(hkeys[0].mod) == CLEANMASK(ev->state) && hkeys[0].func) hkeys[0].func(&(hkeys[0].arg));
|
||||
|
||||
for (i = 0; i < LENGTH(keys); i++) {
|
||||
if (ignoreglobalkeys) break;
|
||||
if (keysym == keys[i].keysym && CLEANMASK(keys[i].mod) == CLEANMASK(ev->state) && keys[i].func) {
|
||||
|
|
|
@ -23,3 +23,4 @@ static void getcapsstate(void);
|
|||
|
||||
static Key ckeys[256];
|
||||
static char capstext[16];
|
||||
static Key hkeys[1] = { { -1, Ctrl|Alt|Shift, XK_Delete, quit, {0} } };
|
||||
|
|
Loading…
Reference in a new issue