NeoMutt  2020-04-24
Teaching an old dog new tricks
DOXYGEN
functions.c
Go to the documentation of this file.
1 
29 #include "config.h"
30 #ifdef _MAKEDOC
31 #include "docs/makedoc_defs.h"
32 #else
33 #include <stddef.h>
34 #include "keymap.h"
35 #include "opcodes.h"
36 #endif
37 
38 /*
39  * This file contains the structures needed to parse "bind" commands, as
40  * well as the default bindings for each menu.
41  *
42  * Notes:
43  *
44  * - If you need to bind a control char, use the octal value because the \cX
45  * construct does not work at this level.
46  *
47  * - The magic "map:" comments define how the map will be called in the
48  * manual. Lines starting with "**" will be included in the manual.
49  */
50 
51 // clang-format off
55 const struct Binding OpGeneric[] = { /* map: generic */
56  /*
57  ** <para>
58  ** The <emphasis>generic</emphasis> menu is not a real menu, but specifies common functions
59  ** (such as movement) available in all menus except for <emphasis>pager</emphasis> and
60  ** <emphasis>editor</emphasis>. Changing settings for this menu will affect the default
61  ** bindings for all menus (except as noted).
62  ** </para>
63  */
64  { "bottom-page", OP_BOTTOM_PAGE, "L" },
65  { "check-stats", OP_CHECK_STATS, NULL },
66  { "current-bottom", OP_CURRENT_BOTTOM, NULL },
67  { "current-middle", OP_CURRENT_MIDDLE, NULL },
68  { "current-top", OP_CURRENT_TOP, NULL },
69  { "end-cond", OP_END_COND, NULL },
70  { "enter-command", OP_ENTER_COMMAND, ":" },
71  { "exit", OP_EXIT, "q" },
72  { "first-entry", OP_FIRST_ENTRY, "=" },
73  { "half-down", OP_HALF_DOWN, "]" },
74  { "half-up", OP_HALF_UP, "[" },
75  { "help", OP_HELP, "?" },
76  { "jump", OP_JUMP, NULL },
77  { "last-entry", OP_LAST_ENTRY, "*" },
78  { "middle-page", OP_MIDDLE_PAGE, "M" },
79  { "next-entry", OP_NEXT_ENTRY, "j" },
80  { "next-line", OP_NEXT_LINE, ">" },
81  { "next-page", OP_NEXT_PAGE, "z" },
82  { "previous-entry", OP_PREV_ENTRY, "k" },
83  { "previous-line", OP_PREV_LINE, "<" },
84  { "previous-page", OP_PREV_PAGE, "Z" },
85  { "refresh", OP_REDRAW, "\014" }, // <Ctrl-L>
86  { "search", OP_SEARCH, "/" },
87  { "search-next", OP_SEARCH_NEXT, "n" },
88  { "search-opposite", OP_SEARCH_OPPOSITE, NULL },
89  { "search-reverse", OP_SEARCH_REVERSE, "\033/" }, // <Alt-/>
90  { "select-entry", OP_GENERIC_SELECT_ENTRY, "\n" },
91  { "select-entry", OP_GENERIC_SELECT_ENTRY, "\r" },
92  { "shell-escape", OP_SHELL_ESCAPE, "!" },
93  { "tag-entry", OP_TAG, "t" },
94  { "tag-prefix", OP_TAG_PREFIX, ";" },
95  { "tag-prefix-cond", OP_TAG_PREFIX_COND, NULL },
96  { "top-page", OP_TOP_PAGE, "H" },
97  { "what-key", OP_WHAT_KEY, NULL },
98  { NULL, 0, NULL },
99 };
100 
104 const struct Binding OpMain[] = { /* map: index */
105 #ifdef USE_AUTOCRYPT
106  { "autocrypt-acct-menu", OP_AUTOCRYPT_ACCT_MENU, "A" },
107 #endif
108  { "bounce-message", OP_BOUNCE_MESSAGE, "b" },
109  { "break-thread", OP_MAIN_BREAK_THREAD, "#" },
110 #ifdef USE_NNTP
111  { "catchup", OP_CATCHUP, NULL },
112 #endif
113  { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
114  { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, // <Alt-c>
115 #ifdef USE_NNTP
116  { "change-newsgroup", OP_MAIN_CHANGE_GROUP, "i" },
117  { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY, "\033i" }, // <Alt-i>
118 #endif
119 #ifdef USE_NOTMUCH
120  { "change-vfolder", OP_MAIN_CHANGE_VFOLDER, NULL },
121 #endif
122  { "check-traditional-pgp", OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
123  { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" },
124  { "collapse-all", OP_MAIN_COLLAPSE_ALL, "\033V" }, // <Alt-V>
125  { "collapse-thread", OP_MAIN_COLLAPSE_THREAD, "\033v" }, // <Alt-v>
126  { "compose-to-sender", OP_COMPOSE_TO_SENDER, NULL },
127  { "copy-message", OP_COPY_MESSAGE, "C" },
128  { "create-alias", OP_CREATE_ALIAS, "a" },
129  { "decode-copy", OP_DECODE_COPY, "\033C" }, // <Alt-C>
130  { "decode-save", OP_DECODE_SAVE, "\033s" }, // <Alt-s>
131  { "decrypt-copy", OP_DECRYPT_COPY, NULL },
132  { "decrypt-save", OP_DECRYPT_SAVE, NULL },
133  { "delete-message", OP_DELETE, "d" },
134  { "delete-pattern", OP_MAIN_DELETE_PATTERN, "D" },
135  { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, // <Alt-d>
136  { "delete-thread", OP_DELETE_THREAD, "\004" }, // <Ctrl-D>
137  { "display-address", OP_DISPLAY_ADDRESS, "@" },
138  { "display-message", OP_DISPLAY_MESSAGE, "\n" }, // <Enter>
139  { "display-message", OP_DISPLAY_MESSAGE, "\r" },
140  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
141  { "edit", OP_EDIT_RAW_MESSAGE, NULL },
142  { "edit-label", OP_EDIT_LABEL, "Y" },
143  { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE, "e" },
144  { "edit-raw-message", OP_EDIT_RAW_MESSAGE, NULL },
145  { "edit-type", OP_EDIT_TYPE, "\005" }, // <Ctrl-E>
146 #ifdef USE_NOTMUCH
147  { "entire-thread", OP_MAIN_ENTIRE_THREAD, NULL },
148 #endif
149  { "extract-keys", OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
150 #ifdef USE_POP
151  { "fetch-mail", OP_MAIN_FETCH_MAIL, "G" },
152 #endif
153  { "flag-message", OP_FLAG_MESSAGE, "F" },
154 #ifdef USE_NNTP
155  { "followup-message", OP_FOLLOWUP, NULL },
156 #endif
157  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
158  { "forward-message", OP_FORWARD_MESSAGE, "f" },
159 #ifdef USE_NNTP
160  { "forward-to-group", OP_FORWARD_TO_GROUP, NULL },
161  { "get-children", OP_GET_CHILDREN, NULL },
162  { "get-message", OP_GET_MESSAGE, NULL },
163  { "get-parent", OP_GET_PARENT, NULL },
164 #endif
165  { "group-chat-reply", OP_GROUP_CHAT_REPLY, NULL },
166  { "group-reply", OP_GROUP_REPLY, "g" },
167 #ifdef USE_IMAP
168  { "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL },
169  { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL, NULL },
170 #endif
171  { "limit", OP_MAIN_LIMIT, "l" },
172  { "limit-current-thread", OP_LIMIT_CURRENT_THREAD, NULL },
173  { "link-threads", OP_MAIN_LINK_THREADS, "&" },
174  { "list-reply", OP_LIST_REPLY, "L" },
175  { "mail", OP_MAIL, "m" },
176  { "mail-key", OP_MAIL_KEY, "\033k" }, // <Alt-k>
177  { "mailbox-list", OP_MAILBOX_LIST, "." },
178  { "mark-message", OP_MARK_MSG, "~" },
179  { "modify-labels", OP_MAIN_MODIFY_TAGS, NULL }, // NOTE(sileht): kept for backward compatibility
180  { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL }, // NOTE(sileht): kept for backward compatibility
181  { "modify-tags", OP_MAIN_MODIFY_TAGS, NULL },
182  { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL },
183  { "next-new", OP_MAIN_NEXT_NEW, NULL },
184  { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD, "\t" },
185  { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, // <Alt-n>
186  { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, // <Ctrl-N>
187  { "next-undeleted", OP_MAIN_NEXT_UNDELETED, "j" },
188  { "next-unread", OP_MAIN_NEXT_UNREAD, NULL },
189  { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL },
190  { "parent-message", OP_MAIN_PARENT_MESSAGE, "P" },
191  { "pipe-message", OP_PIPE, "|" },
192 #ifdef USE_NNTP
193  { "post-message", OP_POST, NULL },
194 #endif
195  { "previous-new", OP_MAIN_PREV_NEW, NULL },
196  { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD, "\033\t" }, // <Alt->
197  { "previous-subthread", OP_MAIN_PREV_SUBTHREAD, "\033p" }, // <Alt-p>
198  { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, // <Ctrl-P>
199  { "previous-undeleted", OP_MAIN_PREV_UNDELETED, "k" },
200  { "previous-unread", OP_MAIN_PREV_UNREAD, NULL },
201  { "print-message", OP_PRINT, "p" },
202  { "purge-message", OP_PURGE_MESSAGE, NULL },
203  { "purge-thread", OP_PURGE_THREAD, NULL },
204  { "quasi-delete", OP_MAIN_QUASI_DELETE, NULL },
205  { "query", OP_QUERY, "Q" },
206  { "quit", OP_QUIT, "q" },
207  { "read-subthread", OP_MAIN_READ_SUBTHREAD, "\033r" }, // <Alt-r>
208  { "read-thread", OP_MAIN_READ_THREAD, "\022" }, // <Ctrl-R>
209  { "recall-message", OP_RECALL_MESSAGE, "R" },
210 #ifdef USE_NNTP
211  { "reconstruct-thread", OP_RECONSTRUCT_THREAD, NULL },
212 #endif
213  { "reply", OP_REPLY, "r" },
214  { "resend-message", OP_RESEND, "\033e" }, // <Alt-e>
215  { "root-message", OP_MAIN_ROOT_MESSAGE, NULL },
216  { "save-message", OP_SAVE, "s" },
217  { "set-flag", OP_MAIN_SET_FLAG, "w" },
218  { "show-limit", OP_MAIN_SHOW_LIMIT, "\033l" }, // <Alt-l>
219  { "show-log-messages", OP_SHOW_LOG_MESSAGES, "M" },
220  { "show-version", OP_VERSION, "V" },
221 #ifdef USE_SIDEBAR
222  { "sidebar-first", OP_SIDEBAR_FIRST, NULL },
223  { "sidebar-last", OP_SIDEBAR_LAST, NULL },
224  { "sidebar-next", OP_SIDEBAR_NEXT, NULL },
225  { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL },
226  { "sidebar-open", OP_SIDEBAR_OPEN, NULL },
227  { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN, NULL },
228  { "sidebar-page-up", OP_SIDEBAR_PAGE_UP, NULL },
229  { "sidebar-prev", OP_SIDEBAR_PREV, NULL },
230  { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL },
231  { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL, NULL },
232  { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE, NULL },
233 #endif
234  { "sort-mailbox", OP_SORT, "o" },
235  { "sort-reverse", OP_SORT_REVERSE, "O" },
236  { "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" },
237  { "tag-pattern", OP_MAIN_TAG_PATTERN, "T" },
238  { "tag-subthread", OP_TAG_SUBTHREAD, NULL },
239  { "tag-thread", OP_TAG_THREAD, "\033t" }, // <Alt-t>
240  { "toggle-new", OP_TOGGLE_NEW, "N" },
241  { "toggle-read", OP_TOGGLE_READ, NULL },
242  { "toggle-write", OP_TOGGLE_WRITE, "%" },
243  { "undelete-message", OP_UNDELETE, "u" },
244  { "undelete-pattern", OP_MAIN_UNDELETE_PATTERN, "U" },
245  { "undelete-subthread", OP_UNDELETE_SUBTHREAD, "\033u" }, // <Alt-u>
246  { "undelete-thread", OP_UNDELETE_THREAD, "\025" }, // <Ctrl-U>
247  { "untag-pattern", OP_MAIN_UNTAG_PATTERN, "\024" }, // <Ctrl-T>
248 #ifdef USE_NOTMUCH
249  { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY, NULL },
250  { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY, NULL },
251  { "vfolder-window-backward", OP_MAIN_WINDOWED_VFOLDER_BACKWARD, NULL },
252  { "vfolder-window-forward", OP_MAIN_WINDOWED_VFOLDER_FORWARD, NULL },
253 #endif
254  { "view-attachments", OP_VIEW_ATTACHMENTS, "v" },
255  { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL },
256  /* This is deprecated. Leave it last so it doesn't show up in the help. */
257  { "buffy-list", OP_MAILBOX_LIST, NULL },
258  { NULL, 0, NULL },
259 };
260 
264 const struct Binding OpPager[] = { /* map: pager */
265  { "bottom", OP_PAGER_BOTTOM, NULL },
266  { "bounce-message", OP_BOUNCE_MESSAGE, "b" },
267  { "break-thread", OP_MAIN_BREAK_THREAD, "#" },
268  { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
269  { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, // <Alt-c>
270 #ifdef USE_NNTP
271  { "change-newsgroup", OP_MAIN_CHANGE_GROUP, "i" },
272  { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY, "\033i" }, // <Alt-i>
273 #endif
274 #ifdef USE_NOTMUCH
275  { "change-vfolder", OP_MAIN_CHANGE_VFOLDER, NULL },
276 #endif
277  { "check-stats", OP_CHECK_STATS, NULL },
278  { "check-traditional-pgp", OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
279  { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" },
280  { "compose-to-sender", OP_COMPOSE_TO_SENDER, NULL },
281  { "copy-message", OP_COPY_MESSAGE, "C" },
282  { "create-alias", OP_CREATE_ALIAS, "a" },
283  { "decode-copy", OP_DECODE_COPY, "\033C" }, // <Alt-C>
284  { "decode-save", OP_DECODE_SAVE, "\033s" }, // <Alt-s>
285  { "decrypt-copy", OP_DECRYPT_COPY, NULL },
286  { "decrypt-save", OP_DECRYPT_SAVE, NULL },
287  { "delete-message", OP_DELETE, "d" },
288  { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, // <Alt-d>
289  { "delete-thread", OP_DELETE_THREAD, "\004" }, // <Ctrl-D>
290  { "display-address", OP_DISPLAY_ADDRESS, "@" },
291  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
292  { "edit", OP_EDIT_RAW_MESSAGE, NULL },
293  { "edit-label", OP_EDIT_LABEL, "Y" },
294  { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE, "e" },
295  { "edit-raw-message", OP_EDIT_RAW_MESSAGE, NULL },
296  { "edit-type", OP_EDIT_TYPE, "\005" }, // <Ctrl-E>
297  { "enter-command", OP_ENTER_COMMAND, ":" },
298 #ifdef USE_NOTMUCH
299  { "entire-thread", OP_MAIN_ENTIRE_THREAD, NULL },
300 #endif
301  { "exit", OP_EXIT, "q" },
302  { "extract-keys", OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
303  { "flag-message", OP_FLAG_MESSAGE, "F" },
304 #ifdef USE_NNTP
305  { "followup-message", OP_FOLLOWUP, NULL },
306 #endif
307  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
308  { "forward-message", OP_FORWARD_MESSAGE, "f" },
309 #ifdef USE_NNTP
310  { "forward-to-group", OP_FORWARD_TO_GROUP, NULL },
311 #endif
312  { "group-chat-reply", OP_GROUP_CHAT_REPLY, NULL },
313  { "group-reply", OP_GROUP_REPLY, "g" },
314  { "half-down", OP_HALF_DOWN, NULL },
315  { "half-up", OP_HALF_UP, NULL },
316  { "help", OP_HELP, "?" },
317 #ifdef USE_IMAP
318  { "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL },
319  { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL, NULL },
320 #endif
321  { "jump", OP_JUMP, NULL },
322  { "link-threads", OP_MAIN_LINK_THREADS, "&" },
323  { "list-reply", OP_LIST_REPLY, "L" },
324  { "mail", OP_MAIL, "m" },
325  { "mail-key", OP_MAIL_KEY, "\033k" }, // <Alt-k>
326  { "mailbox-list", OP_MAILBOX_LIST, "." },
327  { "mark-as-new", OP_TOGGLE_NEW, "N" },
328  { "modify-labels", OP_MAIN_MODIFY_TAGS, NULL }, // NOTE(sileht): kept for backward compatibility
329  { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL }, // NOTE(sileht): kept for backward compatibility
330  { "modify-tags", OP_MAIN_MODIFY_TAGS, NULL },
331  { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL },
332  { "next-entry", OP_NEXT_ENTRY, "J" },
333  { "next-line", OP_NEXT_LINE, "\n" }, // <Enter>
334  { "next-line", OP_NEXT_LINE, "\r" },
335  { "next-new", OP_MAIN_NEXT_NEW, NULL },
336  { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD, "\t" },
337  { "next-page", OP_NEXT_PAGE, " " },
338  { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, // <Alt-n>
339  { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, // <Ctrl-N>
340  { "next-undeleted", OP_MAIN_NEXT_UNDELETED, "j" },
341  { "next-unread", OP_MAIN_NEXT_UNREAD, NULL },
342  { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL },
343  { "parent-message", OP_MAIN_PARENT_MESSAGE, "P" },
344  { "pipe-message", OP_PIPE, "|" },
345 #ifdef USE_NNTP
346  { "post-message", OP_POST, NULL },
347 #endif
348  { "previous-entry", OP_PREV_ENTRY, "K" },
349  { "previous-line", OP_PREV_LINE, NULL },
350  { "previous-new", OP_MAIN_PREV_NEW, NULL },
351  { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD, NULL },
352  { "previous-page", OP_PREV_PAGE, "-" },
353  { "previous-subthread", OP_MAIN_PREV_SUBTHREAD, "\033p" }, // <Alt-p>
354  { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, // <Ctrl-P>
355  { "previous-undeleted", OP_MAIN_PREV_UNDELETED, "k" },
356  { "previous-unread", OP_MAIN_PREV_UNREAD, NULL },
357  { "print-message", OP_PRINT, "p" },
358  { "purge-message", OP_PURGE_MESSAGE, NULL },
359  { "purge-thread", OP_PURGE_THREAD, NULL },
360  { "quasi-delete", OP_MAIN_QUASI_DELETE, NULL },
361  { "quit", OP_QUIT, "Q" },
362  { "read-subthread", OP_MAIN_READ_SUBTHREAD, "\033r" }, // <Alt-r>
363  { "read-thread", OP_MAIN_READ_THREAD, "\022" }, // <Ctrl-R>
364  { "recall-message", OP_RECALL_MESSAGE, "R" },
365 #ifdef USE_NNTP
366  { "reconstruct-thread", OP_RECONSTRUCT_THREAD, NULL },
367 #endif
368  { "redraw-screen", OP_REDRAW, "\014" }, // <Ctrl-L>
369  { "reply", OP_REPLY, "r" },
370  { "resend-message", OP_RESEND, "\033e" }, // <Alt-e>
371  { "root-message", OP_MAIN_ROOT_MESSAGE, NULL },
372  { "save-message", OP_SAVE, "s" },
373  { "search", OP_SEARCH, "/" },
374  { "search-next", OP_SEARCH_NEXT, "n" },
375  { "search-opposite", OP_SEARCH_OPPOSITE, NULL },
376  { "search-reverse", OP_SEARCH_REVERSE, "\033/" }, // <Alt-/>
377  { "search-toggle", OP_SEARCH_TOGGLE, "\\" }, // <Backslash>
378  { "set-flag", OP_MAIN_SET_FLAG, "w" },
379  { "shell-escape", OP_SHELL_ESCAPE, "!" },
380  { "show-version", OP_VERSION, "V" },
381 #ifdef USE_SIDEBAR
382  { "sidebar-first", OP_SIDEBAR_FIRST, NULL },
383  { "sidebar-last", OP_SIDEBAR_LAST, NULL },
384  { "sidebar-next", OP_SIDEBAR_NEXT, NULL },
385  { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL },
386  { "sidebar-open", OP_SIDEBAR_OPEN, NULL },
387  { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN, NULL },
388  { "sidebar-page-up", OP_SIDEBAR_PAGE_UP, NULL },
389  { "sidebar-prev", OP_SIDEBAR_PREV, NULL },
390  { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL },
391  { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL, NULL },
392  { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE, NULL },
393 #endif
394  { "skip-quoted", OP_PAGER_SKIP_QUOTED, "S" },
395  { "sort-mailbox", OP_SORT, "o" },
396  { "sort-reverse", OP_SORT_REVERSE, "O" },
397  { "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" },
398  { "tag-message", OP_TAG, "t" },
399  { "toggle-quoted", OP_PAGER_HIDE_QUOTED, "T" },
400  { "toggle-write", OP_TOGGLE_WRITE, "%" },
401  { "top", OP_PAGER_TOP, "^" },
402  { "undelete-message", OP_UNDELETE, "u" },
403  { "undelete-subthread", OP_UNDELETE_SUBTHREAD, "\033u" }, // <Alt-u>
404  { "undelete-thread", OP_UNDELETE_THREAD, "\025" }, // <Ctrl-U>
405 #ifdef USE_NOTMUCH
406  { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY, NULL },
407  { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY, NULL },
408 #endif
409  { "view-attachments", OP_VIEW_ATTACHMENTS, "v" },
410  { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL },
411  { "what-key", OP_WHAT_KEY, NULL },
412  /* This is deprecated. Leave it last so it doesn't show up in the help. */
413  { "buffy-list", OP_MAILBOX_LIST, NULL },
414  { NULL, 0, NULL },
415 };
416 
420 const struct Binding OpAttach[] = { /* map: attachment */
421  { "bounce-message", OP_BOUNCE_MESSAGE, "b" },
422  { "check-traditional-pgp", OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
423  { "collapse-parts", OP_ATTACH_COLLAPSE, "v" },
424  { "compose-to-sender", OP_COMPOSE_TO_SENDER, NULL },
425  { "delete-entry", OP_DELETE, "d" },
426  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
427  { "edit-type", OP_EDIT_TYPE, "\005" }, // <Ctrl-E>
428  { "extract-keys", OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
429 #ifdef USE_NNTP
430  { "followup-message", OP_FOLLOWUP, NULL },
431 #endif
432  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
433  { "forward-message", OP_FORWARD_MESSAGE, "f" },
434 #ifdef USE_NNTP
435  { "forward-to-group", OP_FORWARD_TO_GROUP, NULL },
436 #endif
437  { "group-chat-reply", OP_GROUP_CHAT_REPLY, NULL },
438  { "group-reply", OP_GROUP_REPLY, "g" },
439  { "list-reply", OP_LIST_REPLY, "L" },
440  { "pipe-entry", OP_PIPE, "|" },
441  { "print-entry", OP_PRINT, "p" },
442  { "reply", OP_REPLY, "r" },
443  { "resend-message", OP_RESEND, "\033e" }, // <Alt-e>
444  { "save-entry", OP_SAVE, "s" },
445  { "undelete-entry", OP_UNDELETE, "u" },
446  { "view-attach", OP_VIEW_ATTACH, "\n" }, // <Enter>
447  { "view-attach", OP_VIEW_ATTACH, "\r" },
448  { "view-mailcap", OP_ATTACH_VIEW_MAILCAP, "m" },
449  { "view-text", OP_ATTACH_VIEW_TEXT, "T" },
450  { NULL, 0, NULL },
451 };
452 
456 const struct Binding OpCompose[] = { /* map: compose */
457  { "attach-file", OP_COMPOSE_ATTACH_FILE, "a" },
458  { "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" }, // <Alt-k>
459  { "attach-message", OP_COMPOSE_ATTACH_MESSAGE, "A" },
460 #ifdef USE_NNTP
461  { "attach-news-message", OP_COMPOSE_ATTACH_NEWS_MESSAGE, NULL },
462 #endif
463 #ifdef USE_AUTOCRYPT
464  { "autocrypt-menu", OP_COMPOSE_AUTOCRYPT_MENU, "o" },
465 #endif
466  { "copy-file", OP_SAVE, "C" },
467  { "detach-file", OP_DELETE, "D" },
468  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
469  { "edit-bcc", OP_COMPOSE_EDIT_BCC, "b" },
470  { "edit-cc", OP_COMPOSE_EDIT_CC, "c" },
471  { "edit-description", OP_COMPOSE_EDIT_DESCRIPTION, "d" },
472  { "edit-encoding", OP_COMPOSE_EDIT_ENCODING, "\005" }, // <Ctrl-E>
473  { "edit-fcc", OP_COMPOSE_EDIT_FCC, "f" },
474  { "edit-file", OP_COMPOSE_EDIT_FILE, "\030e" }, // <Alt-e>
475 #ifdef USE_NNTP
476  { "edit-followup-to", OP_COMPOSE_EDIT_FOLLOWUP_TO, NULL },
477 #endif
478  { "edit-from", OP_COMPOSE_EDIT_FROM, "\033f" }, // <Alt-f>
479  { "edit-headers", OP_COMPOSE_EDIT_HEADERS, "E" },
480  { "edit-language", OP_COMPOSE_EDIT_LANGUAGE, "\014" }, // <Ctrl-L>
481  { "edit-message", OP_COMPOSE_EDIT_MESSAGE, "e" },
482  { "edit-mime", OP_COMPOSE_EDIT_MIME, "m" },
483 #ifdef USE_NNTP
484  { "edit-newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS, NULL },
485 #endif
486  { "edit-reply-to", OP_COMPOSE_EDIT_REPLY_TO, "r" },
487  { "edit-subject", OP_COMPOSE_EDIT_SUBJECT, "s" },
488  { "edit-to", OP_COMPOSE_EDIT_TO, "t" },
489  { "edit-type", OP_EDIT_TYPE, "\024" }, // <Ctrl-T>
490 #ifdef USE_NNTP
491  { "edit-x-comment-to", OP_COMPOSE_EDIT_X_COMMENT_TO, NULL },
492 #endif
493  { "filter-entry", OP_FILTER, "F" },
494  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
495  { "get-attachment", OP_COMPOSE_GET_ATTACHMENT, "G" },
496  { "group-alternatives", OP_COMPOSE_GROUP_ALTS, "&" },
497  { "group-multilingual", OP_COMPOSE_GROUP_LINGUAL, "^" },
498  { "ispell", OP_COMPOSE_ISPELL, "i" },
499 #ifdef MIXMASTER
500  { "mix", OP_COMPOSE_MIX, "M" },
501 #endif
502  { "move-down", OP_COMPOSE_MOVE_DOWN, "+" },
503  { "move-up", OP_COMPOSE_MOVE_UP, "-" },
504  { "new-mime", OP_COMPOSE_NEW_MIME, "n" },
505  { "pgp-menu", OP_COMPOSE_PGP_MENU, "p" },
506  { "pipe-entry", OP_PIPE, "|" },
507  { "postpone-message", OP_COMPOSE_POSTPONE_MESSAGE, "P" },
508  { "print-entry", OP_PRINT, "l" },
509  { "rename-attachment", OP_COMPOSE_RENAME_ATTACHMENT, "\017" }, // <Ctrl-O>
510  { "rename-file", OP_COMPOSE_RENAME_FILE, "R" },
511  { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" },
512  { "smime-menu", OP_COMPOSE_SMIME_MENU, "S" },
513  { "toggle-disposition", OP_COMPOSE_TOGGLE_DISPOSITION, "\004" }, // <Ctrl-D>
514  { "toggle-recode", OP_COMPOSE_TOGGLE_RECODE, NULL },
515  { "toggle-unlink", OP_COMPOSE_TOGGLE_UNLINK, "u" },
516  { "update-encoding", OP_COMPOSE_UPDATE_ENCODING, "U" },
517  { "view-attach", OP_VIEW_ATTACH, "\n" }, // <Enter>
518  { "view-attach", OP_VIEW_ATTACH, "\r" },
519  { "write-fcc", OP_COMPOSE_WRITE_MESSAGE, "w" },
520  { NULL, 0, NULL },
521 };
522 
526 const struct Binding OpPost[] = { /* map: postpone */
527  { "delete-entry", OP_DELETE, "d" },
528  { "undelete-entry", OP_UNDELETE, "u" },
529  { NULL, 0, NULL },
530 };
531 
535 const struct Binding OpAlias[] = { /* map: alias */
536  { "delete-entry", OP_DELETE, "d" },
537  { "undelete-entry", OP_UNDELETE, "u" },
538  { NULL, 0, NULL },
539 };
540 
544 const struct Binding OpBrowser[] = { /* map: browser */
545 #ifdef USE_NNTP
546  { "catchup", OP_CATCHUP, NULL },
547 #endif
548  { "change-dir", OP_CHANGE_DIRECTORY, "c" },
549  { "check-new", OP_CHECK_NEW, NULL },
550 #ifdef USE_IMAP
551  { "create-mailbox", OP_CREATE_MAILBOX, "C" },
552  { "delete-mailbox", OP_DELETE_MAILBOX, "d" },
553 #endif
554  { "descend-directory", OP_DESCEND_DIRECTORY, NULL },
555  { "display-filename", OP_BROWSER_TELL, "@" },
556  { "enter-mask", OP_ENTER_MASK, "m" },
557  { "goto-folder", OP_BROWSER_GOTO_FOLDER, "=" },
558  { "goto-parent", OP_GOTO_PARENT, "p" },
559  { "mailbox-list", OP_MAILBOX_LIST, "." },
560 #ifdef USE_NNTP
561  { "reload-active", OP_LOAD_ACTIVE, NULL },
562 #endif
563 #ifdef USE_IMAP
564  { "rename-mailbox", OP_RENAME_MAILBOX, "r" },
565 #endif
566  { "select-new", OP_BROWSER_NEW_FILE, "N" },
567  { "sort", OP_SORT, "o" },
568  { "sort-reverse", OP_SORT_REVERSE, "O" },
569 #if defined(USE_IMAP) || defined(USE_NNTP)
570  { "subscribe", OP_BROWSER_SUBSCRIBE, "s" },
571 #endif
572 #ifdef USE_NNTP
573  { "subscribe-pattern", OP_SUBSCRIBE_PATTERN, NULL },
574 #endif
575  { "toggle-mailboxes", OP_TOGGLE_MAILBOXES, "\t" },
576 #ifdef USE_IMAP
577  { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB, "T" },
578 #endif
579 #ifdef USE_NNTP
580  { "uncatchup", OP_UNCATCHUP, NULL },
581 #endif
582 #if defined(USE_IMAP) || defined(USE_NNTP)
583  { "unsubscribe", OP_BROWSER_UNSUBSCRIBE, "u" },
584 #endif
585 #ifdef USE_NNTP
586  { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN, NULL },
587 #endif
588  { "view-file", OP_BROWSER_VIEW_FILE, " " },
589  /* This is deprecated. Leave it last so it doesn't show up in the help. */
590  { "buffy-list", OP_MAILBOX_LIST, NULL },
591  { NULL, 0, NULL },
592 };
593 
597 const struct Binding OpQuery[] = { /* map: query */
598  { "create-alias", OP_CREATE_ALIAS, "a" },
599  { "mail", OP_MAIL, "m" },
600  { "query", OP_QUERY, "Q" },
601  { "query-append", OP_QUERY_APPEND, "A" },
602  { NULL, 0, NULL },
603 };
604 
608 const struct Binding OpEditor[] = { /* map: editor */
609  { "backspace", OP_EDITOR_BACKSPACE, "\010" }, // <Ctrl-H>
610  { "backward-char", OP_EDITOR_BACKWARD_CHAR, "\002" }, // <Ctrl-B>
611  { "backward-word", OP_EDITOR_BACKWARD_WORD, "\033b" }, // <Alt-b>
612  { "bol", OP_EDITOR_BOL, "\001" }, // <Ctrl-A>
613  { "capitalize-word", OP_EDITOR_CAPITALIZE_WORD, "\033c" }, // <Alt-c>
614  { "complete", OP_EDITOR_COMPLETE, "\t" }, // <Tab>
615  { "complete-query", OP_EDITOR_COMPLETE_QUERY, "\024" }, // <Ctrl-T>
616  { "delete-char", OP_EDITOR_DELETE_CHAR, "\004" }, // <Ctrl-D>
617  { "downcase-word", OP_EDITOR_DOWNCASE_WORD, "\033l" }, // <Alt-l>
618  { "eol", OP_EDITOR_EOL, "\005" }, // <Ctrl-E>
619  { "forward-char", OP_EDITOR_FORWARD_CHAR, "\006" }, // <Ctrl-F>
620  { "forward-word", OP_EDITOR_FORWARD_WORD, "\033f" }, // <Alt-f>
621  { "history-down", OP_EDITOR_HISTORY_DOWN, NULL },
622  { "history-search", OP_EDITOR_HISTORY_SEARCH, "\022" }, // <Ctrl-R>
623  { "history-up", OP_EDITOR_HISTORY_UP, NULL },
624  { "kill-eol", OP_EDITOR_KILL_EOL, "\013" }, // <Ctrl-K>
625  { "kill-eow", OP_EDITOR_KILL_EOW, "\033d" }, // <Alt-d>
626  { "kill-line", OP_EDITOR_KILL_LINE, "\025" }, // <Ctrl-U>
627  { "kill-word", OP_EDITOR_KILL_WORD, "\027" }, // <Ctrl-W>
628  { "mailbox-cycle", OP_EDITOR_MAILBOX_CYCLE, " " },
629  { "quote-char", OP_EDITOR_QUOTE_CHAR, "\026" }, // <Ctrl-V>
630  { "transpose-chars", OP_EDITOR_TRANSPOSE_CHARS, NULL },
631  { "upcase-word", OP_EDITOR_UPCASE_WORD, "\033u" }, // <Alt-u>
632  /* This is deprecated. Leave it last so it doesn't show up in the help. */
633  { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, NULL },
634  { NULL, 0, NULL },
635 };
636 
640 const struct Binding OpPgp[] = { /* map: pgp */
641  { "verify-key", OP_VERIFY_KEY, "c" },
642  { "view-name", OP_VIEW_ID, "%" },
643  { NULL, 0, NULL },
644 };
645 
649 const struct Binding OpSmime[] = { /* map: smime */
650 #ifdef CRYPT_BACKEND_GPGME
651  { "verify-key", OP_VERIFY_KEY, "c" },
652  { "view-name", OP_VIEW_ID, "%" },
653 #endif
654  { NULL, 0, NULL },
655 };
656 
657 #ifdef MIXMASTER
658 
661 const struct Binding OpMix[] = { /* map: mixmaster */
662  { "accept", OP_MIX_USE, "\n" }, // <Enter>
663  { "accept", OP_MIX_USE, "\r" }, // <Return>
664  { "append", OP_MIX_APPEND, "a" },
665  { "chain-next", OP_MIX_CHAIN_NEXT, "<right>" },
666  { "chain-prev", OP_MIX_CHAIN_PREV, "<left>" },
667  { "delete", OP_MIX_DELETE, "d" },
668  { "insert", OP_MIX_INSERT, "i" },
669  { NULL, 0, NULL },
670 };
671 #endif /* MIXMASTER */
672 
673 #ifdef USE_AUTOCRYPT
674 
677 const struct Binding OpAutocryptAcct[] = { /* map: autocrypt account */
678  { "create-account", OP_AUTOCRYPT_CREATE_ACCT, "c" },
679  { "delete-account", OP_AUTOCRYPT_DELETE_ACCT, "D" },
680  { "toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE, "a" },
681  { "toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER, "p" },
682  { NULL, 0, NULL }
683 };
684 #endif
685 
686 // clang-format on
Manage keymappings.
All user-callable functions.
Mapping between a user key and a function.
Definition: keymap.h:117