Is there a way to customize keyboard shortcuts for Evince, the GNOME document viewer?


I downloaded the source code of evince (source code provided by Debian 9.9, evince 3.22.1) and since every shortcuts are written "as-is" in internationalization files (.po), i guess they are hardcoded.

For example:

help/fr/fr.po:msgid "<keyseq><key>Ctrl</key><key>R</key></keyseq>"
help/fr/fr.po:msgstr "<keyseq><key>Ctrl</key><key>R</key></keyseq>"

I'm trying to dig more, but the way evince manage shortcut is quite ... strange :)


You can edit them in the source code, where they are defined, and rebuild the package:

In theory, evince should read the accels file at init time and merge with the ones it has, so you can also change the accels file, in ~/.config/evince/accels. Keep in mind that it gets overwritten if there are syntax errors.

  • I don't have a file at ~/.config/evince/accels. Is there supposed to be something there?
    – Jonathan
    Oct 16 '19 at 2:58
  • It might be distribution/window manager dependent. It is there in Debian 9 + Xfce4. It is created automatically by evince if it does not exist. Oct 16 '19 at 12:12
  • Do I have to copy it over from some place in the filesystem, like /usr/...evince? I can't find it anywhere
    – Jonathan
    Oct 16 '19 at 15:38
  • It should be there. What is your system, its version and the the Evince version? Oct 16 '19 at 16:03
  • Evince 3.34.1 on Manjaro, with all the latest updates.
    – Jonathan
    Oct 17 '19 at 17:17

I resigned to customize keyboard shortcut for Gnome Program. I can not use accels file. I wrote patch for source code in old by portage. However, I gave up because the source code changes frequently.

In now, I use mooz/xkeysnail: Yet another keyboard remapping tool for X environment.

I write config file.

define_keymap(re.compile("Evince"), {
    # t
    K("k"): K("r"),
}, "Evince")

One caution is required, and if you touch a key without a modifier key, it will be converted when you enter it in the search form.

This site is temporarily in read only mode and not accepting new answers.

Not the answer you're looking for? Browse other questions tagged .