| 1 |
AERC-BINDS(5) |
| 2 |
|
| 3 |
# NAME |
| 4 |
|
| 5 |
aerc-binds - key bindings configuration file format for *aerc*(1) |
| 6 |
|
| 7 |
# SYNOPSIS |
| 8 |
|
| 9 |
The _binds.conf_ file is used for configuring keybindings used in the aerc |
| 10 |
interactive client. It is expected to be in your XDG config home plus _aerc_, |
| 11 |
which defaults to _~/.config/aerc/binds.conf_. If the file does not exist, the |
| 12 |
built-in default will be installed. An alternate file can be specified via the |
| 13 |
_--binds-conf_ command line argument, see *aerc*(1). |
| 14 |
|
| 15 |
This file is written in the ini format with key bindings defined as: |
| 16 |
|
| 17 |
*<key sequence>* = _<command>_ |
| 18 |
|
| 19 |
Where *<key sequence>* is the keystrokes pressed (in order) to invoke this |
| 20 |
keybinding, and _<command>_ specifies keystrokes that aerc will simulate when |
| 21 |
the keybinding is invoked. Generally this is used to execute commands, for |
| 22 |
example: |
| 23 |
|
| 24 |
*rq* = _:reply -q<Enter>_ |
| 25 |
|
| 26 |
Pressing *r*, then *q*, will simulate typing in _:reply -q<Enter>_, and execute |
| 27 |
*:reply -q* accordingly. It is also possible to invoke keybindings recursively |
| 28 |
in a similar fashion. |
| 29 |
|
| 30 |
You may configure different keybindings for different contexts by writing them |
| 31 |
into different *[sections]* of the ini file. |
| 32 |
|
| 33 |
# CONTEXTS |
| 34 |
|
| 35 |
The available contexts are: |
| 36 |
|
| 37 |
*[default]* |
| 38 |
Global keybindings that apply to all contexts (unless overridden). |
| 39 |
Alternatively, global bindings can be placed at the beginning of the |
| 40 |
file before any section header. |
| 41 |
|
| 42 |
*[messages]* |
| 43 |
keybindings for the message list |
| 44 |
|
| 45 |
*[view]* |
| 46 |
keybindings for the message viewer |
| 47 |
|
| 48 |
*[view::passthrough]* |
| 49 |
keybindings for the viewer, when in key passthrough mode |
| 50 |
(toggled with *:toggle-key-passthrough*) |
| 51 |
|
| 52 |
*[compose]* |
| 53 |
keybindings for the message composer |
| 54 |
|
| 55 |
*[compose::editor]* |
| 56 |
keybindings for the composer, when the editor is focused |
| 57 |
|
| 58 |
*[compose::review]* |
| 59 |
keybindings for the composer, when reviewing the email before it's sent |
| 60 |
|
| 61 |
To customize the description shown on the review screen, add a comment |
| 62 |
(_" # "_) at the end of the keybinding. Example: |
| 63 |
|
| 64 |
p = :postpone<Enter> # I'll work on it later |
| 65 |
|
| 66 |
The order in which bindings are defined is preserved on the review |
| 67 |
screen. If a non-default binding is not annotated it will be displayed |
| 68 |
without any description. |
| 69 |
|
| 70 |
To hide a binding from the review screen, explicitly annotate it with |
| 71 |
a _" # -"_ comment. Example: |
| 72 |
|
| 73 |
<C-e> = :encrypt<Enter> # - |
| 74 |
|
| 75 |
*[terminal]* |
| 76 |
keybindings for terminal tabs |
| 77 |
|
| 78 |
You may also configure account specific key bindings for each context: |
| 79 |
|
| 80 |
*[context:account=*_AccountName_*]* |
| 81 |
keybindings for this context and account, where _AccountName_ is a |
| 82 |
regular expression that matches the account name you provided in _accounts.conf_. |
| 83 |
|
| 84 |
Folder and context-specific bindings can be configured for message lists: |
| 85 |
|
| 86 |
*[messages:folder=*_FolderName_*]*++ |
| 87 |
*[view:folder=*_FolderName_*]*++ |
| 88 |
*[view::passthrough:folder=*_FolderName_*]*++ |
| 89 |
*[compose:folder=*_FolderName_*]*++ |
| 90 |
*[compose::editor:folder=*_FolderName_*]*++ |
| 91 |
*[compose::review:folder=*_FolderName_*]* |
| 92 |
keybindings under this section will be specific to the folder that |
| 93 |
matches the regular expression _FolderName_. |
| 94 |
Keybindings from a folder specifier will take precedence over account specifiers |
| 95 |
|
| 96 |
# EXAMPLES |
| 97 |
|
| 98 |
``` |
| 99 |
[messages:account=Mailbox] |
| 100 |
c = :cf path:mailbox/** and<space> |
| 101 |
|
| 102 |
[compose::editor:account=Mailbox2] |
| 103 |
|
| 104 |
[compose::editor:folder=aerc] |
| 105 |
y = :send -t aerc |
| 106 |
|
| 107 |
[messages:folder=Drafts] |
| 108 |
<Enter> = :recall<Enter> |
| 109 |
|
| 110 |
[messages:folder=Archive/\d+/.*] |
| 111 |
gi = :cf Inbox<Enter> |
| 112 |
... |
| 113 |
``` |
| 114 |
|
| 115 |
You may also configure global keybindings by placing them at the beginning of |
| 116 |
the file, before specifying any context-specific sections. |
| 117 |
|
| 118 |
Parent keybindings can be erased in the context ones by specifying an "empty" |
| 119 |
binding: |
| 120 |
|
| 121 |
``` |
| 122 |
[compose::review] |
| 123 |
a = :attach<space> |
| 124 |
d = :detach<space> |
| 125 |
|
| 126 |
[compose::review:account=no-attachments] |
| 127 |
a = |
| 128 |
d = |
| 129 |
``` |
| 130 |
|
| 131 |
If you want to change the default Delete action to move to Trash instead of |
| 132 |
deleting permanently: |
| 133 |
|
| 134 |
``` |
| 135 |
d = :read<Enter>:move Trash<Enter> |
| 136 |
#... |
| 137 |
[messages:folder=Trash] |
| 138 |
d = :choose -o y 'Permanently delete?' delete-message<Enter> |
| 139 |
# And similarly for Spam |
| 140 |
``` |
| 141 |
|
| 142 |
# SPECIAL OPTIONS |
| 143 |
|
| 144 |
In addition to user defined key sequences, the following special options are |
| 145 |
available in each binding context: |
| 146 |
|
| 147 |
*$noinherit* = _true_|_false_ |
| 148 |
If set to _true_, global keybindings will not be effective in this context. |
| 149 |
|
| 150 |
Default: _false_ |
| 151 |
|
| 152 |
*$ex* = _<key-stroke>_ |
| 153 |
This can be set to a keystroke which will bring up the command input in this |
| 154 |
context. |
| 155 |
|
| 156 |
Default: _:_ |
| 157 |
|
| 158 |
*$complete* = _<key-stroke>_ |
| 159 |
This can be set to a keystroke which will trigger command completion in |
| 160 |
this context for text inputs that support it. |
| 161 |
|
| 162 |
Default: _<tab>_ |
| 163 |
|
| 164 |
Note: automatic command completion is disabled when simulating |
| 165 |
keystrokes and re-enabled at the end. When *[ui].completion-min-chars* |
| 166 |
is set to _manual_ (see *aerc-config*(5)), it is possible to end |
| 167 |
a keybinding with the completion key to explicitly display the |
| 168 |
completion menu. E.g.: |
| 169 |
|
| 170 |
*o* = _:cf<space><tab>_ |
| 171 |
|
| 172 |
# SUPPORTED KEYS |
| 173 |
|
| 174 |
In addition to letters and some characters (e.g. *a*, *RR*, *gu*, *?*, *!*, |
| 175 |
etc.), special keys may be specified in *<angle brackets>*. The syntax for |
| 176 |
modified or special keys is: |
| 177 |
|
| 178 |
<C-A-S-key> |
| 179 |
|
| 180 |
Where C is control, A is alt, S is shift, and key is the named key or character. |
| 181 |
|
| 182 |
Valid key names are: |
| 183 |
|
| 184 |
[[ *Name* |
| 185 |
:- *Description* |
| 186 |
| *<space>* |
| 187 |
: " " |
| 188 |
| *<dash>* |
| 189 |
: - |
| 190 |
| *<semicolon>* |
| 191 |
: ; |
| 192 |
| *<tab>* |
| 193 |
: Tab |
| 194 |
| *<enter>*, *<cr>* |
| 195 |
: Enter |
| 196 |
| *<up>* |
| 197 |
: Up arrow |
| 198 |
| *<down>* |
| 199 |
: Down arrow |
| 200 |
| *<right>* |
| 201 |
: Right arrow |
| 202 |
| *<left>* |
| 203 |
: Left arrow |
| 204 |
| *<pgup>* |
| 205 |
: Page Up |
| 206 |
| *<pgdn>* |
| 207 |
: Page Down |
| 208 |
| *<home>* |
| 209 |
: Home |
| 210 |
| *<end>* |
| 211 |
: End |
| 212 |
| *<insert>* |
| 213 |
: Insert |
| 214 |
| *<delete>*, *<del>* |
| 215 |
: Delete |
| 216 |
| *<backspace>* |
| 217 |
: Backspace |
| 218 |
| *<exit>* |
| 219 |
: Exit |
| 220 |
| *<clear>* |
| 221 |
: Clear |
| 222 |
| *<cancel>* |
| 223 |
: Cancel |
| 224 |
| *<print>* |
| 225 |
: Print screen |
| 226 |
| *<pause>* |
| 227 |
: Pause |
| 228 |
| *<backtab>* |
| 229 |
: Shift+Tab |
| 230 |
| *<esc>* |
| 231 |
: Escape |
| 232 |
| *<f1>* ... *<f63>* |
| 233 |
: Function keys |
| 234 |
|
| 235 |
# SEE ALSO |
| 236 |
|
| 237 |
*aerc*(1) *aerc-config*(5) |
| 238 |
|
| 239 |
# AUTHORS |
| 240 |
|
| 241 |
Originally created by Drew DeVault and maintained by Robin Jarry who is assisted |
| 242 |
by other open source contributors. For more information about aerc development, |
| 243 |
see _https://sr.ht/~rjarry/aerc/_. |