NeoMutt  2025-09-05-55-g97fc89
Teaching an old dog new tricks
DOXYGEN
Loading...
Searching...
No Matches
lib.c File Reference

Key helper functions. More...

#include "config.h"
#include <ctype.h>
#include <limits.h>
#include <stdbool.h>
#include <stdlib.h>
#include <string.h>
#include "mutt/lib.h"
#include "gui/lib.h"
#include "lib.h"
#include "menu/lib.h"
+ Include dependency graph for lib.c:

Go to the source code of this file.

Functions

void mutt_keymap_free (struct Keymap **ptr)
 Free a Keymap.
 
struct Keymapalloc_keys (size_t len, keycode_t *keys)
 Allocate space for a sequence of keys.
 
int parse_fkey (char *s)
 Parse a function key string.
 
static int parse_keycode (const char *s)
 Parse a numeric keycode.
 
size_t parsekeys (const char *str, keycode_t *d, size_t max)
 Parse a key string into key codes.
 
struct Keymapkm_compare_keys (struct Keymap *k1, struct Keymap *k2, size_t *pos)
 Compare two keymaps' keyscodes and return the bigger one.
 
int get_op (const struct MenuFuncOp *funcs, const char *start, size_t len)
 Get the function by its name.
 
const char * mutt_get_func (const struct MenuFuncOp *funcs, int op)
 Get the name of a function.
 
bool is_bound (const struct KeymapList *km_list, int op)
 Does a function have a keybinding?
 
int gather_unbound (const struct MenuFuncOp *funcs, const struct KeymapList *km_menu, const struct KeymapList *km_aux, struct BindingInfoArray *bia_unbound)
 Gather info about unbound functions for one menu.
 
void km_keyname (int c, struct Buffer *buf)
 Get the human name for a key.
 
bool km_expand_key (struct Keymap *map, struct Buffer *buf)
 Get the key string bound to a Keymap.
 
void km_expand_key_string (char *str, struct Buffer *buf)
 Get a human-readable key string.
 
struct Keymapkm_find_func (enum MenuType mtype, int func)
 Find a function's mapping in a Menu.
 
const struct MenuFuncOpkm_get_table (enum MenuType mtype)
 Lookup a Menu's functions.
 

Variables

const struct MenuFuncOp OpAlias []
 Functions for the Alias Menu.
 
const struct MenuFuncOp OpAttachment []
 Functions for the Attachment Menu.
 
const struct MenuFuncOp OpAutocrypt []
 Functions for the Autocrypt Account.
 
const struct MenuFuncOp OpBrowser []
 Functions for the file Browser Menu.
 
const struct MenuFuncOp OpCompose []
 Functions for the Compose Menu.
 
const struct MenuFuncOp OpEditor []
 Functions for the Editor Menu.
 
const struct MenuFuncOp OpIndex []
 Functions for the Index Menu.
 
const struct MenuFuncOp OpPager []
 Functions for the Pager Menu.
 
const struct MenuFuncOp OpPgp []
 Functions for the Pgp Menu.
 
const struct MenuFuncOp OpPostponed []
 Functions for the Postpone Menu.
 
const struct MenuFuncOp OpQuery []
 Functions for the external Query Menu.
 
const struct MenuFuncOp OpSmime []
 Functions for the Smime Menu.
 
struct Mapping KeyNames []
 Key name lookup table.
 
keycode_t AbortKey
 code of key to abort prompts, normally Ctrl-G
 
struct KeymapList Keymaps [MENU_MAX]
 Array of key mappings, one for each MenuType.
 

Detailed Description

Key helper functions.

Authors
  • Richard Russon

This program is distributed in the hope that it will be useful, but WITHOUT ANY WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the GNU General Public License for more details.

You should have received a copy of the GNU General Public License along with this program. If not, see http://www.gnu.org/licenses/.

Definition in file lib.c.

Function Documentation

◆ mutt_keymap_free()

void mutt_keymap_free ( struct Keymap ** ptr)

Free a Keymap.

Parameters
ptrKeymap to free

Definition at line 131 of file lib.c.

132{
133 if (!ptr || !*ptr)
134 return;
135
136 struct Keymap *km = *ptr;
137 FREE(&km->macro);
138 FREE(&km->desc);
139 FREE(&km->keys);
140
141 FREE(ptr);
142}
#define FREE(x)
Definition memory.h:62
A keyboard mapping.
Definition lib.h:67
keycode_t * keys
Key sequence.
Definition lib.h:73
char * macro
Macro expansion (op == OP_MACRO)
Definition lib.h:68
char * desc
Description of a macro for the help menu.
Definition lib.h:69
+ Here is the caller graph for this function:

◆ alloc_keys()

struct Keymap * alloc_keys ( size_t len,
keycode_t * keys )

Allocate space for a sequence of keys.

Parameters
lenNumber of keys
keysArray of keys
Return values
ptrSequence of keys

Definition at line 150 of file lib.c.

151{
152 struct Keymap *p = MUTT_MEM_CALLOC(1, struct Keymap);
153 p->len = len;
155 memcpy(p->keys, keys, len * sizeof(keycode_t));
156 return p;
157}
short keycode_t
Type for key storage, the rest of neomutt works fine with int type.
Definition lib.h:57
#define MUTT_MEM_CALLOC(n, type)
Definition memory.h:47
short len
Length of key sequence (unit: sizeof (keycode_t))
Definition lib.h:72
+ Here is the caller graph for this function:

◆ parse_fkey()

int parse_fkey ( char * s)

Parse a function key string.

Parameters
sString to parse
Return values
numNumber of the key

Given "<f8>", it will return 8.

Definition at line 166 of file lib.c.

167{
168 char *t = NULL;
169 int n = 0;
170
171 if ((s[0] != '<') || (mutt_tolower(s[1]) != 'f'))
172 return -1;
173
174 for (t = s + 2; *t && mutt_isdigit(*t); t++)
175 {
176 n *= 10;
177 n += *t - '0';
178 }
179
180 if (*t != '>')
181 return -1;
182 return n;
183}
int mutt_tolower(int arg)
Wrapper for tolower(3)
Definition ctype.c:125
bool mutt_isdigit(int arg)
Wrapper for isdigit(3)
Definition ctype.c:65
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parse_keycode()

static int parse_keycode ( const char * s)
static

Parse a numeric keycode.

Parameters
sString to parse
Return values
numNumber of the key

This function parses the string <NNN> and uses the octal value as the key to bind.

Definition at line 193 of file lib.c.

194{
195 char *end_char = NULL;
196 long int result = strtol(s + 1, &end_char, 8);
197 /* allow trailing whitespace, eg. < 1001 > */
198 while (mutt_isspace(*end_char))
199 end_char++;
200 /* negative keycodes don't make sense, also detect overflow */
201 if ((*end_char != '>') || (result < 0) || (result == LONG_MAX))
202 {
203 return -1;
204 }
205
206 return result;
207}
bool mutt_isspace(int arg)
Wrapper for isspace(3)
Definition ctype.c:95
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ parsekeys()

size_t parsekeys ( const char * str,
keycode_t * d,
size_t max )

Parse a key string into key codes.

Parameters
strKey string
dArray for key codes
maxMaximum length of key sequence
Return values
numLength of key sequence

Definition at line 216 of file lib.c.

217{
218 int n;
219 size_t len = max;
220 char buf[128] = { 0 };
221 char c;
222 char *t = NULL;
223
224 mutt_str_copy(buf, str, sizeof(buf));
225 char *s = buf;
226
227 while (*s && len)
228 {
229 *d = '\0';
230 if ((*s == '<') && (t = strchr(s, '>')))
231 {
232 t++;
233 c = *t;
234 *t = '\0';
235
237 if (n != -1)
238 {
239 s = t;
240 *d = n;
241 }
242 else if ((n = parse_fkey(s)) > 0)
243 {
244 s = t;
245 *d = KEY_F(n);
246 }
247 else if ((n = parse_keycode(s)) > 0)
248 {
249 s = t;
250 *d = n;
251 }
252
253 *t = c;
254 }
255
256 if (!*d)
257 {
258 *d = (unsigned char) *s;
259 s++;
260 }
261 d++;
262 len--;
263 }
264
265 return max - len;
266}
int parse_fkey(char *s)
Parse a function key string.
Definition lib.c:166
static int parse_keycode(const char *s)
Parse a numeric keycode.
Definition lib.c:193
struct Mapping KeyNames[]
Key name lookup table.
Definition lib.c:58
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
Definition mapping.c:85
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
Definition string.c:581
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ km_compare_keys()

struct Keymap * km_compare_keys ( struct Keymap * k1,
struct Keymap * k2,
size_t * pos )

Compare two keymaps' keyscodes and return the bigger one.

Parameters
k1first keymap to compare
k2second keymap to compare
posposition where the two keycodes differ
Return values
ptrKeymap with a bigger ASCII keycode

Definition at line 275 of file lib.c.

276{
277 *pos = 0;
278
279 while (*pos < k1->len && *pos < k2->len)
280 {
281 if (k1->keys[*pos] < k2->keys[*pos])
282 return k2;
283 else if (k1->keys[*pos] > k2->keys[*pos])
284 return k1;
285 else
286 *pos = *pos + 1;
287 }
288
289 return NULL;
290}
+ Here is the caller graph for this function:

◆ get_op()

int get_op ( const struct MenuFuncOp * funcs,
const char * start,
size_t len )

Get the function by its name.

Parameters
funcsFunctions table
startName of function to find
lenLength of string to match
Return values
numOperation, e.g. OP_DELETE

Definition at line 299 of file lib.c.

300{
301 for (int i = 0; funcs[i].name; i++)
302 {
303 if (mutt_istrn_equal(start, funcs[i].name, len) && (mutt_str_len(funcs[i].name) == len))
304 {
305 return funcs[i].op;
306 }
307 }
308
309 return OP_NULL;
310}
size_t mutt_str_len(const char *a)
Calculate the length of a string, safely.
Definition string.c:498
bool mutt_istrn_equal(const char *a, const char *b, size_t num)
Check for equality of two strings ignoring case (to a maximum), safely.
Definition string.c:455
const char * name
Name of the function.
Definition lib.h:116
int op
Operation, e.g. OP_DELETE.
Definition lib.h:117
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ mutt_get_func()

const char * mutt_get_func ( const struct MenuFuncOp * funcs,
int op )

Get the name of a function.

Parameters
funcsFunctions table
opOperation, e.g. OP_DELETE
Return values
ptrName of function
NULLOperation not found
Note
This returns a static string.

Definition at line 321 of file lib.c.

322{
323 if (!funcs)
324 return NULL;
325
326 for (int i = 0; funcs[i].name; i++)
327 {
328 if (funcs[i].op == op)
329 return funcs[i].name;
330 }
331
332 return NULL;
333}
+ Here is the caller graph for this function:

◆ is_bound()

bool is_bound ( const struct KeymapList * km_list,
int op )

Does a function have a keybinding?

Parameters
km_listKeymap to examine
opOperation, e.g. OP_DELETE
Return values
trueA key is bound to that operation

Definition at line 341 of file lib.c.

342{
343 if (!km_list)
344 return false;
345
346 struct Keymap *map = NULL;
347 STAILQ_FOREACH(map, km_list, entries)
348 {
349 if (map->op == op)
350 return true;
351 }
352 return false;
353}
#define STAILQ_FOREACH(var, head, field)
Definition queue.h:390
short op
Operation to perform.
Definition lib.h:70
+ Here is the caller graph for this function:

◆ gather_unbound()

int gather_unbound ( const struct MenuFuncOp * funcs,
const struct KeymapList * km_menu,
const struct KeymapList * km_aux,
struct BindingInfoArray * bia_unbound )

Gather info about unbound functions for one menu.

Parameters
funcsList of functions
km_menuKeymaps for the menu
km_auxKeymaps for generic
bia_unboundUnbound functions
Return values
numNumber of unbound functions

Definition at line 363 of file lib.c.

365{
366 if (!funcs)
367 return 0;
368
369 for (int i = 0; funcs[i].name; i++)
370 {
371 if (!funcs[i].deprecated && !is_bound(km_menu, funcs[i].op) &&
372 (!km_aux || !is_bound(km_aux, funcs[i].op)))
373 {
374 struct BindingInfo bi = { 0 };
375 bi.a[0] = NULL;
376 bi.a[1] = funcs[i].name;
377 bi.a[2] = _(opcodes_get_description(funcs[i].op));
378 ARRAY_ADD(bia_unbound, bi);
379 }
380 }
381
382 return ARRAY_SIZE(bia_unbound);
383}
#define ARRAY_ADD(head, elem)
Add an element at the end of the array.
Definition array.h:156
#define ARRAY_SIZE(head)
The number of elements stored.
Definition array.h:87
bool is_bound(const struct KeymapList *km_list, int op)
Does a function have a keybinding?
Definition lib.c:341
#define _(a)
Definition message.h:28
const char * opcodes_get_description(int op)
Get the description of an opcode.
Definition opcodes.c:68
Info about one keybinding.
Definition lib.h:95
const char * a[3]
Array of info.
Definition lib.h:96
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ km_keyname()

void km_keyname ( int c,
struct Buffer * buf )

Get the human name for a key.

Parameters
[in]cKey code
[out]bufBuffer for the result

Definition at line 390 of file lib.c.

391{
392 const char *name = mutt_map_get_name(c, KeyNames);
393 if (name)
394 {
395 buf_addstr(buf, name);
396 return;
397 }
398
399 if ((c < 256) && (c > -128) && iscntrl((unsigned char) c))
400 {
401 if (c < 0)
402 c += 256;
403
404 if (c < 128)
405 {
406 buf_addch(buf, '^');
407 buf_addch(buf, (c + '@') & 0x7f);
408 }
409 else
410 {
411 buf_add_printf(buf, "\\%d%d%d", c >> 6, (c >> 3) & 7, c & 7);
412 }
413 }
414 else if ((c >= KEY_F0) && (c < KEY_F(256))) /* this maximum is just a guess */
415 {
416 buf_add_printf(buf, "<F%d>", c - KEY_F0);
417 }
418 else if ((c < 256) && (c >= -128) && IsPrint(c))
419 {
420 buf_add_printf(buf, "%c", (unsigned char) c);
421 }
422 else
423 {
424 buf_add_printf(buf, "<%ho>", (unsigned short) c);
425 }
426}
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
Definition buffer.c:204
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
Definition buffer.c:241
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
Definition buffer.c:226
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
Definition mapping.c:42
#define IsPrint(ch)
Definition mbyte.h:40
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ km_expand_key()

bool km_expand_key ( struct Keymap * map,
struct Buffer * buf )

Get the key string bound to a Keymap.

Parameters
[in]mapKeybinding map
[out]bufBuffer for the result
Return values
trueSuccess

Definition at line 434 of file lib.c.

435{
436 if (!map || !buf)
437 return false;
438
439 for (int i = 0; i < map->len; i++)
440 {
441 km_keyname(map->keys[i], buf);
442 }
443
444 return true;
445}
void km_keyname(int c, struct Buffer *buf)
Get the human name for a key.
Definition lib.c:390
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ km_expand_key_string()

void km_expand_key_string ( char * str,
struct Buffer * buf )

Get a human-readable key string.

Parameters
[in]strRaw key string
[out]bufBuffer for the key string

Definition at line 452 of file lib.c.

453{
454 for (; *str; str++)
455 {
456 km_keyname(*str, buf);
457 }
458}
+ Here is the call graph for this function:
+ Here is the caller graph for this function:

◆ km_find_func()

struct Keymap * km_find_func ( enum MenuType mtype,
int func )

Find a function's mapping in a Menu.

Parameters
mtypeMenu type, e.g. MENU_PAGER
funcFunction, e.g. OP_DELETE
Return values
ptrKeymap for the function

Definition at line 466 of file lib.c.

467{
468 struct Keymap *np = NULL;
469 STAILQ_FOREACH(np, &Keymaps[mtype], entries)
470 {
471 if (np->op == func)
472 break;
473 }
474 return np;
475}
struct KeymapList Keymaps[MENU_MAX]
Array of key mappings, one for each MenuType.
Definition lib.c:125
+ Here is the caller graph for this function:

◆ km_get_table()

const struct MenuFuncOp * km_get_table ( enum MenuType mtype)

Lookup a Menu's functions.

Parameters
mtypeMenu type, e.g. MENU_EDITOR
Return values
ptrArray of functions

Definition at line 482 of file lib.c.

483{
484 switch (mtype)
485 {
486 case MENU_ALIAS:
487 return OpAlias;
488 case MENU_ATTACHMENT:
489 return OpAttachment;
490#ifdef USE_AUTOCRYPT
491 case MENU_AUTOCRYPT:
492 return OpAutocrypt;
493#endif
494 case MENU_BROWSER:
495 return OpBrowser;
496 case MENU_COMPOSE:
497 return OpCompose;
498 case MENU_DIALOG:
499 return OpDialog;
500 case MENU_EDITOR:
501 return OpEditor;
502 case MENU_GENERIC:
503 return OpGeneric;
504 case MENU_INDEX:
505 return OpIndex;
506 case MENU_PAGER:
507 return OpPager;
508 case MENU_PGP:
509 return OpPgp;
510 case MENU_POSTPONED:
511 return OpPostponed;
512 case MENU_QUERY:
513 return OpQuery;
514 case MENU_SMIME:
515 return OpSmime;
516 default:
517 return NULL;
518 }
519}
const struct MenuFuncOp OpQuery[]
Functions for the external Query Menu.
Definition functions.c:75
const struct MenuFuncOp OpAlias[]
Functions for the Alias Menu.
Definition functions.c:59
const struct MenuFuncOp OpAttachment[]
Functions for the Attachment Menu.
Definition functions.c:62
const struct MenuFuncOp OpAutocrypt[]
Functions for the Autocrypt Account.
Definition functions.c:54
const struct MenuFuncOp OpBrowser[]
Functions for the file Browser Menu.
Definition functions.c:72
const struct MenuFuncOp OpCompose[]
Functions for the Compose Menu.
Definition functions.c:87
const struct MenuFuncOp OpEditor[]
Functions for the Editor Menu.
Definition functions.c:53
const struct MenuFuncOp OpGeneric[]
Functions for the Generic Menu.
Definition functions.c:69
const struct MenuFuncOp OpDialog[]
Functions for Simple Dialogs.
Definition functions.c:60
const struct MenuFuncOp OpIndex[]
Functions for the Index Menu.
Definition functions.c:90
const struct MenuFuncOp OpPostponed[]
Functions for the Postpone Menu.
Definition functions.c:52
const struct MenuFuncOp OpSmime[]
Functions for the Smime Menu.
Definition functions.c:52
const struct MenuFuncOp OpPager[]
Functions for the Pager Menu.
Definition functions.c:70
const struct MenuFuncOp OpPgp[]
Functions for the Pgp Menu.
Definition functions.c:42
@ MENU_INDEX
Index panel (list of emails)
Definition type.h:46
@ MENU_DIALOG
Simple Dialog.
Definition type.h:43
@ MENU_QUERY
Select from results of external query.
Definition type.h:50
@ MENU_BROWSER
General file/mailbox browser.
Definition type.h:41
@ MENU_AUTOCRYPT
Autocrypt Account menu.
Definition type.h:39
@ MENU_COMPOSE
Compose an email.
Definition type.h:42
@ MENU_ATTACHMENT
Select an attachment.
Definition type.h:37
@ MENU_PGP
PGP encryption menu.
Definition type.h:48
@ MENU_GENERIC
Generic selection list.
Definition type.h:45
@ MENU_PAGER
Pager pager (email viewer)
Definition type.h:47
@ MENU_SMIME
SMIME encryption menu.
Definition type.h:51
@ MENU_EDITOR
Text entry area.
Definition type.h:44
@ MENU_ALIAS
Select an email address by its alias.
Definition type.h:36
@ MENU_POSTPONED
Select a postponed email.
Definition type.h:49
+ Here is the caller graph for this function:

Variable Documentation

◆ OpAlias

const struct MenuFuncOp OpAlias[]
extern

Functions for the Alias Menu.

Definition at line 59 of file functions.c.

59 { /* map: alias */
60 { "delete-entry", OP_DELETE },
61 { "exit", OP_EXIT },
62 { "limit", OP_MAIN_LIMIT },
63 { "mail", OP_MAIL },
64 { "sort-alias", OP_SORT },
65 { "sort-alias-reverse", OP_SORT_REVERSE },
66 { "tag-pattern", OP_MAIN_TAG_PATTERN },
67 { "undelete-entry", OP_UNDELETE },
68 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
69 { NULL, 0 },
70};

◆ OpAttachment

const struct MenuFuncOp OpAttachment[]
extern

Functions for the Attachment Menu.

Definition at line 62 of file functions.c.

62 { /* map: attachment */
63 { "bounce-message", OP_BOUNCE_MESSAGE },
64 { "check-traditional-pgp", OP_CHECK_TRADITIONAL },
65 { "collapse-parts", OP_ATTACHMENT_COLLAPSE },
66 { "compose-to-sender", OP_COMPOSE_TO_SENDER },
67 { "delete-entry", OP_ATTACHMENT_DELETE },
68 { "display-toggle-weed", OP_DISPLAY_HEADERS },
69 { "edit-type", OP_ATTACHMENT_EDIT_TYPE },
70 { "exit", OP_EXIT },
71 { "extract-keys", OP_EXTRACT_KEYS },
72 { "followup-message", OP_FOLLOWUP },
73 { "forget-passphrase", OP_FORGET_PASSPHRASE },
74 { "forward-message", OP_FORWARD_MESSAGE },
75 { "forward-to-group", OP_FORWARD_TO_GROUP },
76 { "group-chat-reply", OP_GROUP_CHAT_REPLY },
77 { "group-reply", OP_GROUP_REPLY },
78 { "list-reply", OP_LIST_REPLY },
79 { "list-subscribe", OP_LIST_SUBSCRIBE },
80 { "list-unsubscribe", OP_LIST_UNSUBSCRIBE },
81 { "pipe-entry", OP_PIPE },
82 { "pipe-message", OP_PIPE },
83 { "print-entry", OP_ATTACHMENT_PRINT },
84 { "reply", OP_REPLY },
85 { "resend-message", OP_RESEND },
86 { "save-entry", OP_ATTACHMENT_SAVE },
87 { "undelete-entry", OP_ATTACHMENT_UNDELETE },
88 { "view-attach", OP_ATTACHMENT_VIEW },
89 { "view-mailcap", OP_ATTACHMENT_VIEW_MAILCAP },
90 { "view-pager", OP_ATTACHMENT_VIEW_PAGER },
91 { "view-text", OP_ATTACHMENT_VIEW_TEXT },
92 { NULL, 0 },
93};

◆ OpAutocrypt

const struct MenuFuncOp OpAutocrypt[]
extern

Functions for the Autocrypt Account.

Definition at line 54 of file functions.c.

54 { /* map: autocrypt account */
55 { "create-account", OP_AUTOCRYPT_CREATE_ACCT },
56 { "delete-account", OP_AUTOCRYPT_DELETE_ACCT },
57 { "exit", OP_EXIT },
58 { "toggle-active", OP_AUTOCRYPT_TOGGLE_ACTIVE },
59 { "toggle-prefer-encrypt", OP_AUTOCRYPT_TOGGLE_PREFER },
60 { NULL, 0 }
61};

◆ OpBrowser

const struct MenuFuncOp OpBrowser[]
extern

Functions for the file Browser Menu.

Definition at line 72 of file functions.c.

72 { /* map: browser */
73 { "catchup", OP_CATCHUP },
74 { "change-dir", OP_CHANGE_DIRECTORY },
75 { "check-new", OP_CHECK_NEW },
76 { "create-mailbox", OP_CREATE_MAILBOX },
77 { "delete-mailbox", OP_DELETE_MAILBOX },
78 { "descend-directory", OP_DESCEND_DIRECTORY },
79 { "display-filename", OP_BROWSER_TELL },
80 { "enter-mask", OP_ENTER_MASK },
81 { "exit", OP_EXIT },
82 { "goto-folder", OP_BROWSER_GOTO_FOLDER },
83 { "goto-parent", OP_GOTO_PARENT },
84 { "mailbox-list", OP_MAILBOX_LIST },
85 { "reload-active", OP_LOAD_ACTIVE },
86 { "rename-mailbox", OP_RENAME_MAILBOX },
87 { "select-new", OP_BROWSER_NEW_FILE },
88 { "sort", OP_SORT },
89 { "sort-reverse", OP_SORT_REVERSE },
90 { "subscribe", OP_BROWSER_SUBSCRIBE },
91 { "subscribe-pattern", OP_SUBSCRIBE_PATTERN },
92 { "toggle-mailboxes", OP_TOGGLE_MAILBOXES },
93 { "toggle-subscribed", OP_BROWSER_TOGGLE_LSUB },
94 { "uncatchup", OP_UNCATCHUP },
95 { "unsubscribe", OP_BROWSER_UNSUBSCRIBE },
96 { "unsubscribe-pattern", OP_UNSUBSCRIBE_PATTERN },
97 { "view-file", OP_BROWSER_VIEW_FILE },
98 // Deprecated
99 { "buffy-list", OP_MAILBOX_LIST, OP_DEPRECATED },
100 { NULL, 0 },
101};
#define OP_DEPRECATED
Convenience symbol.
Definition lib.h:109

◆ OpCompose

const struct MenuFuncOp OpCompose[]
extern

Functions for the Compose Menu.

Definition at line 87 of file functions.c.

87 { /* map: compose */
88 { "attach-file", OP_ATTACHMENT_ATTACH_FILE },
89 { "attach-key", OP_ATTACHMENT_ATTACH_KEY },
90 { "attach-message", OP_ATTACHMENT_ATTACH_MESSAGE },
91 { "attach-news-message", OP_ATTACHMENT_ATTACH_NEWS_MESSAGE },
92#ifdef USE_AUTOCRYPT
93 { "autocrypt-menu", OP_COMPOSE_AUTOCRYPT_MENU },
94#endif
95 { "copy-file", OP_ATTACHMENT_SAVE },
96 { "detach-file", OP_ATTACHMENT_DETACH },
97 { "display-toggle-weed", OP_DISPLAY_HEADERS },
98 { "edit-bcc", OP_ENVELOPE_EDIT_BCC },
99 { "edit-cc", OP_ENVELOPE_EDIT_CC },
100 { "edit-content-id", OP_ATTACHMENT_EDIT_CONTENT_ID },
101 { "edit-description", OP_ATTACHMENT_EDIT_DESCRIPTION },
102 { "edit-encoding", OP_ATTACHMENT_EDIT_ENCODING },
103 { "edit-fcc", OP_ENVELOPE_EDIT_FCC },
104 { "edit-file", OP_COMPOSE_EDIT_FILE },
105 { "edit-followup-to", OP_ENVELOPE_EDIT_FOLLOWUP_TO },
106 { "edit-from", OP_ENVELOPE_EDIT_FROM },
107 { "edit-headers", OP_ENVELOPE_EDIT_HEADERS },
108 { "edit-language", OP_ATTACHMENT_EDIT_LANGUAGE },
109 { "edit-message", OP_COMPOSE_EDIT_MESSAGE },
110 { "edit-mime", OP_ATTACHMENT_EDIT_MIME },
111 { "edit-newsgroups", OP_ENVELOPE_EDIT_NEWSGROUPS },
112 { "edit-reply-to", OP_ENVELOPE_EDIT_REPLY_TO },
113 { "edit-subject", OP_ENVELOPE_EDIT_SUBJECT },
114 { "edit-to", OP_ENVELOPE_EDIT_TO },
115 { "edit-type", OP_ATTACHMENT_EDIT_TYPE },
116 { "edit-x-comment-to", OP_ENVELOPE_EDIT_X_COMMENT_TO },
117 { "exit", OP_EXIT },
118 { "filter-entry", OP_ATTACHMENT_FILTER },
119 { "forget-passphrase", OP_FORGET_PASSPHRASE },
120 { "get-attachment", OP_ATTACHMENT_GET_ATTACHMENT },
121 { "group-alternatives", OP_ATTACHMENT_GROUP_ALTS },
122 { "group-multilingual", OP_ATTACHMENT_GROUP_LINGUAL },
123 { "group-related", OP_ATTACHMENT_GROUP_RELATED },
124 { "ispell", OP_COMPOSE_ISPELL },
125 { "move-down", OP_ATTACHMENT_MOVE_DOWN },
126 { "move-up", OP_ATTACHMENT_MOVE_UP },
127 { "new-mime", OP_ATTACHMENT_NEW_MIME },
128 { "pgp-menu", OP_COMPOSE_PGP_MENU },
129 { "pipe-entry", OP_PIPE },
130 { "pipe-message", OP_PIPE },
131 { "postpone-message", OP_COMPOSE_POSTPONE_MESSAGE },
132 { "preview-page-down", OP_PREVIEW_PAGE_DOWN },
133 { "preview-page-up", OP_PREVIEW_PAGE_UP },
134 { "print-entry", OP_ATTACHMENT_PRINT },
135 { "rename-attachment", OP_ATTACHMENT_RENAME_ATTACHMENT },
136 { "rename-file", OP_COMPOSE_RENAME_FILE },
137 { "send-message", OP_COMPOSE_SEND_MESSAGE },
138 { "smime-menu", OP_COMPOSE_SMIME_MENU },
139 { "toggle-disposition", OP_ATTACHMENT_TOGGLE_DISPOSITION },
140 { "toggle-recode", OP_ATTACHMENT_TOGGLE_RECODE },
141 { "toggle-unlink", OP_ATTACHMENT_TOGGLE_UNLINK },
142 { "ungroup-attachment", OP_ATTACHMENT_UNGROUP },
143 { "update-encoding", OP_ATTACHMENT_UPDATE_ENCODING },
144 { "view-attach", OP_ATTACHMENT_VIEW },
145 { "view-mailcap", OP_ATTACHMENT_VIEW_MAILCAP },
146 { "view-pager", OP_ATTACHMENT_VIEW_PAGER },
147 { "view-text", OP_ATTACHMENT_VIEW_TEXT },
148 { "write-fcc", OP_COMPOSE_WRITE_MESSAGE },
149 { NULL, 0 },
150};

◆ OpEditor

const struct MenuFuncOp OpEditor[]
extern

Functions for the Editor Menu.

Definition at line 53 of file functions.c.

53 { /* map: editor */
54 { "backspace", OP_EDITOR_BACKSPACE },
55 { "backward-char", OP_EDITOR_BACKWARD_CHAR },
56 { "backward-word", OP_EDITOR_BACKWARD_WORD },
57 { "bol", OP_EDITOR_BOL },
58 { "capitalize-word", OP_EDITOR_CAPITALIZE_WORD },
59 { "complete", OP_EDITOR_COMPLETE },
60 { "complete-query", OP_EDITOR_COMPLETE_QUERY },
61 { "delete-char", OP_EDITOR_DELETE_CHAR },
62 { "downcase-word", OP_EDITOR_DOWNCASE_WORD },
63 { "eol", OP_EDITOR_EOL },
64 { "forward-char", OP_EDITOR_FORWARD_CHAR },
65 { "forward-word", OP_EDITOR_FORWARD_WORD },
66 { "help", OP_HELP },
67 { "history-down", OP_EDITOR_HISTORY_DOWN },
68 { "history-search", OP_EDITOR_HISTORY_SEARCH },
69 { "history-up", OP_EDITOR_HISTORY_UP },
70 { "kill-eol", OP_EDITOR_KILL_EOL },
71 { "kill-eow", OP_EDITOR_KILL_EOW },
72 { "kill-line", OP_EDITOR_KILL_LINE },
73 { "kill-whole-line", OP_EDITOR_KILL_WHOLE_LINE },
74 { "kill-word", OP_EDITOR_KILL_WORD },
75 { "mailbox-cycle", OP_EDITOR_MAILBOX_CYCLE },
76 { "quote-char", OP_EDITOR_QUOTE_CHAR },
77 { "redraw-screen", OP_REDRAW },
78 { "transpose-chars", OP_EDITOR_TRANSPOSE_CHARS },
79 { "upcase-word", OP_EDITOR_UPCASE_WORD },
80 // Deprecated
81 { "buffy-cycle", OP_EDITOR_MAILBOX_CYCLE, OP_DEPRECATED },
82 { NULL, 0 },
83};

◆ OpIndex

const struct MenuFuncOp OpIndex[]
extern

Functions for the Index Menu.

Definition at line 90 of file functions.c.

90 { /* map: index */
91 { "alias-dialog", OP_ALIAS_DIALOG },
92#ifdef USE_AUTOCRYPT
93 { "autocrypt-acct-menu", OP_AUTOCRYPT_ACCT_MENU },
94#endif
95 { "bounce-message", OP_BOUNCE_MESSAGE },
96 { "break-thread", OP_MAIN_BREAK_THREAD },
97 { "catchup", OP_CATCHUP },
98 { "change-folder", OP_MAIN_CHANGE_FOLDER },
99 { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
100 { "change-newsgroup", OP_MAIN_CHANGE_GROUP },
101 { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
102#ifdef USE_NOTMUCH
103 { "change-vfolder", OP_MAIN_CHANGE_VFOLDER },
104#endif
105 { "check-traditional-pgp", OP_CHECK_TRADITIONAL },
106 { "clear-flag", OP_MAIN_CLEAR_FLAG },
107 { "collapse-all", OP_MAIN_COLLAPSE_ALL },
108 { "collapse-thread", OP_MAIN_COLLAPSE_THREAD },
109 { "compose-to-sender", OP_COMPOSE_TO_SENDER },
110 { "copy-message", OP_COPY_MESSAGE },
111 { "create-alias", OP_CREATE_ALIAS },
112 { "decode-copy", OP_DECODE_COPY },
113 { "decode-save", OP_DECODE_SAVE },
114 { "decrypt-copy", OP_DECRYPT_COPY },
115 { "decrypt-save", OP_DECRYPT_SAVE },
116 { "delete-message", OP_DELETE },
117 { "delete-pattern", OP_MAIN_DELETE_PATTERN },
118 { "delete-subthread", OP_DELETE_SUBTHREAD },
119 { "delete-thread", OP_DELETE_THREAD },
120 { "display-address", OP_DISPLAY_ADDRESS },
121 { "display-message", OP_DISPLAY_MESSAGE },
122 { "display-toggle-weed", OP_DISPLAY_HEADERS },
123 { "edit", OP_EDIT_RAW_MESSAGE },
124 { "edit-label", OP_EDIT_LABEL },
125 { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
126 { "edit-raw-message", OP_EDIT_RAW_MESSAGE },
127 { "edit-type", OP_ATTACHMENT_EDIT_TYPE },
128#ifdef USE_NOTMUCH
129 { "entire-thread", OP_MAIN_ENTIRE_THREAD },
130#endif
131 { "exit", OP_EXIT },
132 { "extract-keys", OP_EXTRACT_KEYS },
133 { "fetch-mail", OP_MAIN_FETCH_MAIL },
134 { "flag-message", OP_FLAG_MESSAGE },
135 { "followup-message", OP_FOLLOWUP },
136 { "forget-passphrase", OP_FORGET_PASSPHRASE },
137 { "forward-message", OP_FORWARD_MESSAGE },
138 { "forward-to-group", OP_FORWARD_TO_GROUP },
139 { "get-children", OP_GET_CHILDREN },
140 { "get-message", OP_GET_MESSAGE },
141 { "get-parent", OP_GET_PARENT },
142 { "group-chat-reply", OP_GROUP_CHAT_REPLY },
143 { "group-reply", OP_GROUP_REPLY },
144 { "imap-fetch-mail", OP_MAIN_IMAP_FETCH },
145 { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
146 { "limit", OP_MAIN_LIMIT },
147 { "limit-current-thread", OP_LIMIT_CURRENT_THREAD },
148 { "link-threads", OP_MAIN_LINK_THREADS },
149 { "list-reply", OP_LIST_REPLY },
150 { "list-subscribe", OP_LIST_SUBSCRIBE },
151 { "list-unsubscribe", OP_LIST_UNSUBSCRIBE },
152 { "mail", OP_MAIL },
153 { "mail-key", OP_MAIL_KEY },
154 { "mailbox-list", OP_MAILBOX_LIST },
155 { "mark-message", OP_MARK_MSG },
156 { "modify-labels", OP_MAIN_MODIFY_TAGS },
157 { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
158 { "modify-tags", OP_MAIN_MODIFY_TAGS },
159 { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
160 { "next-new", OP_MAIN_NEXT_NEW },
161 { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
162 { "next-subthread", OP_MAIN_NEXT_SUBTHREAD },
163 { "next-thread", OP_MAIN_NEXT_THREAD },
164 { "next-undeleted", OP_MAIN_NEXT_UNDELETED },
165 { "next-unread", OP_MAIN_NEXT_UNREAD },
166 { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
167 { "parent-message", OP_MAIN_PARENT_MESSAGE },
168 { "pipe-entry", OP_PIPE },
169 { "pipe-message", OP_PIPE },
170 { "post-message", OP_POST },
171 { "previous-new", OP_MAIN_PREV_NEW },
172 { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
173 { "previous-subthread", OP_MAIN_PREV_SUBTHREAD },
174 { "previous-thread", OP_MAIN_PREV_THREAD },
175 { "previous-undeleted", OP_MAIN_PREV_UNDELETED },
176 { "previous-unread", OP_MAIN_PREV_UNREAD },
177 { "print-message", OP_PRINT },
178 { "purge-message", OP_PURGE_MESSAGE },
179 { "purge-thread", OP_PURGE_THREAD },
180 { "quasi-delete", OP_MAIN_QUASI_DELETE },
181 { "query", OP_QUERY },
182 { "quit", OP_QUIT },
183 { "read-subthread", OP_MAIN_READ_SUBTHREAD },
184 { "read-thread", OP_MAIN_READ_THREAD },
185 { "recall-message", OP_RECALL_MESSAGE },
186 { "reconstruct-thread", OP_RECONSTRUCT_THREAD },
187 { "reply", OP_REPLY },
188 { "resend-message", OP_RESEND },
189 { "root-message", OP_MAIN_ROOT_MESSAGE },
190 { "save-message", OP_SAVE },
191 { "set-flag", OP_MAIN_SET_FLAG },
192 { "show-limit", OP_MAIN_SHOW_LIMIT },
193 { "sidebar-first", OP_SIDEBAR_FIRST },
194 { "sidebar-last", OP_SIDEBAR_LAST },
195 { "sidebar-next", OP_SIDEBAR_NEXT },
196 { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW },
197 { "sidebar-open", OP_SIDEBAR_OPEN },
198 { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN },
199 { "sidebar-page-up", OP_SIDEBAR_PAGE_UP },
200 { "sidebar-prev", OP_SIDEBAR_PREV },
201 { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW },
202 { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL },
203 { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE },
204 { "sort-mailbox", OP_SORT },
205 { "sort-reverse", OP_SORT_REVERSE },
206 { "sync-mailbox", OP_MAIN_SYNC_FOLDER },
207 { "tag-pattern", OP_MAIN_TAG_PATTERN },
208 { "tag-subthread", OP_TAG_SUBTHREAD },
209 { "tag-thread", OP_TAG_THREAD },
210 { "toggle-new", OP_TOGGLE_NEW },
211 { "toggle-read", OP_TOGGLE_READ },
212 { "toggle-write", OP_TOGGLE_WRITE },
213 { "undelete-message", OP_UNDELETE },
214 { "undelete-pattern", OP_MAIN_UNDELETE_PATTERN },
215 { "undelete-subthread", OP_UNDELETE_SUBTHREAD },
216 { "undelete-thread", OP_UNDELETE_THREAD },
217 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
218#ifdef USE_NOTMUCH
219 { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
220 { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
221 { "vfolder-window-backward", OP_MAIN_WINDOWED_VFOLDER_BACKWARD },
222 { "vfolder-window-forward", OP_MAIN_WINDOWED_VFOLDER_FORWARD },
223 { "vfolder-window-reset", OP_MAIN_WINDOWED_VFOLDER_RESET },
224#endif
225 { "view-attachments", OP_VIEW_ATTACHMENTS },
226 { "view-raw-message", OP_VIEW_RAW_MESSAGE },
227 // Deprecated
228 { "buffy-list", OP_MAILBOX_LIST, OP_DEPRECATED },
229 { NULL, 0 },
230};

◆ OpPager

const struct MenuFuncOp OpPager[]
extern

Functions for the Pager Menu.

Definition at line 70 of file functions.c.

70 { /* map: pager */
71 { "bottom", OP_PAGER_BOTTOM },
72 { "bounce-message", OP_BOUNCE_MESSAGE },
73 { "break-thread", OP_MAIN_BREAK_THREAD },
74 { "change-folder", OP_MAIN_CHANGE_FOLDER },
75 { "change-folder-readonly", OP_MAIN_CHANGE_FOLDER_READONLY },
76 { "change-newsgroup", OP_MAIN_CHANGE_GROUP },
77 { "change-newsgroup-readonly", OP_MAIN_CHANGE_GROUP_READONLY },
78#ifdef USE_NOTMUCH
79 { "change-vfolder", OP_MAIN_CHANGE_VFOLDER },
80#endif
81 { "check-stats", OP_CHECK_STATS },
82 { "check-traditional-pgp", OP_CHECK_TRADITIONAL },
83 { "clear-flag", OP_MAIN_CLEAR_FLAG },
84 { "compose-to-sender", OP_COMPOSE_TO_SENDER },
85 { "copy-message", OP_COPY_MESSAGE },
86 { "create-alias", OP_CREATE_ALIAS },
87 { "decode-copy", OP_DECODE_COPY },
88 { "decode-save", OP_DECODE_SAVE },
89 { "decrypt-copy", OP_DECRYPT_COPY },
90 { "decrypt-save", OP_DECRYPT_SAVE },
91 { "delete-message", OP_DELETE },
92 { "delete-subthread", OP_DELETE_SUBTHREAD },
93 { "delete-thread", OP_DELETE_THREAD },
94 { "display-address", OP_DISPLAY_ADDRESS },
95 { "display-toggle-weed", OP_DISPLAY_HEADERS },
96 { "edit", OP_EDIT_RAW_MESSAGE },
97 { "edit-label", OP_EDIT_LABEL },
98 { "edit-or-view-raw-message", OP_EDIT_OR_VIEW_RAW_MESSAGE },
99 { "edit-raw-message", OP_EDIT_RAW_MESSAGE },
100 { "edit-type", OP_ATTACHMENT_EDIT_TYPE },
101 { "enter-command", OP_ENTER_COMMAND },
102#ifdef USE_NOTMUCH
103 { "entire-thread", OP_MAIN_ENTIRE_THREAD },
104#endif
105 { "exit", OP_EXIT },
106 { "extract-keys", OP_EXTRACT_KEYS },
107 { "flag-message", OP_FLAG_MESSAGE },
108 { "followup-message", OP_FOLLOWUP },
109 { "forget-passphrase", OP_FORGET_PASSPHRASE },
110 { "forward-message", OP_FORWARD_MESSAGE },
111 { "forward-to-group", OP_FORWARD_TO_GROUP },
112 { "group-chat-reply", OP_GROUP_CHAT_REPLY },
113 { "group-reply", OP_GROUP_REPLY },
114 { "half-down", OP_HALF_DOWN },
115 { "half-up", OP_HALF_UP },
116 { "help", OP_HELP },
117 { "imap-fetch-mail", OP_MAIN_IMAP_FETCH },
118 { "imap-logout-all", OP_MAIN_IMAP_LOGOUT_ALL },
119 { "jump", OP_JUMP },
120 { "jump", OP_JUMP_1 },
121 { "jump", OP_JUMP_2 },
122 { "jump", OP_JUMP_3 },
123 { "jump", OP_JUMP_4 },
124 { "jump", OP_JUMP_5 },
125 { "jump", OP_JUMP_6 },
126 { "jump", OP_JUMP_7 },
127 { "jump", OP_JUMP_8 },
128 { "jump", OP_JUMP_9 },
129 { "link-threads", OP_MAIN_LINK_THREADS },
130 { "list-reply", OP_LIST_REPLY },
131 { "list-subscribe", OP_LIST_SUBSCRIBE },
132 { "list-unsubscribe", OP_LIST_UNSUBSCRIBE },
133 { "mail", OP_MAIL },
134 { "mail-key", OP_MAIL_KEY },
135 { "mailbox-list", OP_MAILBOX_LIST },
136 { "mark-as-new", OP_TOGGLE_NEW },
137 { "modify-labels", OP_MAIN_MODIFY_TAGS },
138 { "modify-labels-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
139 { "modify-tags", OP_MAIN_MODIFY_TAGS },
140 { "modify-tags-then-hide", OP_MAIN_MODIFY_TAGS_THEN_HIDE },
141 { "next-entry", OP_NEXT_ENTRY },
142 { "next-line", OP_NEXT_LINE },
143 { "next-new", OP_MAIN_NEXT_NEW },
144 { "next-new-then-unread", OP_MAIN_NEXT_NEW_THEN_UNREAD },
145 { "next-page", OP_NEXT_PAGE },
146 { "next-subthread", OP_MAIN_NEXT_SUBTHREAD },
147 { "next-thread", OP_MAIN_NEXT_THREAD },
148 { "next-undeleted", OP_MAIN_NEXT_UNDELETED },
149 { "next-unread", OP_MAIN_NEXT_UNREAD },
150 { "next-unread-mailbox", OP_MAIN_NEXT_UNREAD_MAILBOX },
151 { "parent-message", OP_MAIN_PARENT_MESSAGE },
152 { "pipe-entry", OP_PIPE },
153 { "pipe-message", OP_PIPE },
154 { "post-message", OP_POST },
155 { "previous-entry", OP_PREV_ENTRY },
156 { "previous-line", OP_PREV_LINE },
157 { "previous-new", OP_MAIN_PREV_NEW },
158 { "previous-new-then-unread", OP_MAIN_PREV_NEW_THEN_UNREAD },
159 { "previous-page", OP_PREV_PAGE },
160 { "previous-subthread", OP_MAIN_PREV_SUBTHREAD },
161 { "previous-thread", OP_MAIN_PREV_THREAD },
162 { "previous-undeleted", OP_MAIN_PREV_UNDELETED },
163 { "previous-unread", OP_MAIN_PREV_UNREAD },
164 { "print-entry", OP_ATTACHMENT_PRINT },
165 { "print-message", OP_PRINT },
166 { "purge-message", OP_PURGE_MESSAGE },
167 { "purge-thread", OP_PURGE_THREAD },
168 { "quasi-delete", OP_MAIN_QUASI_DELETE },
169 { "quit", OP_QUIT },
170 { "read-subthread", OP_MAIN_READ_SUBTHREAD },
171 { "read-thread", OP_MAIN_READ_THREAD },
172 { "recall-message", OP_RECALL_MESSAGE },
173 { "reconstruct-thread", OP_RECONSTRUCT_THREAD },
174 { "redraw-screen", OP_REDRAW },
175 { "reply", OP_REPLY },
176 { "resend-message", OP_RESEND },
177 { "root-message", OP_MAIN_ROOT_MESSAGE },
178 { "save-entry", OP_ATTACHMENT_SAVE },
179 { "save-message", OP_SAVE },
180 { "search", OP_SEARCH },
181 { "search-next", OP_SEARCH_NEXT },
182 { "search-opposite", OP_SEARCH_OPPOSITE },
183 { "search-reverse", OP_SEARCH_REVERSE },
184 { "search-toggle", OP_SEARCH_TOGGLE },
185 { "set-flag", OP_MAIN_SET_FLAG },
186 { "shell-escape", OP_SHELL_ESCAPE },
187 { "show-log-messages", OP_SHOW_LOG_MESSAGES },
188 { "show-version", OP_VERSION },
189 { "sidebar-first", OP_SIDEBAR_FIRST },
190 { "sidebar-last", OP_SIDEBAR_LAST },
191 { "sidebar-next", OP_SIDEBAR_NEXT },
192 { "sidebar-next-new", OP_SIDEBAR_NEXT_NEW },
193 { "sidebar-open", OP_SIDEBAR_OPEN },
194 { "sidebar-page-down", OP_SIDEBAR_PAGE_DOWN },
195 { "sidebar-page-up", OP_SIDEBAR_PAGE_UP },
196 { "sidebar-prev", OP_SIDEBAR_PREV },
197 { "sidebar-prev-new", OP_SIDEBAR_PREV_NEW },
198 { "sidebar-toggle-virtual", OP_SIDEBAR_TOGGLE_VIRTUAL },
199 { "sidebar-toggle-visible", OP_SIDEBAR_TOGGLE_VISIBLE },
200 { "skip-headers", OP_PAGER_SKIP_HEADERS },
201 { "skip-quoted", OP_PAGER_SKIP_QUOTED },
202 { "sort-mailbox", OP_SORT },
203 { "sort-reverse", OP_SORT_REVERSE },
204 { "sync-mailbox", OP_MAIN_SYNC_FOLDER },
205 { "tag-message", OP_TAG },
206 { "toggle-quoted", OP_PAGER_HIDE_QUOTED },
207 { "toggle-write", OP_TOGGLE_WRITE },
208 { "top", OP_PAGER_TOP },
209 { "undelete-message", OP_UNDELETE },
210 { "undelete-subthread", OP_UNDELETE_SUBTHREAD },
211 { "undelete-thread", OP_UNDELETE_THREAD },
212#ifdef USE_NOTMUCH
213 { "vfolder-from-query", OP_MAIN_VFOLDER_FROM_QUERY },
214 { "vfolder-from-query-readonly", OP_MAIN_VFOLDER_FROM_QUERY_READONLY },
215#endif
216 { "view-attachments", OP_VIEW_ATTACHMENTS },
217 { "view-raw-message", OP_VIEW_RAW_MESSAGE },
218 { "what-key", OP_WHAT_KEY },
219 // Deprecated
220 { "buffy-list", OP_MAILBOX_LIST, OP_DEPRECATED },
221 { "error-history", OP_SHOW_LOG_MESSAGES, OP_DEPRECATED },
222 { NULL, 0 },
223};

◆ OpPgp

const struct MenuFuncOp OpPgp[]
extern

Functions for the Pgp Menu.

Definition at line 42 of file functions.c.

42 { /* map: pgp */
43 { "exit", OP_EXIT },
44 { "verify-key", OP_VERIFY_KEY },
45 { "view-name", OP_VIEW_ID },
46 { NULL, 0 },
47};

◆ OpPostponed

const struct MenuFuncOp OpPostponed[]
extern

Functions for the Postpone Menu.

Definition at line 52 of file functions.c.

52 { /* map: postpone */
53 { "exit", OP_EXIT },
54 { "delete-entry", OP_DELETE },
55 { "undelete-entry", OP_UNDELETE },
56 { NULL, 0 },
57};

◆ OpQuery

const struct MenuFuncOp OpQuery[]
extern

Functions for the external Query Menu.

Definition at line 75 of file functions.c.

75 { /* map: query */
76 { "create-alias", OP_CREATE_ALIAS },
77 { "exit", OP_EXIT },
78 { "limit", OP_MAIN_LIMIT },
79 { "mail", OP_MAIL },
80 { "query", OP_QUERY },
81 { "query-append", OP_QUERY_APPEND },
82 { "sort", OP_SORT },
83 { "sort-reverse", OP_SORT_REVERSE },
84 { "tag-pattern", OP_MAIN_TAG_PATTERN },
85 { "untag-pattern", OP_MAIN_UNTAG_PATTERN },
86 { NULL, 0 },
87};

◆ OpSmime

const struct MenuFuncOp OpSmime[]
extern

Functions for the Smime Menu.

Definition at line 52 of file functions.c.

52 { /* map: smime */
53 { "exit", OP_EXIT },
54#ifdef CRYPT_BACKEND_GPGME
55 { "verify-key", OP_VERIFY_KEY },
56 { "view-name", OP_VIEW_ID },
57#endif
58 { NULL, 0 },
59};

◆ KeyNames

struct Mapping KeyNames[]

Key name lookup table.

Definition at line 58 of file lib.c.

58 {
59 // clang-format off
60 { "<PageUp>", KEY_PPAGE },
61 { "<PageDown>", KEY_NPAGE },
62 { "<Up>", KEY_UP },
63 { "<Down>", KEY_DOWN },
64 { "<Right>", KEY_RIGHT },
65 { "<Left>", KEY_LEFT },
66 { "<Delete>", KEY_DC },
67 { "<BackSpace>", KEY_BACKSPACE },
68 { "<Insert>", KEY_IC },
69 { "<Home>", KEY_HOME },
70 { "<End>", KEY_END },
71 { "<Enter>", '\n' },
72 { "<Return>", '\r' },
73#ifdef KEY_ENTER
74 { "<KeypadEnter>", KEY_ENTER },
75#else
76 { "<KeypadEnter>", '\n' },
77#endif
78 { "<Esc>", '\033' }, // Escape
79 { "<Tab>", '\t' },
80 { "<Space>", ' ' },
81#ifdef KEY_BTAB
82 { "<BackTab>", KEY_BTAB },
83#endif
84#ifdef KEY_NEXT
85 { "<Next>", KEY_NEXT },
86#endif
87 /* extensions supported by ncurses. values are filled in during initialization */
88
89 /* CTRL+key */
90 { "<C-Up>", -1 },
91 { "<C-Down>", -1 },
92 { "<C-Left>", -1 },
93 { "<C-Right>", -1 },
94 { "<C-Home>", -1 },
95 { "<C-End>", -1 },
96 { "<C-Next>", -1 },
97 { "<C-Prev>", -1 },
98
99 /* SHIFT+key */
100 { "<S-Up>", -1 },
101 { "<S-Down>", -1 },
102 { "<S-Left>", -1 },
103 { "<S-Right>", -1 },
104 { "<S-Home>", -1 },
105 { "<S-End>", -1 },
106 { "<S-Next>", -1 },
107 { "<S-Prev>", -1 },
108
109 /* ALT+key */
110 { "<A-Up>", -1 },
111 { "<A-Down>", -1 },
112 { "<A-Left>", -1 },
113 { "<A-Right>", -1 },
114 { "<A-Home>", -1 },
115 { "<A-End>", -1 },
116 { "<A-Next>", -1 },
117 { "<A-Prev>", -1 },
118 { NULL, 0 },
119 // clang-format off
120};

◆ AbortKey

keycode_t AbortKey

code of key to abort prompts, normally Ctrl-G

key to abort edits etc, normally Ctrl-G

Definition at line 122 of file lib.c.

◆ Keymaps

struct KeymapList Keymaps[MENU_MAX]

Array of key mappings, one for each MenuType.

Array of Keymap keybindings, one for each Menu.

Definition at line 125 of file lib.c.