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