summaryrefslogtreecommitdiff
path: root/src/keyevents.c
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2016-06-02 13:45:00 +0200
committerDaniel Friesel <derf@finalrewind.org>2016-06-02 13:45:00 +0200
commit09c59148f8cdc1cb1cb83cb63f6edacec617a446 (patch)
tree36e759b0bd5d94fa4ef8817a746f43b6e6e9d5c4 /src/keyevents.c
parent315bac4637537654b4711867911458c3a6974c7e (diff)
parent36b09fa038a8b7996a12e45419c28821c5596308 (diff)
Merge branch 'guns-dirnav'
Diffstat (limited to 'src/keyevents.c')
-rw-r--r--src/keyevents.c14
1 files changed, 14 insertions, 0 deletions
diff --git a/src/keyevents.c b/src/keyevents.c
index 8977111..4837c0b 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -110,6 +110,8 @@ void init_keyevents(void) {
feh_set_kb(&keys.next_img , 0, XK_Right , 0, XK_n , 0, XK_space);
feh_set_kb(&keys.jump_back , 0, XK_Page_Up , 0, XK_KP_Page_Up, 0, 0);
feh_set_kb(&keys.jump_fwd , 0, XK_Page_Down , 0, XK_KP_Page_Down,0,0);
+ feh_set_kb(&keys.prev_dir , 0, XK_bracketleft, 0, 0 , 0, 0);
+ feh_set_kb(&keys.next_dir , 0, XK_bracketright, 0, 0 , 0, 0);
feh_set_kb(&keys.jump_random,0, XK_z , 0, 0 , 0, 0);
feh_set_kb(&keys.quit , 0, XK_Escape , 0, XK_q , 0, 0);
feh_set_kb(&keys.close , 0, XK_x , 0, 0 , 0, 0);
@@ -222,6 +224,10 @@ void init_keyevents(void) {
cur_kb = &keys.jump_back;
else if (!strcmp(action, "jump_fwd"))
cur_kb = &keys.jump_fwd;
+ else if (!strcmp(action, "prev_dir"))
+ cur_kb = &keys.prev_dir;
+ else if (!strcmp(action, "next_dir"))
+ cur_kb = &keys.next_dir;
else if (!strcmp(action, "jump_random"))
cur_kb = &keys.jump_random;
else if (!strcmp(action, "quit"))
@@ -532,6 +538,14 @@ void feh_event_handle_keypress(XEvent * ev)
else if (winwid->type == WIN_TYPE_THUMBNAIL)
feh_thumbnail_select_next(winwid, 10);
}
+ else if (feh_is_kp(&keys.next_dir, keysym, state)) {
+ if (opt.slideshow)
+ slideshow_change_image(winwid, SLIDE_JUMP_NEXT_DIR, 1);
+ }
+ else if (feh_is_kp(&keys.prev_dir, keysym, state)) {
+ if (opt.slideshow)
+ slideshow_change_image(winwid, SLIDE_JUMP_PREV_DIR, 1);
+ }
else if (feh_is_kp(&keys.quit, keysym, state)) {
winwidget_destroy_all();
}