NeoMutt  2021-02-05-89-gabe350
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-headers", OP_PAGER_SKIP_HEADERS, "H" },
393  { "skip-quoted", OP_PAGER_SKIP_QUOTED, "S" },
394  { "sort-mailbox", OP_SORT, "o" },
395  { "sort-reverse", OP_SORT_REVERSE, "O" },
396  { "sync-mailbox", OP_MAIN_SYNC_FOLDER, "$" },
397  { "tag-message", OP_TAG, "t" },
398  { "toggle-quoted", OP_PAGER_HIDE_QUOTED, "T" },
399  { "toggle-write", OP_TOGGLE_WRITE, "%" },
400  { "top", OP_PAGER_TOP, "^" },
401  { "undelete-message", OP_UNDELETE, "u" },
402  { "undelete-subthread", OP_UNDELETE_SUBTHREAD, "\033u" }, // <Alt-u>
403  { "undelete-thread", OP_UNDELETE_THREAD, "\025" }, // <Ctrl-U>
404 #ifdef USE_NOTMUCH
405  { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY, NULL },
406  { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY, NULL },
407 #endif
408  { "view-attachments", OP_VIEW_ATTACHMENTS, "v" },
409  { "view-raw-message", OP_VIEW_RAW_MESSAGE, NULL },
410  { "what-key", OP_WHAT_KEY, NULL },
411  /* This is deprecated. Leave it last so it doesn't show up in the help. */
412  { "buffy-list", OP_MAILBOX_LIST, NULL },
413  { NULL, 0, NULL },
414 };
415 
419 const struct Binding OpAttach[] = { /* map: attachment */
420  { "bounce-message", OP_BOUNCE_MESSAGE, "b" },
421  { "check-traditional-pgp", OP_CHECK_TRADITIONAL, "\033P" }, // <Alt-P>
422  { "collapse-parts", OP_ATTACH_COLLAPSE, "v" },
423  { "compose-to-sender", OP_COMPOSE_TO_SENDER, NULL },
424  { "delete-entry", OP_DELETE, "d" },
425  { "display-toggle-weed", OP_DISPLAY_HEADERS, "h" },
426  { "edit-type", OP_EDIT_TYPE, "\005" }, // <Ctrl-E>
427  { "extract-keys", OP_EXTRACT_KEYS, "\013" }, // <Ctrl-K>
428 #ifdef USE_NNTP
429  { "followup-message", OP_FOLLOWUP, NULL },
430 #endif
431  { "forget-passphrase", OP_FORGET_PASSPHRASE, "\006" }, // <Ctrl-F>
432  { "forward-message", OP_FORWARD_MESSAGE, "f" },
433 #ifdef USE_NNTP
434  { "forward-to-group", OP_FORWARD_TO_GROUP, NULL },
435 #endif
436  { "group-chat-reply", OP_GROUP_CHAT_REPLY, NULL },
437  { "group-reply", OP_GROUP_REPLY, "g" },
438  { "list-reply", OP_LIST_REPLY, "L" },
439  { "pipe-entry", OP_PIPE, "|" },
440  { "print-entry", OP_PRINT, "p" },
441  { "reply", OP_REPLY, "r" },
442  { "resend-message", OP_RESEND, "\033e" }, // <Alt-e>
443  { "save-entry", OP_SAVE, "s" },
444  { "undelete-entry", OP_UNDELETE, "u" },
445  { "view-attach", OP_VIEW_ATTACH, "\n" }, // <Enter>
446  { "view-attach", OP_VIEW_ATTACH, "\r" }, // <Return>
447  { "view-mailcap", OP_ATTACH_VIEW_MAILCAP, "m" },
448  { "view-pager", OP_ATTACH_VIEW_PAGER, NULL },
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" }, // <Return>
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  { "limit", OP_MAIN_LIMIT, "l" },
538  { "sort-alias", OP_SORT, "o" },
539  { "sort-alias-reverse", OP_SORT_REVERSE, "O" },
540  { "undelete-entry", OP_UNDELETE, "u" },
541  { NULL, 0, NULL },
542 };
543 
547 const struct Binding OpBrowser[] = { /* map: browser */
548 #ifdef USE_NNTP
549  { "catchup", OP_CATCHUP, NULL },
550 #endif
551  { "change-dir", OP_CHANGE_DIRECTORY, "c" },
552  { "check-new", OP_CHECK_NEW, NULL },
553 #ifdef USE_IMAP
554  { "create-mailbox", OP_CREATE_MAILBOX, "C" },
555  { "delete-mailbox", OP_DELETE_MAILBOX, "d" },
556 #endif
557  { "descend-directory", OP_DESCEND_DIRECTORY, NULL },
558  { "display-filename", OP_BROWSER_TELL, "@" },
559  { "enter-mask", OP_ENTER_MASK, "m" },
560  { "goto-folder", OP_BROWSER_GOTO_FOLDER, "=" },
561  { "goto-parent", OP_GOTO_PARENT, "p" },
562  { "mailbox-list", OP_MAILBOX_LIST, "." },
563 #ifdef USE_NNTP
564  { "reload-active", OP_LOAD_ACTIVE, NULL },
565 #endif
566 #ifdef USE_IMAP
567  { "rename-mailbox", OP_RENAME_MAILBOX, "r" },
568 #endif
569  { "select-new", OP_BROWSER_NEW_FILE, "N" },
570  { "sort", OP_SORT, "o" },
571  { "sort-reverse", OP_SORT_REVERSE, "O" },
572 #if defined(USE_IMAP) || defined(USE_NNTP)
573  { "subscribe", OP_BROWSER_SUBSCRIBE, "s" },
574 #endif
575 #ifdef USE_NNTP
576  { "subscribe-pattern", OP_SUBSCRIBE_PATTERN, NULL },
577 #endif
578  { "toggle-mailboxes", OP_TOGGLE_MAILBOXES, "\t" }, // <Tab>
579 #ifdef USE_IMAP
580  { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB, "T" },
581 #endif
582 #ifdef USE_NNTP
583  { "uncatchup", OP_UNCATCHUP, NULL },
584 #endif
585 #if defined(USE_IMAP) || defined(USE_NNTP)
586  { "unsubscribe", OP_BROWSER_UNSUBSCRIBE, "u" },
587 #endif
588 #ifdef USE_NNTP
589  { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN, NULL },
590 #endif
591  { "view-file", OP_BROWSER_VIEW_FILE, " " },
592  /* This is deprecated. Leave it last so it doesn't show up in the help. */
593  { "buffy-list", OP_MAILBOX_LIST, NULL },
594  { NULL, 0, NULL },
595 };
596 
600 const struct Binding OpQuery[] = { /* map: query */
601  { "create-alias", OP_CREATE_ALIAS, "a" },
602  { "limit", OP_MAIN_LIMIT, "l" },
603  { "mail", OP_MAIL, "m" },
604  { "query", OP_QUERY, "Q" },
605  { "query-append", OP_QUERY_APPEND, "A" },
606  { "sort", OP_SORT, "o" },
607  { "sort-reverse", OP_SORT_REVERSE, "O" },
608  { NULL, 0, NULL },
609 };
610 
614 const struct Binding OpEditor[] = { /* map: editor */
615  { "backspace", OP_EDITOR_BACKSPACE, "\010" }, // <Ctrl-H>
616  { "backward-char", OP_EDITOR_BACKWARD_CHAR, "\002" }, // <Ctrl-B>
617  { "backward-word", OP_EDITOR_BACKWARD_WORD, "\033b" }, // <Alt-b>
618  { "bol", OP_EDITOR_BOL, "\001" }, // <Ctrl-A>
619  { "capitalize-word", OP_EDITOR_CAPITALIZE_WORD, "\033c" }, // <Alt-c>
620  { "complete", OP_EDITOR_COMPLETE, "\t" }, // <Tab>
621  { "complete-query", OP_EDITOR_COMPLETE_QUERY, "\024" }, // <Ctrl-T>
622  { "delete-char", OP_EDITOR_DELETE_CHAR, "\004" }, // <Ctrl-D>
623  { "downcase-word", OP_EDITOR_DOWNCASE_WORD, "\033l" }, // <Alt-l>
624  { "eol", OP_EDITOR_EOL, "\005" }, // <Ctrl-E>
625  { "forward-char", OP_EDITOR_FORWARD_CHAR, "\006" }, // <Ctrl-F>
626  { "forward-word", OP_EDITOR_FORWARD_WORD, "\033f" }, // <Alt-f>
627  { "history-down", OP_EDITOR_HISTORY_DOWN, "\016" }, // <Ctrl-N>
628  { "history-search", OP_EDITOR_HISTORY_SEARCH, "\022" }, // <Ctrl-R>
629  { "history-up", OP_EDITOR_HISTORY_UP, "\020" }, // <Ctrl-P>
630  { "kill-eol", OP_EDITOR_KILL_EOL, "\013" }, // <Ctrl-K>
631  { "kill-eow", OP_EDITOR_KILL_EOW, "\033d" }, // <Alt-d>
632  { "kill-line", OP_EDITOR_KILL_LINE, "\025" }, // <Ctrl-U>
633  { "kill-word", OP_EDITOR_KILL_WORD, "\027" }, // <Ctrl-W>
634  { "mailbox-cycle", OP_EDITOR_MAILBOX_CYCLE, " " },
635  { "quote-char", OP_EDITOR_QUOTE_CHAR, "\026" }, // <Ctrl-V>
636  { "transpose-chars", OP_EDITOR_TRANSPOSE_CHARS, NULL },
637  { "upcase-word", OP_EDITOR_UPCASE_WORD, "\033u" }, // <Alt-u>
638  /* This is deprecated. Leave it last so it doesn't show up in the help. */
639  { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, NULL },
640  { NULL, 0, NULL },
641 };
642 
646 const struct Binding OpPgp[] = { /* map: pgp */
647  { "verify-key", OP_VERIFY_KEY, "c" },
648  { "view-name", OP_VIEW_ID, "%" },
649  { NULL, 0, NULL },
650 };
651 
655 const struct Binding OpSmime[] = { /* map: smime */
656 #ifdef CRYPT_BACKEND_GPGME
657  { "verify-key", OP_VERIFY_KEY, "c" },
658  { "view-name", OP_VIEW_ID, "%" },
659 #endif
660  { NULL, 0, NULL },
661 };
662 
663 #ifdef MIXMASTER
664 
667 const struct Binding OpMix[] = { /* map: mixmaster */
668  { "accept", OP_MIX_USE, "\n" }, // <Enter>
669  { "accept", OP_MIX_USE, "\r" }, // <Return>
670  { "append", OP_MIX_APPEND, "a" },
671  { "chain-next", OP_MIX_CHAIN_NEXT, "<right>" },
672  { "chain-prev", OP_MIX_CHAIN_PREV, "<left>" },
673  { "delete", OP_MIX_DELETE, "d" },
674  { "insert", OP_MIX_INSERT, "i" },
675  { NULL, 0, NULL },
676 };
677 #endif /* MIXMASTER */
678 
679 #ifdef USE_AUTOCRYPT
680 
683 const struct Binding OpAutocryptAcct[] = { /* map: autocrypt account */
684  { "create-account", OP_AUTOCRYPT_CREATE_ACCT, "c" },
685  { "delete-account", OP_AUTOCRYPT_DELETE_ACCT, "D" },
686  { "toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE, "a" },
687  { "toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER, "p" },
688  { NULL, 0, NULL }
689 };
690 #endif
691 
692 // clang-format on
OpCompose
const struct Binding OpCompose[]
Key bindings for the compose menu.
Definition: functions.c:456
OpSmime
const struct Binding OpSmime[]
Key bindings for the smime menu.
Definition: functions.c:655
OpAlias
const struct Binding OpAlias[]
Key bindings for the alias menu.
Definition: functions.c:535
Binding
Mapping between a user key and a function.
Definition: keymap.h:120
OpPost
const struct Binding OpPost[]
Key bindings for the postpone menu.
Definition: functions.c:526
OpQuery
const struct Binding OpQuery[]
Key bindings for the external query menu.
Definition: functions.c:600
OpAttach
const struct Binding OpAttach[]
Key bindings for the attachment menu.
Definition: functions.c:419
OpEditor
const struct Binding OpEditor[]
Key bindings for the editor menu.
Definition: functions.c:614
OpPager
const struct Binding OpPager[]
Key bindings for the pager menu.
Definition: functions.c:262
OpMain
const struct Binding OpMain[]
Key bindings for the index menu.
Definition: functions.c:102
OpBrowser
const struct Binding OpBrowser[]
Key bindings for the file browser menu.
Definition: functions.c:547
keymap.h
OpPgp
const struct Binding OpPgp[]
Key bindings for the pgp menu.
Definition: functions.c:646
OpAutocryptAcct
const struct Binding OpAutocryptAcct[]
Key bindings for the autocrypt account.
Definition: functions.c:683
opcodes.h
OpMix
const struct Binding OpMix[]
Key bindings for the mixmaster menu.
Definition: functions.c:667
OpGeneric
const struct Binding OpGeneric[]
Key bindings for the generic menu.
Definition: functions.c:53