44 {
"<PageUp>", KEY_PPAGE },
45 {
"<PageDown>", KEY_NPAGE },
47 {
"<Down>", KEY_DOWN },
48 {
"<Right>", KEY_RIGHT },
49 {
"<Left>", KEY_LEFT },
50 {
"<Delete>", KEY_DC },
51 {
"<BackSpace>", KEY_BACKSPACE },
52 {
"<Insert>", KEY_IC },
53 {
"<Home>", KEY_HOME },
58 {
"<KeypadEnter>", KEY_ENTER },
60 {
"<KeypadEnter>",
'\n' },
66 {
"<BackTab>", KEY_BTAB },
69 {
"<Next>", KEY_NEXT },
132 struct Keymap *km = *pptr;
147 struct Keymap *km_tmp = NULL;
166 while ((*pos < km1->
len) && (*pos < km2->
len))
168 if (km1->
keys[*pos] < km2->
keys[*pos])
171 if (km1->
keys[*pos] > km2->
keys[*pos])
194 if ((c < 256) && (c > -128) && iscntrl((
unsigned char) c))
209 else if ((c >= KEY_F0) && (c < KEY_F(256)))
213 else if ((c < 256) && (c >= -128) &&
IsPrint(c))
234 for (
int i = 0; i < km->
len; i++)
292 char *end_char = NULL;
293 long int result = strtol(str + 1, &end_char, 8);
300 if ((*end_char !=
'>') || (result < 0) || (result == LONG_MAX))
319 char buf[128] = { 0 };
329 if ((*s ==
'<') && (t = strchr(s,
'>')))
357 *d = (
unsigned char) *s;
int buf_add_printf(struct Buffer *buf, const char *fmt,...)
Format a string appending a Buffer.
size_t buf_addch(struct Buffer *buf, char c)
Add a single character to a Buffer.
size_t buf_addstr(struct Buffer *buf, const char *s)
Add a string to a Buffer.
bool mutt_isspace(int arg)
Wrapper for isspace(3)
int mutt_tolower(int arg)
Wrapper for tolower(3)
bool mutt_isdigit(int arg)
Wrapper for isdigit(3)
Convenience wrapper for the gui headers.
void keymap_get_name(int c, struct Buffer *buf)
Get the human name for a key.
void keymaplist_free(struct KeymapList *kml)
Free a List of Keymaps.
void keymap_expand_string(const char *str, struct Buffer *buf)
Get a human-readable key string.
bool keymap_expand_key(struct Keymap *km, struct Buffer *buf)
Get the key string bound to a Keymap.
void keymap_free(struct Keymap **pptr)
Free a Keymap.
struct Keymap * keymap_compare(struct Keymap *km1, struct Keymap *km2, size_t *pos)
Compare two keymaps' keyscodes and return the bigger one.
size_t parse_keys(const char *str, keycode_t *d, size_t max)
Parse a key string into key codes.
int parse_fkey(char *str)
Parse a function key string.
struct Keymap * keymap_alloc(size_t len, keycode_t *keys)
Allocate space for a sequence of keys.
struct Mapping KeyNames[]
Key name lookup table.
int parse_keycode(const char *str)
Parse a numeric keycode.
short keycode_t
Type for key storage, the rest of neomutt works fine with int type.
int mutt_map_get_value(const char *name, const struct Mapping *map)
Lookup the constant for a string.
const char * mutt_map_get_name(int val, const struct Mapping *map)
Lookup a string for a constant.
#define MUTT_MEM_CALLOC(n, type)
Convenience wrapper for the library headers.
size_t mutt_str_copy(char *dest, const char *src, size_t dsize)
Copy a string into a buffer (guaranteeing NUL-termination)
#define STAILQ_REMOVE(head, elm, type, field)
#define STAILQ_FOREACH_SAFE(var, head, field, tvar)
String manipulation buffer.
keycode_t * keys
Key sequence.
char * macro
Macro expansion (op == OP_MACRO)
char * desc
Description of a macro for the help menu.
short len
Length of key sequence (unit: sizeof (keycode_t))
Mapping between user-readable string and a constant.