Permalink
Browse files

Add Page Up/Down to next/prev key bindings,

for use with a presenter.
Update verbose help and clean up the formatting a little.
  • Loading branch information...
1 parent fe5f7af commit 23041476c299678909195f9e344307f2af503db3 @akkana committed Jul 25, 2016
Showing with 16 additions and 21 deletions.
  1. +2 −2 doc/pho.1
  2. +4 −0 gmain.c
  3. +10 −19 pho.c
View
@@ -69,10 +69,10 @@ Include a %s to represent the filename of the current image.
.SH KEY BINDINGS
When pho is running, it obeys the following keys:
.TP
-\fB[space]\fR
+\fB[space], [Page Down]\fR
Go to next image. Or cancel slideshow mode, if active.
.TP
-\fB[backspace]\fR
+\fB[backspace], [Page Up]\fR
Go to previous image
.TP
\fBr\fR, \fBt\fR, \fB[right-arrow]\fR
View
@@ -141,6 +141,8 @@ gint HandleGlobalKeys(GtkWidget* widget, GdkEventKey* event)
DeleteImage(gCurImage);
break;
case GDK_space:
+ case GDK_Page_Down:
+ case GDK_KP_Page_Down:
/* If we're in slideshow mode, cancel the slideshow */
if (gDelaySeconds > 0) {
gDelaySeconds = 0;
@@ -151,6 +153,8 @@ gint HandleGlobalKeys(GtkWidget* widget, GdkEventKey* event)
}
return TRUE;
case GDK_BackSpace:
+ case GDK_Page_Up:
+ case GDK_KP_Page_Up:
PrevImage();
return TRUE;
case GDK_Home:
View
@@ -755,38 +755,29 @@ void VerboseHelp()
printf("pho version %s. Copyright 2002,2003,2004,2007 Akkana Peck akkana@shallowsky.com.\n", VERSION);
printf("Type pho -h for commandline arguments.\n");
printf("\npho Key Bindings:\n\n");
- printf("<space>\tNext image (or cancel slideshow mode)\n");
- printf("-\tPrevious image\n");
- printf("<backspace>\tPrevious image\n");
+ printf("<space>, <Page Down>\n\tNext image (or cancel slideshow mode)\n");
+ printf("<backspace>, <Page Up>\n\tPrevious image\n");
printf("<home>\tFirst image\n");
- printf("f\tToggle fullscreen mode (scale even small images up to fullscreen)\n");
- printf("F\tToggle full-size mode (even if bigger than screen)\n");
+ printf("f\tToggle full-size mode (even if bigger than screen)\n");
+ printf("F\tToggle fullscreen mode (scale even small images up to fullscreen)\n");
printf("k\tTurn on keywords mode: show the keywords dialog\n");
printf("p\tToggle presentation mode (take up the whole screen, centering the image)\n");
printf("d\tDelete current image (from disk, after confirming with another d)\n");
printf("0-9\tRemember image in note list 0 through 9 (to be printed at exit)\n");
- printf(" (In keywords dialog, alt + 0-9 adds 10, e.g. alt-4 triggers flag 14.\n");
- printf("t\tRotate right 90 degrees\n");
- printf("r\tRotate right 90 degrees\n");
- printf("<Right>\tRotate right 90 degrees\n");
- printf("T\tRotate left 90 degrees\n");
- printf("R\tRotate left 90 degrees\n");
- printf("l\tRotate left 90 degrees\n");
- printf("L\tRotate left 90 degrees\n");
- printf("<left>\tRotate left 90 degrees\n");
+ printf("\t(In keywords dialog, alt + 0-9 adds 10, e.g. alt-4 triggers flag 14.\n");
+ printf("t, r, <Right>\n\tRotate right 90 degrees\n");
+ printf("T, R, l, L, <Left>]n\tRotate left 90 degrees\n");
printf("<up>\tRotate 180 degrees\n");
- printf("+\tDouble size\n");
- printf("=\tDouble size\n");
- printf("/\tHalf size\n");
- printf("<kp>-\tHalf size\n");
+ printf("+, =\tDouble size\n");
+ printf("/, -\tHalf size\n");
printf("i\tShow/hide info dialog\n");
printf("o\tChange the working file set (add files or make a new list)\n");
printf("g\tRun gimp on the current image\n");
printf("\t(or set PHO_REMOTE to an alternate command)\n");
printf("q\tQuit\n");
printf("<esc>\tQuit (or hide a dialog, if one is showing)\n");
printf("\n");
- printf("Pho mouse bindings\n");
+ printf("Pho mouse bindings:\n");
printf("In presentation mode: drag with middlemouse to pan/move.\n");
exit(1);
}

0 comments on commit 2304147

Please sign in to comment.