summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
authorDennis Real <github@tildepipe.org>2013-02-02 20:53:23 +0100
committerDennis Real <github@tildepipe.org>2013-02-02 20:53:23 +0100
commit353578ebc130f53547996ab87f5b3795c1360f3f (patch)
tree8a19969f7eb377f692892e24c24ba116940ba942 /src/keyevents.c
parent38c3c37b5c45691211ed62e40a6c5f503b054335 (diff)
parent6ea43a3213bb264525e04c729c67204f82c7a2c8 (diff)
Merge branch 'master' of git://github.com/derf/feh
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c6
1 files changed, 6 insertions, 0 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index 470d624..9bda112 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -154,6 +154,7 @@ void init_keyevents(void) {
feh_set_kb(&keys.mirror, 0, XK_bar, 0, 0, 0, 0);
feh_set_kb(&keys.reload_minus, 0, XK_minus, 0, 0, 0, 0);
feh_set_kb(&keys.reload_plus, 0, XK_plus, 0, 0, 0, 0);
+ feh_set_kb(&keys.toggle_keep_vp, 0, XK_k, 0, 0, 0, 0);
home = getenv("HOME");
if (!home)
@@ -307,6 +308,8 @@ void init_keyevents(void) {
cur_kb = &keys.reload_minus;
else if (!strcmp(action, "reload_plus"))
cur_kb = &keys.reload_plus;
+ else if (!strcmp(action, "toggle_keep_vp"))
+ cur_kb = &keys.toggle_keep_vp;
else
weprintf("keys: Invalid action: %s", action);
@@ -761,5 +764,8 @@ void feh_event_handle_keypress(XEvent * ev)
else if (opt.verbose)
weprintf("Cannot set RELOAD lower than 1 second.");
}
+ else if (feh_is_kp(&keys.toggle_keep_vp, keysym, state)) {
+ opt.keep_zoom_vp = !opt.keep_zoom_vp;
+ }
return;
}