Krolyxon
Commit 4ec8fd5

Branches

Refs →

nsxiv4ec8fd5

make keyhandler abort key configurable via config.h

Author
NRK
Date
2021-09-24 16:39 +0600
Committer
N-R-K · 2021-09-24 17:29 +0600
Parent
3bec517
Commit
4ec8fd5377bb05ef5646ab461e3957e201c1b9fb

+4 −1

2 files changed

  1. M config.def.h +3 −0
  2. M main.c +1 −1
M config.def.h View
@@ -70,6 +70,9 @@ static const int THUMB_SIZE = 3;
7070 /* Following modifiers (NumLock | CapsLock) will be ignored when processing keybindings */
7171 static const int ignore_mask = Mod2Mask | LockMask;
7272
73+/* abort the keyhandler */
74+static const KeySym keyhandler_abort = XK_Escape;
75+
7376 /* keyboard mappings for image and thumbnail mode: */
7477 static const keymap_t keys[] = {
7578 /* modifiers key function argument */
M main.c View
@@ -587,7 +587,7 @@ void on_keypress(XKeyEvent *kev)
587587 }
588588 if (IsModifierKey(ksym))
589589 return;
590− if (extprefix && ksym == XK_Escape && MODMASK(kev->state) == 0) {
590+ if (extprefix && ksym == keyhandler_abort && MODMASK(kev->state) == 0) {
591591 extprefix = False;
592592 } else if (extprefix) {
593593 run_key_handler(XKeysymToString(ksym), kev->state & ~sh);