aboutsummaryrefslogtreecommitdiff
path: root/main.c
diff options
context:
space:
mode:
authorHarry Jeffery <harry@exec64.co.uk>2015-11-06 18:56:34 +0000
committerHarry Jeffery <harry@exec64.co.uk>2015-11-06 20:17:39 +0000
commitf5231d3e7d93830920b785dca4c770939ff8a138 (patch)
treee4ab069927459e9b19c403a0a8c709b3c05807c6 /main.c
parentd2db32a1fc2518852c4c3045d3c70dd22842d70a (diff)
downloadimv-f5231d3e7d93830920b785dca4c770939ff8a138.tar.gz
Add [,] and +,- shortcuts
Diffstat (limited to 'main.c')
-rw-r--r--main.c10
1 files changed, 7 insertions, 3 deletions
diff --git a/main.c b/main.c
index e735aaa..d93fbfe 100644
--- a/main.c
+++ b/main.c
@@ -103,7 +103,7 @@ void remove_current_path()
struct loop_item_s* cur = g_path.cur;
cur->next->prev = cur->prev;
cur->prev->next = cur->next;
- if(g_path.dir > 0) {
+ if(g_path.dir < 0) {
g_path.cur = cur->prev;
} else {
g_path.cur = cur->next;
@@ -209,10 +209,14 @@ int main(int argc, char** argv)
case SDL_KEYDOWN:
switch (e.key.keysym.sym) {
case SDLK_q: quit = 1; break;
- case SDLK_RIGHT: prev_path(); break;
- case SDLK_LEFT: next_path(); break;
+ case SDLK_LEFTBRACKET:
+ case SDLK_LEFT: prev_path(); break;
+ case SDLK_RIGHTBRACKET:
+ case SDLK_RIGHT: next_path(); break;
+ case SDLK_EQUALS:
case SDLK_i:
case SDLK_UP: zoom_view(1); break;
+ case SDLK_MINUS:
case SDLK_o:
case SDLK_DOWN: zoom_view(-1); break;
case SDLK_r: reset_view(); break;