GNOME Bugzilla – Bug 696836
Allow to go to next and previous pages pressing arrow keys
Last modified: 2013-04-29 19:40:58 UTC
Hello I think would be really useful to be able to go to next and previous pages simply pressing arrow keys instead of always needing to use mouse clicks to achieve that when viewing, for example, a PDF file. Thanks a lot
*** Bug 698201 has been marked as a duplicate of this bug. ***
Created attachment 242757 [details] [review] tentative patch Arrows navigation starts a little bit after pressing the keys. However after clicking on the arrow buttons left and right arrow keys work well. It is the same for Ctrl+PgUP or Ctrl+PgDn already implemented (after a little lag they start working properly).
Review of attachment 242757 [details] [review]: Thanks! I have a comment below. ::: src/preview.js @@ +398,3 @@ + if (((keyval == Gdk.KEY_Page_Up) && + ((state & Gdk.ModifierType.CONTROL_MASK) != 0)) || + (keyval == Gdk.KEY_Left)) { This would also "steal" every keybinding that uses Left/Right in combination with Ctrl/Alt/Shift modifiers. A good way to avoid that is to get all the modifiers supported by the platform with gtk_accelerator_get_default_mod_mask(), and check for (state & default_mod_mask == 0).
Created attachment 242830 [details] [review] This version checks for modifiers key
Review of attachment 242830 [details] [review]: Looks good now, thanks!
Pushed this to git master now, thanks!