NeoMutt  2021-02-05-666-ge300cd
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  { "vfolder-window-reset", OP_MAIN_WINDOWED_VFOLDER_RESET, NULL },
252 #endif
253  { "view-attachments", OP_VIEW_ATTACHMENTS, "v" },
254  { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL },
255  /* This is deprecated. Leave it last so it doesn't show up in the help. */
256  { "buffy-list", OP_MAILBOX_LIST, NULL },
257  { NULL, 0, NULL },
258 };
259 
263 const struct Binding OpPager[] = { /* map: pager */
264  { "bottom", OP_PAGER_BOTTOM, NULL },
265  { "bounce-message", OP_BOUNCE_MESSAGE, "b" },
266  { "break-thread", OP_MAIN_BREAK_THREAD, "#" },
267  { "change-folder", OP_MAIN_CHANGE_FOLDER, "c" },
268  { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY, "\033c" }, // <Alt-c>
269 #ifdef USE_NNTP
270  { "change-newsgroup", OP_MAIN_CHANGE_GROUP, "i" },
271  { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY, "\033i" }, // <Alt-i>
272 #endif
273 #ifdef USE_NOTMUCH
274  { "change-vfolder", OP_MAIN_CHANGE_VFOLDER, NULL },
275 #endif
276  { "check-stats", OP_CHECK_STATS, NULL },
277  { "check-traditional-pgp", OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
278  { "clear-flag", OP_MAIN_CLEAR_FLAG, "W" },
279  { "compose-to-sender", OP_COMPOSE_TO_SENDER, NULL },
280  { "copy-message", OP_COPY_MESSAGE, "C" },
281  { "create-alias", OP_CREATE_ALIAS, "a" },
282  { "decode-copy", OP_DECODE_COPY, "\033C" }, // <Alt-C>
283  { "decode-save", OP_DECODE_SAVE, "\033s" }, // <Alt-s>
284  { "decrypt-copy", OP_DECRYPT_COPY, NULL },
285  { "decrypt-save", OP_DECRYPT_SAVE, NULL },
286  { "delete-message", OP_DELETE, "d" },
287  { "delete-subthread", OP_DELETE_SUBTHREAD, "\033d" }, // <Alt-d>
288  { "delete-thread", OP_DELETE_THREAD, "\004" }, // <Ctrl-D>
289  { "display-address", OP_DISPLAY_ADDRESS, "@" },
290  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
291  { "edit", OP_EDIT_RAW_MESSAGE, NULL },
292  { "edit-label", OP_EDIT_LABEL, "Y" },
293  { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE, "e" },
294  { "edit-raw-message", OP_EDIT_RAW_MESSAGE, NULL },
295  { "edit-type", OP_EDIT_TYPE, "\005" }, // <Ctrl-E>
296  { "enter-command", OP_ENTER_COMMAND, ":" },
297 #ifdef USE_NOTMUCH
298  { "entire-thread", OP_MAIN_ENTIRE_THREAD, NULL },
299 #endif
300  { "exit", OP_EXIT, "q" },
301  { "extract-keys", OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
302  { "flag-message", OP_FLAG_MESSAGE, "F" },
303 #ifdef USE_NNTP
304  { "followup-message", OP_FOLLOWUP, NULL },
305 #endif
306  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
307  { "forward-message", OP_FORWARD_MESSAGE, "f" },
308 #ifdef USE_NNTP
309  { "forward-to-group", OP_FORWARD_TO_GROUP, NULL },
310 #endif
311  { "group-chat-reply", OP_GROUP_CHAT_REPLY, NULL },
312  { "group-reply", OP_GROUP_REPLY, "g" },
313  { "half-down", OP_HALF_DOWN, NULL },
314  { "half-up", OP_HALF_UP, NULL },
315  { "help", OP_HELP, "?" },
316 #ifdef USE_IMAP
317  { "imap-fetch-mail", OP_MAIN_IMAP_FETCH, NULL },
318  { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL, NULL },
319 #endif
320  { "jump", OP_JUMP, NULL },
321  { "link-threads", OP_MAIN_LINK_THREADS, "&" },
322  { "list-reply", OP_LIST_REPLY, "L" },
323  { "mail", OP_MAIL, "m" },
324  { "mail-key", OP_MAIL_KEY, "\033k" }, // <Alt-k>
325  { "mailbox-list", OP_MAILBOX_LIST, "." },
326  { "mark-as-new", OP_TOGGLE_NEW, "N" },
327  { "modify-labels", OP_MAIN_MODIFY_TAGS, NULL }, // NOTE(sileht): kept for backward compatibility
328  { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL }, // NOTE(sileht): kept for backward compatibility
329  { "modify-tags", OP_MAIN_MODIFY_TAGS, NULL },
330  { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE, NULL },
331  { "next-entry", OP_NEXT_ENTRY, "J" },
332  { "next-line", OP_NEXT_LINE, "\n" }, // <Enter>
333  { "next-line", OP_NEXT_LINE, "\r" }, // <Return>
334  { "next-new", OP_MAIN_NEXT_NEW, NULL },
335  { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD, "\t" }, // <Tab>
336  { "next-page", OP_NEXT_PAGE, " " },
337  { "next-subthread", OP_MAIN_NEXT_SUBTHREAD, "\033n" }, // <Alt-n>
338  { "next-thread", OP_MAIN_NEXT_THREAD, "\016" }, // <Ctrl-N>
339  { "next-undeleted", OP_MAIN_NEXT_UNDELETED, "j" },
340  { "next-unread", OP_MAIN_NEXT_UNREAD, NULL },
341  { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX, NULL },
342  { "parent-message", OP_MAIN_PARENT_MESSAGE, "P" },
343  { "pipe-message", OP_PIPE, "|" },
344 #ifdef USE_NNTP
345  { "post-message", OP_POST, NULL },
346 #endif
347  { "previous-entry", OP_PREV_ENTRY, "K" },
348  { "previous-line", OP_PREV_LINE, NULL },
349  { "previous-new", OP_MAIN_PREV_NEW, NULL },
350  { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD, NULL },
351  { "previous-page", OP_PREV_PAGE, "-" },
352  { "previous-subthread", OP_MAIN_PREV_SUBTHREAD, "\033p" }, // <Alt-p>
353  { "previous-thread", OP_MAIN_PREV_THREAD, "\020" }, // <Ctrl-P>
354  { "previous-undeleted", OP_MAIN_PREV_UNDELETED, "k" },
355  { "previous-unread", OP_MAIN_PREV_UNREAD, NULL },
356  { "print-message", OP_PRINT, "p" },
357  { "purge-message", OP_PURGE_MESSAGE, NULL },
358  { "purge-thread", OP_PURGE_THREAD, NULL },
359  { "quasi-delete", OP_MAIN_QUASI_DELETE, NULL },
360  { "quit", OP_QUIT, "Q" },
361  { "read-subthread", OP_MAIN_READ_SUBTHREAD, "\033r" }, // <Alt-r>
362  { "read-thread", OP_MAIN_READ_THREAD, "\022" }, // <Ctrl-R>
363  { "recall-message", OP_RECALL_MESSAGE, "R" },
364 #ifdef USE_NNTP
365  { "reconstruct-thread", OP_RECONSTRUCT_THREAD, NULL },
366 #endif
367  { "redraw-screen", OP_REDRAW, "\014" }, // <Ctrl-L>
368  { "reply", OP_REPLY, "r" },
369  { "resend-message", OP_RESEND, "\033e" }, // <Alt-e>
370  { "root-message", OP_MAIN_ROOT_MESSAGE, NULL },
371  { "save-message", OP_SAVE, "s" },
372  { "search", OP_SEARCH, "/" },
373  { "search-next", OP_SEARCH_NEXT, "n" },
374  { "search-opposite", OP_SEARCH_OPPOSITE, NULL },
375  { "search-reverse", OP_SEARCH_REVERSE, "\033/" }, // <Alt-/>
376  { "search-toggle", OP_SEARCH_TOGGLE, "\\" }, // <Backslash>
377  { "set-flag", OP_MAIN_SET_FLAG, "w" },
378  { "shell-escape", OP_SHELL_ESCAPE, "!" },
379  { "show-version", OP_VERSION, "V" },
380 #ifdef USE_SIDEBAR
381  { "sidebar-first", OP_SIDEBAR_FIRST, NULL },
382  { "sidebar-last", OP_SIDEBAR_LAST, NULL },
383  { "sidebar-next", OP_SIDEBAR_NEXT, NULL },
384  { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW, NULL },
385  { "sidebar-open", OP_SIDEBAR_OPEN, NULL },
386  { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN, NULL },
387  { "sidebar-page-up", OP_SIDEBAR_PAGE_UP, NULL },
388  { "sidebar-prev", OP_SIDEBAR_PREV, NULL },
389  { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW, NULL },
390  { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL, NULL },
391  { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE, NULL },
392 #endif
393  { "skip-headers", OP_PAGER_SKIP_HEADERS, "H" },
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" }, // <Return>
448  { "view-mailcap", OP_ATTACH_VIEW_MAILCAP, "m" },
449  { "view-pager", OP_ATTACH_VIEW_PAGER, NULL },
450  { "view-text", OP_ATTACH_VIEW_TEXT, "T" },
451  { NULL, 0, NULL },
452 };
453 
457 const struct Binding OpCompose[] = { /* map: compose */
458  { "attach-file", OP_COMPOSE_ATTACH_FILE, "a" },
459  { "attach-key", OP_COMPOSE_ATTACH_KEY, "\033k" }, // <Alt-k>
460  { "attach-message", OP_COMPOSE_ATTACH_MESSAGE, "A" },
461 #ifdef USE_NNTP
462  { "attach-news-message", OP_COMPOSE_ATTACH_NEWS_MESSAGE, NULL },
463 #endif
464 #ifdef USE_AUTOCRYPT
465  { "autocrypt-menu", OP_COMPOSE_AUTOCRYPT_MENU, "o" },
466 #endif
467  { "copy-file", OP_SAVE, "C" },
468  { "detach-file", OP_DELETE, "D" },
469  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
470  { "edit-bcc", OP_COMPOSE_EDIT_BCC, "b" },
471  { "edit-cc", OP_COMPOSE_EDIT_CC, "c" },
472  { "edit-description", OP_COMPOSE_EDIT_DESCRIPTION, "d" },
473  { "edit-encoding", OP_COMPOSE_EDIT_ENCODING, "\005" }, // <Ctrl-E>
474  { "edit-fcc", OP_COMPOSE_EDIT_FCC, "f" },
475  { "edit-file", OP_COMPOSE_EDIT_FILE, "\030e" }, // <Alt-e>
476 #ifdef USE_NNTP
477  { "edit-followup-to", OP_COMPOSE_EDIT_FOLLOWUP_TO, NULL },
478 #endif
479  { "edit-from", OP_COMPOSE_EDIT_FROM, "\033f" }, // <Alt-f>
480  { "edit-headers", OP_COMPOSE_EDIT_HEADERS, "E" },
481  { "edit-language", OP_COMPOSE_EDIT_LANGUAGE, "\014" }, // <Ctrl-L>
482  { "edit-message", OP_COMPOSE_EDIT_MESSAGE, "e" },
483  { "edit-mime", OP_COMPOSE_EDIT_MIME, "m" },
484 #ifdef USE_NNTP
485  { "edit-newsgroups", OP_COMPOSE_EDIT_NEWSGROUPS, NULL },
486 #endif
487  { "edit-reply-to", OP_COMPOSE_EDIT_REPLY_TO, "r" },
488  { "edit-subject", OP_COMPOSE_EDIT_SUBJECT, "s" },
489  { "edit-to", OP_COMPOSE_EDIT_TO, "t" },
490  { "edit-type", OP_EDIT_TYPE, "\024" }, // <Ctrl-T>
491 #ifdef USE_NNTP
492  { "edit-x-comment-to", OP_COMPOSE_EDIT_X_COMMENT_TO, NULL },
493 #endif
494  { "filter-entry", OP_FILTER, "F" },
495  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
496  { "get-attachment", OP_COMPOSE_GET_ATTACHMENT, "G" },
497  { "group-alternatives", OP_COMPOSE_GROUP_ALTS, "&" },
498  { "group-multilingual", OP_COMPOSE_GROUP_LINGUAL, "^" },
499  { "ispell", OP_COMPOSE_ISPELL, "i" },
500 #ifdef MIXMASTER
501  { "mix", OP_COMPOSE_MIX, "M" },
502 #endif
503  { "move-down", OP_COMPOSE_MOVE_DOWN, "+" },
504  { "move-up", OP_COMPOSE_MOVE_UP, "-" },
505  { "new-mime", OP_COMPOSE_NEW_MIME, "n" },
506  { "pgp-menu", OP_COMPOSE_PGP_MENU, "p" },
507  { "pipe-entry", OP_PIPE, "|" },
508  { "postpone-message", OP_COMPOSE_POSTPONE_MESSAGE, "P" },
509  { "print-entry", OP_PRINT, "l" },
510  { "rename-attachment", OP_COMPOSE_RENAME_ATTACHMENT, "\017" }, // <Ctrl-O>
511  { "rename-file", OP_COMPOSE_RENAME_FILE, "R" },
512  { "send-message", OP_COMPOSE_SEND_MESSAGE, "y" },
513  { "smime-menu", OP_COMPOSE_SMIME_MENU, "S" },
514  { "toggle-disposition", OP_COMPOSE_TOGGLE_DISPOSITION, "\004" }, // <Ctrl-D>
515  { "toggle-recode", OP_COMPOSE_TOGGLE_RECODE, NULL },
516  { "toggle-unlink", OP_COMPOSE_TOGGLE_UNLINK, "u" },
517  { "update-encoding", OP_COMPOSE_UPDATE_ENCODING, "U" },
518  { "view-attach", OP_VIEW_ATTACH, "\n" }, // <Enter>
519  { "view-attach", OP_VIEW_ATTACH, "\r" }, // <Return>
520  { "write-fcc", OP_COMPOSE_WRITE_MESSAGE, "w" },
521  { NULL, 0, NULL },
522 };
523 
527 const struct Binding OpPost[] = { /* map: postpone */
528  { "delete-entry", OP_DELETE, "d" },
529  { "undelete-entry", OP_UNDELETE, "u" },
530  { NULL, 0, NULL },
531 };
532 
536 const struct Binding OpAlias[] = { /* map: alias */
537  { "delete-entry", OP_DELETE, "d" },
538  { "limit", OP_MAIN_LIMIT, "l" },
539  { "sort-alias", OP_SORT, "o" },
540  { "sort-alias-reverse", OP_SORT_REVERSE, "O" },
541  { "undelete-entry", OP_UNDELETE, "u" },
542  { NULL, 0, NULL },
543 };
544 
548 const struct Binding OpBrowser[] = { /* map: browser */
549 #ifdef USE_NNTP
550  { "catchup", OP_CATCHUP, NULL },
551 #endif
552  { "change-dir", OP_CHANGE_DIRECTORY, "c" },
553  { "check-new", OP_CHECK_NEW, NULL },
554 #ifdef USE_IMAP
555  { "create-mailbox", OP_CREATE_MAILBOX, "C" },
556  { "delete-mailbox", OP_DELETE_MAILBOX, "d" },
557 #endif
558  { "descend-directory", OP_DESCEND_DIRECTORY, NULL },
559  { "display-filename", OP_BROWSER_TELL, "@" },
560  { "enter-mask", OP_ENTER_MASK, "m" },
561  { "goto-folder", OP_BROWSER_GOTO_FOLDER, "=" },
562  { "goto-parent", OP_GOTO_PARENT, "p" },
563  { "mailbox-list", OP_MAILBOX_LIST, "." },
564 #ifdef USE_NNTP
565  { "reload-active", OP_LOAD_ACTIVE, NULL },
566 #endif
567 #ifdef USE_IMAP
568  { "rename-mailbox", OP_RENAME_MAILBOX, "r" },
569 #endif
570  { "select-new", OP_BROWSER_NEW_FILE, "N" },
571  { "sort", OP_SORT, "o" },
572  { "sort-reverse", OP_SORT_REVERSE, "O" },
573 #if defined(USE_IMAP) || defined(USE_NNTP)
574  { "subscribe", OP_BROWSER_SUBSCRIBE, "s" },
575 #endif
576 #ifdef USE_NNTP
577  { "subscribe-pattern", OP_SUBSCRIBE_PATTERN, NULL },
578 #endif
579  { "toggle-mailboxes", OP_TOGGLE_MAILBOXES, "\t" }, // <Tab>
580 #ifdef USE_IMAP
581  { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB, "T" },
582 #endif
583 #ifdef USE_NNTP
584  { "uncatchup", OP_UNCATCHUP, NULL },
585 #endif
586 #if defined(USE_IMAP) || defined(USE_NNTP)
587  { "unsubscribe", OP_BROWSER_UNSUBSCRIBE, "u" },
588 #endif
589 #ifdef USE_NNTP
590  { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN, NULL },
591 #endif
592  { "view-file", OP_BROWSER_VIEW_FILE, " " },
593  /* This is deprecated. Leave it last so it doesn't show up in the help. */
594  { "buffy-list", OP_MAILBOX_LIST, NULL },
595  { NULL, 0, NULL },
596 };
597 
601 const struct Binding OpQuery[] = { /* map: query */
602  { "create-alias", OP_CREATE_ALIAS, "a" },
603  { "limit", OP_MAIN_LIMIT, "l" },
604  { "mail", OP_MAIL, "m" },
605  { "query", OP_QUERY, "Q" },
606  { "query-append", OP_QUERY_APPEND, "A" },
607  { "sort", OP_SORT, "o" },
608  { "sort-reverse", OP_SORT_REVERSE, "O" },
609  { NULL, 0, NULL },
610 };
611 
615 const struct Binding OpEditor[] = { /* map: editor */
616  { "backspace", OP_EDITOR_BACKSPACE, "\010" }, // <Ctrl-H>
617  { "backward-char", OP_EDITOR_BACKWARD_CHAR, "\002" }, // <Ctrl-B>
618  { "backward-word", OP_EDITOR_BACKWARD_WORD, "\033b" }, // <Alt-b>
619  { "bol", OP_EDITOR_BOL, "\001" }, // <Ctrl-A>
620  { "capitalize-word", OP_EDITOR_CAPITALIZE_WORD, "\033c" }, // <Alt-c>
621  { "complete", OP_EDITOR_COMPLETE, "\t" }, // <Tab>
622  { "complete-query", OP_EDITOR_COMPLETE_QUERY, "\024" }, // <Ctrl-T>
623  { "delete-char", OP_EDITOR_DELETE_CHAR, "\004" }, // <Ctrl-D>
624  { "downcase-word", OP_EDITOR_DOWNCASE_WORD, "\033l" }, // <Alt-l>
625  { "eol", OP_EDITOR_EOL, "\005" }, // <Ctrl-E>
626  { "forward-char", OP_EDITOR_FORWARD_CHAR, "\006" }, // <Ctrl-F>
627  { "forward-word", OP_EDITOR_FORWARD_WORD, "\033f" }, // <Alt-f>
628  { "history-down", OP_EDITOR_HISTORY_DOWN, "\016" }, // <Ctrl-N>
629  { "history-search", OP_EDITOR_HISTORY_SEARCH, "\022" }, // <Ctrl-R>
630  { "history-up", OP_EDITOR_HISTORY_UP, "\020" }, // <Ctrl-P>
631  { "kill-eol", OP_EDITOR_KILL_EOL, "\013" }, // <Ctrl-K>
632  { "kill-eow", OP_EDITOR_KILL_EOW, "\033d" }, // <Alt-d>
633  { "kill-line", OP_EDITOR_KILL_LINE, "\025" }, // <Ctrl-U>
634  { "kill-word", OP_EDITOR_KILL_WORD, "\027" }, // <Ctrl-W>
635  { "mailbox-cycle", OP_EDITOR_MAILBOX_CYCLE, " " },
636  { "quote-char", OP_EDITOR_QUOTE_CHAR, "\026" }, // <Ctrl-V>
637  { "transpose-chars", OP_EDITOR_TRANSPOSE_CHARS, NULL },
638  { "upcase-word", OP_EDITOR_UPCASE_WORD, "\033u" }, // <Alt-u>
639  /* This is deprecated. Leave it last so it doesn't show up in the help. */
640  { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, NULL },
641  { NULL, 0, NULL },
642 };
643 
647 const struct Binding OpPgp[] = { /* map: pgp */
648  { "verify-key", OP_VERIFY_KEY, "c" },
649  { "view-name", OP_VIEW_ID, "%" },
650  { NULL, 0, NULL },
651 };
652 
656 const struct Binding OpSmime[] = { /* map: smime */
657 #ifdef CRYPT_BACKEND_GPGME
658  { "verify-key", OP_VERIFY_KEY, "c" },
659  { "view-name", OP_VIEW_ID, "%" },
660 #endif
661  { NULL, 0, NULL },
662 };
663 
664 #ifdef MIXMASTER
665 
668 const struct Binding OpMix[] = { /* map: mixmaster */
669  { "accept", OP_MIX_USE, "\n" }, // <Enter>
670  { "accept", OP_MIX_USE, "\r" }, // <Return>
671  { "append", OP_MIX_APPEND, "a" },
672  { "chain-next", OP_MIX_CHAIN_NEXT, "<right>" },
673  { "chain-prev", OP_MIX_CHAIN_PREV, "<left>" },
674  { "delete", OP_MIX_DELETE, "d" },
675  { "insert", OP_MIX_INSERT, "i" },
676  { NULL, 0, NULL },
677 };
678 #endif /* MIXMASTER */
679 
680 #ifdef USE_AUTOCRYPT
681 
684 const struct Binding OpAutocryptAcct[] = { /* map: autocrypt account */
685  { "create-account", OP_AUTOCRYPT_CREATE_ACCT, "c" },
686  { "delete-account", OP_AUTOCRYPT_DELETE_ACCT, "D" },
687  { "toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE, "a" },
688  { "toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER, "p" },
689  { NULL, 0, NULL }
690 };
691 #endif
692 
693 // clang-format on
Manage keymappings.
All user-callable functions.
Mapping between a user key and a function.
Definition: keymap.h:91