Available in version 3.4 or later.
You can add new keyboard shortcuts or re-assign existing shortcut to a different command.
To customize keyboard shortcuts:
- use
Settings
/Advanced Options...
menu (orCtrl + K
to invoke Command Palette, typeadv
to narrow down and selectAdvanced Options...
command) - this opens a notepad with advanced settings file
- find
Shortcuts
array and add new shortcut definitions
An example of customization:
Shortcuts [
[
Cmd = CmdOpenFolder
Key = Alt + O
]
[
Cmd = CmdOpen
Key = x
]
[
Cmd = CmdNone
Key = q
]
]
Explanation:
- we added
Alt + O
keyboard shortcut forCmdOpenFolder
command. It opens a folder for browsing. - by default SumatraPDF has
Ctrl + O
shortcut forCmdOpen
(open a file) command. This changes the shortcut tox
- by default
q
closes the document. By binding it toCmdNone
we can disable a built-in shortcut
- just a key (like
a
,Z
,5
) i.e. lettersa
toz
,A
toZ
, and numbers0
to9
- modifiers + key. Modifiers are:
Shift
,Alt
,Ctrl
e.g.Alt + F1
,Ctrl + Shift + Y
- there are some special keys (e.g.
Alt + F3
)F1
-F24
numpad0
-numpad9
:0
to9
but on a numerical keyboardDelete
,Backspace
,Insert
,Home
,End
,Escape
Left
,Right
,Up
,Down
for arrow keys- full list of special keys
- without modifiers, case do matter i.e.
a
andA
are different - with modifiers, use
Shift
to select upper-case i.e.Alt + a
is the same asAlt + A
, useAlt + Shift + A
to select the upper-caseA
You can see a full list of commands (or in the source code)
The changes are applied right after you save settings file so that you can test changes without restarting SumatraPDF.
There is no indication if you make a mistake (i.e. use invalid command or invalid syntax for Key
).
If the shortcut doesn’t work, double-check command name and keyboard shortcut syntax.