summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorDaniel Friesel <derf@finalrewind.org>2010-09-05 17:39:45 +0200
committerDaniel Friesel <derf@finalrewind.org>2010-09-05 17:39:45 +0200
commitca1f80782d19d380fcf7c0a1a67714d87e54e06b (patch)
treed20f441e70ea7f832a31f19d33fafaf10da0fd52
parent6e993d93ba1b49c33285b909f99f5d26aba36fb1 (diff)
Make pan keys behave like scroll keys
-rw-r--r--ChangeLog1
-rw-r--r--man/feh.pre8
-rw-r--r--src/keyevents.c16
3 files changed, 13 insertions, 12 deletions
diff --git a/ChangeLog b/ChangeLog
index 09aeb2f..eda2118 100644
--- a/ChangeLog
+++ b/ChangeLog
@@ -3,6 +3,7 @@ git HEAD
* Patch by Stefan Mark: Add --bg-max (scaled with borders)
* Removed rather obscure --bg-seamless mode
* Short option -Y for --hide-pointer
+ * Panning via keys: Make it behave like scrolling (inverted directions)
Tue, 24 Aug 2010 19:23:36 +0200 Daniel Friesel <derf@chaosdorf.de>
diff --git a/man/feh.pre b/man/feh.pre
index 8136c37..8345683 100644
--- a/man/feh.pre
+++ b/man/feh.pre
@@ -722,13 +722,13 @@ Remove current file from filelist
.It Aq CTRL+delete
Remove current file from filelist and delete it
.It Ao keypad left Ac , Ao Ctrl+Left Ac
-Move the image to the lift
+Scroll to the left
.It Ao keypad right Ac , Ao Ctrl+Right Ac
-Move the image to the right
+Scroll to the right
.It Ao keypad up Ac , Ao Ctrl+Up Ac
-Move the image up
+Scroll up
.It Ao keypad down Ac , Ao Ctrl+Down Ac
-Move the image down
+Scroll down
.It Aq keypad begin
Antialias the image
.It Ao keypad + Ac , Ao Up Ac
diff --git a/src/keyevents.c b/src/keyevents.c
index 893d543..c2c50ae 100644
--- a/src/keyevents.c
+++ b/src/keyevents.c
@@ -161,7 +161,7 @@ void feh_event_handle_keypress(XEvent * ev)
switch (keysym) {
case XK_Left:
if (kev->state & ControlMask) {
- winwid->im_x -= 10;
+ winwid->im_x += 10;
winwidget_render_image(winwid, 0, 0);
}
else if (opt.slideshow)
@@ -169,7 +169,7 @@ void feh_event_handle_keypress(XEvent * ev)
break;
case XK_Right:
if (kev->state & ControlMask) {
- winwid->im_x += 10;
+ winwid->im_x -= 10;
winwidget_render_image(winwid, 0, 0);
}
else if (opt.slideshow)
@@ -254,25 +254,25 @@ void feh_event_handle_keypress(XEvent * ev)
feh_event_invoke_action(winwid, opt.actions[9]);
break;
case XK_KP_Left:
- winwid->im_x -= 10;
+ winwid->im_x += 10;
winwidget_render_image(winwid, 0, 0);
break;
case XK_KP_Right:
- winwid->im_x += 10;
+ winwid->im_x -= 10;
winwidget_render_image(winwid, 0, 0);
break;
case XK_KP_Up:
- winwid->im_y -= 10;
+ winwid->im_y += 10;
winwidget_render_image(winwid, 0, 0);
break;
case XK_KP_Down:
- winwid->im_y += 10;
+ winwid->im_y -= 10;
winwidget_render_image(winwid, 0, 0);
break;
case XK_KP_Add:
case XK_Up:
if (kev->state & ControlMask) {
- winwid->im_y -= 10;
+ winwid->im_y += 10;
winwidget_render_image(winwid, 0, 0);
}
else {
@@ -291,7 +291,7 @@ void feh_event_handle_keypress(XEvent * ev)
case XK_KP_Subtract:
case XK_Down:
if (kev->state & ControlMask) {
- winwid->im_y += 10;
+ winwid->im_y -= 10;
winwidget_render_image(winwid, 0, 0);
}
else {