Krolyxon
Commit 004f297

Branches

Refs →

nsxiv004f297

Go to next/previous image

Author
Bert
Date
2011-01-20 16:04 +0100
Parent
45db288
Commit
004f297ebb3043032661513f40a36c1cc915bc59

+14 −0

1 file changed

  1. M main.c +14 −0
M main.c View
@@ -102,6 +102,20 @@ void on_keypress(XEvent *ev) {
102102 case XK_q:
103103 cleanup();
104104 exit(0);
105+ case XK_n:
106+ case XK_space:
107+ if (fileidx + 1 < options->filecnt) {
108+ img_load(&img, options->filenames[++fileidx]);
109+ img_display(&img, &win);
110+ }
111+ break;
112+ case XK_p:
113+ case XK_BackSpace:
114+ if (fileidx > 0) {
115+ img_load(&img, options->filenames[--fileidx]);
116+ img_display(&img, &win);
117+ }
118+ break;
105119 }
106120 }
107121