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