Package: pqiv
Version: 0.11-1
Severity: normal
Tags: patch

According to "pqiv -h", pressing +, -, PgUp, PgDn, 0-3, and Cursor/Arrow
keys does something. However, these buttons don't work if they're
pressed on the keypad. I've noticed that this is especially annoying
for + and -, which on an ordinary keyboard you have to use shift to use
plus and then release shift for -.

I've included a patch that fixes this for +, -, PgUp, and PgDn. Arrow
keys and number keys are a little more complicated, since the code for
those sections uses event->keyval, which is different depending on the
key pressed.

-Brandon
--- a/pqiv.c
+++ b/pqiv.c
@@ -1714,11 +1714,13 @@
 			/* }}} */
 		/* BIND: PgUp: Jump 10 images forwards {{{ */
 		case GDK_Page_Up:
+		case GDK_KP_Page_Up:
 			jumpFiles(optionReverseMovement ? -10 : 10);
 			break;
 			/* }}} */
 		/* BIND: PgDn: Jump 10 images backwards {{{ */
 		case GDK_Page_Down:
+		case GDK_KP_Page_Down:
 			jumpFiles(optionReverseMovement ? 10: -10);
 			break;
 			/* }}} */
@@ -1809,6 +1811,7 @@
 			/* }}} */
 		/* BIND: +: Zoom in {{{ */
 		case GDK_plus:
+		case GDK_KP_Add:
 			scaleBy(event->state & GDK_CONTROL_MASK ? .2 : .05);
 			resizeAndPosWindow();
 			displayImage();
@@ -1817,6 +1820,7 @@
 			/* }}} */
 		/* BIND: -: Zoom out {{{ */
 		case GDK_minus:
+		case GDK_KP_Subtract:
 			scaleBy(-(event->state & GDK_CONTROL_MASK ? .2 : .05));
 			resizeAndPosWindow();
 			displayImage();
@@ -1825,6 +1829,7 @@
 			/* }}} */
 		/* BIND: 0: Autoscale down {{{ */
 		case GDK_0:
+		case GDK_KP_0:
 			forceAutoScaleFactor(ON);
 			moveX = moveY = 0;
 			resizeAndPosWindow();

Attachment: signature.asc
Description: PGP signature

Reply via email to