33#define MUTT_UNBIND 1<<0
34#define MUTT_UNMACRO 1<<1
82extern struct KeymapList
Keymaps[];
CommandResult
Error codes for command_t parse functions.
Convenience wrapper for the core headers.
enum CommandResult mutt_parse_bind(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'bind' command - Implements Command::parse() -.
enum CommandResult mutt_parse_unbind(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'unbind' command - Implements Command::parse() -.
enum CommandResult mutt_parse_macro(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'macro' command - Implements Command::parse() -.
enum CommandResult mutt_parse_push(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'push' command - Implements Command::parse() -.
enum CommandResult mutt_parse_exec(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse the 'exec' command - Implements Command::parse() -.
int main_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
const struct Mapping Menus[]
NotifyBinding
Key Binding notification types.
@ NT_MACRO_ADD
Key macro has been added.
@ NT_MACRO_DELETE
Key macro has been deleted.
@ NT_MACRO_DELETE_ALL
All key macros have been deleted.
@ NT_BINDING_DELETE
Key binding has been deleted.
@ NT_BINDING_ADD
Key binding has been added.
@ NT_BINDING_DELETE_ALL
All key bindings have been deleted.
enum CommandResult mutt_parse_unmacro(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
keycode_t AbortKey
key to abort edits etc, normally Ctrl-G
struct KeyEvent km_dokey_event(enum MenuType menu)
Determine what a keypress should do.
void mutt_what_key(void)
Ask the user to press a key.
STAILQ_HEAD(KeymapList, Keymap)
void km_init(void)
Initialise all the menu keybindings.
struct Keymap * km_find_func(enum MenuType menu, int func)
Find a function's mapping in a Menu.
int km_expand_key(char *s, size_t len, struct Keymap *map)
Get the key string bound to a Keymap.
const char * mutt_get_func(const struct MenuFuncOp *bindings, int op)
Get the name of a function.
void km_error_key(enum MenuType menu)
Handle an unbound key sequence.
void mutt_keys_free(void)
Free the key maps.
int km_dokey(enum MenuType menu)
Determine what a keypress should do.
short keycode_t
Type for key storage, the rest of neomutt works fine with int type.
const struct MenuFuncOp * km_get_table(enum MenuType mtype)
Lookup a Menu's functions.
void init_extended_keys(void)
Initialise map of ncurses extended keys.
enum CommandResult km_bind(char *s, enum MenuType menu, int op, char *macro, char *desc)
Bind a key to a macro.
struct KeymapList Keymaps[]
Array of Keymap keybindings, one for each Menu.
void mutt_init_abort_key(void)
Parse the abort_key config string.
Convenience wrapper for the library headers.
String manipulation buffer.
const char * key
Key string being bound (for new bind/macro)
int op
Operation the key's bound to (for bind), e.g. OP_DELETE.
enum MenuType menu
Menu, e.g. MENU_PAGER.
An event such as a keypress.
int op
Function opcode, e.g. OP_HELP.
keycode_t * keys
key sequence
char * macro
macro expansion (op == OP_MACRO)
STAILQ_ENTRY(Keymap) entries
next key in map
short eq
number of leading keys equal to next entry
char * desc
description of a macro for the help menu
short len
length of key sequence (unit: sizeof (keycode_t))
short op
operation to perform
Mapping between user-readable string and a constant.
Data passed to a notification function.
MenuType
Types of GUI selections.