aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--config.def.h3
-rw-r--r--main.c2
2 files changed, 4 insertions, 1 deletions
diff --git a/config.def.h b/config.def.h
index 0c09c4d..0645b2b 100644
--- a/config.def.h
+++ b/config.def.h
@@ -70,6 +70,9 @@ static const int THUMB_SIZE = 3;
/* Following modifiers (NumLock | CapsLock) will be ignored when processing keybindings */
static const int ignore_mask = Mod2Mask | LockMask;
+/* abort the keyhandler */
+static const KeySym keyhandler_abort = XK_Escape;
+
/* keyboard mappings for image and thumbnail mode: */
static const keymap_t keys[] = {
/* modifiers key function argument */
diff --git a/main.c b/main.c
index 707e833..59f1f21 100644
--- a/main.c
+++ b/main.c
@@ -587,7 +587,7 @@ void on_keypress(XKeyEvent *kev)
}
if (IsModifierKey(ksym))
return;
- if (extprefix && ksym == XK_Escape && MODMASK(kev->state) == 0) {
+ if (extprefix && ksym == keyhandler_abort && MODMASK(kev->state) == 0) {
extprefix = False;
} else if (extprefix) {
run_key_handler(XKeysymToString(ksym), kev->state & ~sh);