After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 553892 - Evince: Scroll back and forward through document pages with back page and forward page keys.
Evince: Scroll back and forward through document pages with back page and for...
Status: RESOLVED FIXED
Product: evince
Classification: Core
Component: general
2.22.x
Other All
: Normal minor
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2008-09-26 06:01 UTC by Nick Jenkins
Modified: 2017-10-05 17:53 UTC
See Also:
GNOME target: ---
GNOME version: 2.21/2.22


Attachments
Patch for jumping to next/previous page with back/forward keys (1.07 KB, patch)
2008-12-12 18:27 UTC, Michael Kanis
reviewed Details | Review
Assign Back/Forward accelerators using GtkUIManager. (1.15 KB, patch)
2013-04-26 21:18 UTC, Gökcen Eraslan
none Details | Review
ev-window: Add keybindings for special back/forward keys (1.85 KB, patch)
2014-05-02 22:45 UTC, Germán Poo-Caamaño
none Details | Review
ev-window: Add keybindings for special back/forward keys (1.25 KB, patch)
2017-10-03 16:39 UTC, Germán Poo-Caamaño
committed Details | Review

Description Nick Jenkins 2008-09-26 06:01:18 UTC
On my T40 IBM ThinkPad laptop, there are two keys for scrolling backwards and forwards through pages (usually used in a web browser as the back and forward buttons), located next to the standard 4 arrow keys. Could these back/forward keys please be made to work in evince like the "Next" and "Previous" toolbar buttons currently do?

Also if I run "sudo showkey -t 2" to see the keycodes, the result is as follows:
# pressing back page key
0x00 0x81 0x9e 0x80 0x81 0x9e
# pressing forward page key
0x00 0x81 0x9f 0x80 0x81 0x9f

And the result of running "xev" and pressing these two keys (back then forward) is as follows:

KeyPress event, serial 30, synthetic NO, window 0x3400001,
    root 0x58, subw 0x0, time 15955396, (74,77), root:(79,126),
    state 0x0, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3400001,
    root 0x58, subw 0x0, time 15955396, (74,77), root:(79,126),
    state 0x0, keycode 234 (keysym 0x1008ff26, XF86Back), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyPress event, serial 30, synthetic NO, window 0x3400001,
    root 0x58, subw 0x0, time 15965271, (74,77), root:(79,126),
    state 0x0, keycode 233 (keysym 0x1008ff27, XF86Forward), same_screen YES,
    XLookupString gives 0 bytes:
    XmbLookupString gives 0 bytes:
    XFilterEvent returns: False

KeyRelease event, serial 30, synthetic NO, window 0x3400001,
    root 0x58, subw 0x0, time 15965271, (74,77), root:(79,126),
    state 0x0, keycode 233 (keysym 0x1008ff27, XF86Forward), same_screen YES,
    XLookupString gives 0 bytes:
    XFilterEvent returns: False


Other information:
DistroRelease: Ubuntu 8.04
ExecutablePath: /usr/bin/evince
Package: evince 2.22.2-0ubuntu1
PackageArchitecture: i386
SourcePackage: evince
Uname: Linux 2.6.24-19-generic i686
Comment 1 Nickolay V. Shmyrev 2008-09-26 07:01:38 UTC
I also wanted to setup this keys for a long time. We just need to bind XF86Forward and back.
Comment 2 Michael Kanis 2008-12-12 18:27:51 UTC
Created attachment 124543 [details] [review]
Patch for jumping to next/previous page with back/forward keys
Comment 3 Nick Jenkins 2009-03-02 05:46:36 UTC
Requesting developer review/feedback/comments/check-in please on Michael Kanis' patch, which is attached to comment #2.
Comment 4 Nickolay V. Shmyrev 2009-03-02 06:44:57 UTC
We need to bind the keys in EvWindow with GtkUIManager like it's done for other keys, not connect to key-press-event:

        { "Slash", GTK_STOCK_FIND, NULL, "slash", NULL,
          G_CALLBACK (ev_window_cmd_edit_find) },
Comment 5 Evan Martin 2009-06-22 21:03:02 UTC
For what it's worth, we recently implemented these for Chromium and have an arguably cleaner patch that uses constants from a header file.

http://codereview.chromium.org/140081
Comment 6 Reinout van Schouwen 2010-12-23 16:24:50 UTC
Bump. Will this patch make evince listen to the back/forward buttons on my Dell 5-button mouse?
Comment 7 Gökcen Eraslan 2013-04-26 21:18:07 UTC
Created attachment 242626 [details] [review]
Assign Back/Forward accelerators using GtkUIManager.

How about the patch attached? I don't have these keys, can someone please try it?
Comment 8 Christian Persch 2013-04-30 18:28:56 UTC
Review of attachment 242626 [details] [review]:

::: shell/ev-window.c
@@ +5879,3 @@
+	  G_CALLBACK (ev_window_cmd_go_previous_page) },
+	{ "nextpage", GTK_STOCK_GO_DOWN, "", "XF86Forward", NULL,
+	  G_CALLBACK (ev_window_cmd_go_next_page) },

In principle, that should be "Back/Forward" instead of "XF86Back/Forward", but I think in gtk < 3.9 only the latter works.
Comment 9 Gökcen Eraslan 2013-04-30 19:19:24 UTC
Exactly, this is what I've been told by GDK guys.
Comment 10 José Aliste 2013-05-17 02:28:58 UTC
Christian, so should we push this?
Comment 11 Germán Poo-Caamaño 2014-05-02 22:45:41 UTC
Created attachment 275708 [details] [review]
ev-window: Add keybindings for special back/forward keys

An updated patch that uses Accelerations instead.

I was unsure whether to bind them against page or history.
I did the former, although web browser do the later.
My gedit (3.4 does not do anything :-/)
Comment 12 Mike Lee 2016-10-05 20:40:55 UTC
Hello: I'm a newbie to Open Source world here.  Is this one resolved?  I tried Evince 3.18.2 on my ThinkPad T60 running Linux Mint Cinnamon and the two keys in questions did nothing.  How does one go about in reviewing the code change?
Thanks! -Mike
Comment 13 Germán Poo-Caamaño 2017-10-03 16:39:51 UTC
Created attachment 360845 [details] [review]
ev-window: Add keybindings for special back/forward keys

Back (former XF86Back) for previous page
Forward (former XF86Forward) for next page

Update the patch accordingly. Are these keys still a thing?
The patch is trivial, but I do not have anything to testing it :-)
Comment 14 Germán Poo-Caamaño 2017-10-05 17:53:34 UTC
This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.