Firstly, just in case you don't know, you can use Space
and Shift-Space
instead of PgDn
and PgUp
.
If you still want to change the keybindings, then unfortunately I think that for evince the keybindings are hard-coded. Three possible solutions are:
Switch to atril
which is the MATE fork of evince and which allows the customisation of keybindings, at least via an accels
file (at ~/.config/atril/accels
). For comparison, you could look at, say, ~/.config/nautilus/accels
.
Use something with AutoHotkey functionality (for some possibilities, see this stackexchange question).
(If you're feeling adventurous) patch the source of evince and recompile:
To get the source used by Ubuntu:
apt-get source evince
If this doesn't work, uncomment the deb-src
lines in /etc/apt/sources.list
.
The offending lines, responsible for the bindings in evince are:
add_scroll_binding_keypad (binding_set, GDK_KEY_Page_Up, 0, GTK_SCROLL_PAGE_BACKWARD, GTK_ORIENTATION_VERTICAL);
add_scroll_binding_keypad (binding_set, GDK_KEY_Page_Down, 0, GTK_SCROLL_PAGE_FORWARD, GTK_ORIENTATION_VERTICAL);
in shell/ev-view.c
. (See here on GitHub. GitHub link provided for convenience, but preferably don't get the source from there, but via apt-get
as described above.)
The lines need to be changed to:
add_scroll_binding_keypad (binding_set, GDK_KEY_Up, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_BACKWARD, GTK_ORIENTATION_VERTICAL);
add_scroll_binding_keypad (binding_set, GDK_KEY_Down, GDK_CONTROL_MASK, GTK_SCROLL_PAGE_FORWARD, GTK_ORIENTATION_VERTICAL);
Note, however, that you won't get security fixes to evince automatically if you compile it yourself.
For reference, if somebody wishes to modify other keyboard shortcuts in evince, some of the action (as opposed to motion) bindings are specified in shell/ev-application.c
in the definition of const gchar *action_accels[]
(here on GitHub).