Ubuntu – How to customize/add keyboard shortcuts for evince

14.04evinceshortcut-keys

I'm using evince 3.10.3 shipped with Ubuntu 14.04. I don't like some of the default settings for keyboard shortcuts. However, I cannot figure out how to customize them.

Following this question, here is what I have tried:

  1. I installed dconf-editor and changed can-change-accels to true.
  2. I Opened evince with UBUNTU_MENUPROXY=0 evince.
  3. I hovered mouse pointer over an entry (say,Find), and typed my desired shortcut (say,/).

But the corresponding shortcut isn't altered. I actually didn't recognize any change at all.

Is there anything I did wrong? What is the correct procedure to customize keyboard shortcuts for evince?

Best Answer

Did you try this? (The old school method!)

There is a file you can edit by hand to set keyboard shortcuts however you like. The "accels" file is in your home folder, in .config/evince. This file has rows like this:

(gtk_accel_path "<Actions>/BookmarsPopupActions/OpenBookmark" "<Primary>o")

You will find the same style of config file in many other programs:

Gimp: in ~/.gimp/menurc.
Geeqie: in ~/.config/geeqie/accels.

The semi-colon you find at the front of most lines is a comment symbol--they disable the following.

The modifier keys are referred to as <Primary> <Shift> and <Meta>. For most keyboards, these are Control, Shift, Alt. If you don't want a modifier, you don't need one.

I suggest you close the app in question and edit the accels file.

It appears to me only tricky part in this is knowing what should be in the middle of the config line. In apps like Gimp and Geeqie, the accels file is an exhaustive list of all the allowed shortcuts. All are commented out by semicolons at beginning of line. In Evince, the accels file in my home is pretty skimpy, not too many accels to fix.