nsxiv4ec8fd5
make keyhandler abort key configurable via config.h
+4 −1
2 files changed
- M config.def.h +3 −0
- M main.c +1 −1
| @@ -70,6 +70,9 @@ static const int THUMB_SIZE = 3; | |||
| 70 | 70 | /* Following modifiers (NumLock | CapsLock) will be ignored when processing keybindings */ | |
| 71 | 71 | static const int ignore_mask = Mod2Mask | LockMask; | |
| 72 | 72 | ||
| 73 | + | /* abort the keyhandler */ | |
| 74 | + | static const KeySym keyhandler_abort = XK_Escape; | |
| 75 | + | ||
| 73 | 76 | /* keyboard mappings for image and thumbnail mode: */ | |
| 74 | 77 | static const keymap_t keys[] = { | |
| 75 | 78 | /* modifiers key function argument */ | |
| @@ -587,7 +587,7 @@ void on_keypress(XKeyEvent *kev) | |||
| 587 | 587 | } | |
| 588 | 588 | if (IsModifierKey(ksym)) | |
| 589 | 589 | return; | |
| 590 | − | if (extprefix && ksym == XK_Escape && MODMASK(kev->state) == 0) { | |
| 590 | + | if (extprefix && ksym == keyhandler_abort && MODMASK(kev->state) == 0) { | |
| 591 | 591 | extprefix = False; | |
| 592 | 592 | } else if (extprefix) { | |
| 593 | 593 | run_key_handler(XKeysymToString(ksym), kev->state & ~sh); | |