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 781323 - Keybindings for history navigation
Keybindings for history navigation
Status: RESOLVED OBSOLETE
Product: evince
Classification: Core
Component: general
3.22.x
Other Linux
: Normal normal
: ---
Assigned To: Evince Maintainers
Evince Maintainers
Depends on:
Blocks:
 
 
Reported: 2017-04-14 17:34 UTC by Erich Schubert
Modified: 2018-05-22 17:06 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
Change keybindings for history navigation (1.23 KB, patch)
2017-08-19 20:31 UTC, Casey Jao
none Details | Review

Description Erich Schubert 2017-04-14 17:34:49 UTC
Evince has toolbar buttons for history navigation, but I could not find working keyboard bindings for this.

And they don't really work well (they will not return to the previously seen page, but to the previous *jump* you did, but this seems to be reported several times already, e.g. https://bugzilla.gnome.org/show_bug.cgi?id=710681
> Go to slide 10 by preview navigation. Page back to 9, 8, 7, 6; then go to slide 1 with the preview navigation. Press "back" in history, and it will take you to slide 10 (destination of previous jump) rather than 6 (origin of current jump, and much more intuitive to "undo navigation").

I don't know if we need to store every page view or still can skip +-1 page flips, but it would certainly make sense to store both the source and the destination of a jump; when undoing the jump go the the source, when redoing go to the destination?

But back to this bug report:

The use of Alt+Left and Alt+Right appears to be standard for this (once the history navigation actually makes sense). E.g. Okular, Chromium, Firefox, maybe Acrobat too.

The main use case is to follow a hyperlink (e.g. a literature reference in a paper, or a "\beamergotobutton" in a presentation) and then being able to return back to where one was reading and or presenting directly, with a shortcut like Alt+Left.

For me, broken navigation is a major issue with using Evince.
Comment 1 Casey Jao 2017-05-13 20:16:52 UTC
The keybindings <alt>P and <alt>N officially go back and forward in history, respectively. However, the <alt>P shortcut seems to be for me broken in recent versions of evince.

The issue you describe with navigation results from the fact that a new node in history is created only when the page number jumps by at least 2. See the "page_changed_cb()" function (https://github.com/GNOME/evince/blob/master/shell/ev-history.c) and the comments in the thread (https://bugzilla.gnome.org/show_bug.cgi?id=696891) for context.
Comment 2 Casey Jao 2017-07-27 18:20:29 UTC
See this bug (https://bugzilla.gnome.org/show_bug.cgi?id=785236) for an update.
Comment 3 Casey Jao 2017-08-06 03:03:10 UTC
If one is willing to not use mnemonics, a temporary workaround is to set "gtk-enable-mnemonics=0" in ~/.config/gtk-3.0/settings.ini.
Comment 4 Casey Jao 2017-08-19 20:23:09 UTC
Pending a fix for that GTK bug, it seems that there are currently two options to fix the keyboard shortcuts for history navigation:

1) Change the "<alt>P" and "<alt>N" shortcuts to something else (e.g. cursory testing suggests that <Ctrl><alt>P and <Ctrl><alt>N both work).

2) Revert the GtkPopovers in the view and action menus to GtkMenus, whose mnemonics do not interfere with keyboard shortcuts.
Comment 5 Casey Jao 2017-08-19 20:31:22 UTC
Created attachment 357991 [details] [review]
Change keybindings for history navigation
Comment 6 Casey Jao 2017-10-19 14:24:14 UTC
There is a related bug that was closed recently concerning Thinkpad-specific back and forward keys ( Bug 553892 ). However the primary keybindings "<alt>P" and "<alt>N" still seem to be broken as they conflict with mnemonics. Would it be reasonable to change these?
Comment 7 Ivan Molodetskikh 2018-02-20 06:26:34 UTC
I'd like to suggest also binding the mouse back/forward buttons to navigation.
Comment 8 GNOME Infrastructure Team 2018-05-22 17:06:37 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to GNOME's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.gnome.org/GNOME/evince/issues/770.