47#define MUTT_UNBIND (1 << 0)
48#define MUTT_UNMACRO (1 << 1)
51#define GETCH_NO_FLAGS 0
52#define GETCH_IGNORE_MACRO (1 << 0)
90extern struct KeymapList
Keymaps[];
#define ARRAY_HEAD(name, type)
Define a named struct for arrays of elements of a certain type.
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() -.
enum CommandResult dump_bind_macro(struct Buffer *buf, struct Buffer *s, intptr_t data, struct Buffer *err)
Parse 'bind' and 'macro' commands - Implements Command::parse() -.
void mw_what_key(void)
Display the value of a key -.
int main_config_observer(struct NotifyCallback *nc)
Notification that a Config Variable has changed - Implements observer_t -.
uint8_t GetChFlags
Flags for mutt_getch(), e.g. GETCH_NO_FLAGS.
const char * km_keyname(int c)
Get the human name for a key.
struct KeyEventArray MacroEvents
These are used for macros and exec/push commands.
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.
void generic_tokenize_push_string(char *s)
Parse and queue a 'push' command.
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
int km_dokey(enum MenuType menu, GetChFlags flags)
Determine what a keypress should do.
struct Keymap * km_compare_keys(struct Keymap *k1, struct Keymap *k2, size_t *pos)
Compare two keymaps' keyscodes and return the bigger one.
struct Keymap * alloc_keys(size_t len, keycode_t *keys)
Allocate space for a sequence of keys.
void mutt_keymap_free(struct Keymap **ptr)
Free a 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.
size_t parsekeys(const char *str, keycode_t *d, size_t max)
Parse a key string into key codes.
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.
short keycode_t
Type for key storage, the rest of neomutt works fine with int type.
void mutt_flush_macro_to_endcond(void)
Drop a macro from the input buffer.
enum CommandResult km_bindkey(const char *s, enum MenuType mtype, int op)
Bind a key in a Menu to an operation.
const struct MenuFuncOp * km_get_table(enum MenuType mtype)
Lookup a Menu's functions.
struct Mapping KeyNames[]
Key name lookup table.
int get_op(const struct MenuFuncOp *funcs, const char *start, size_t len)
Get the function by its name.
int km_expand_key_string(char *str, char *buf, size_t buflen)
Get a human-readable key string.
struct KeyEvent km_dokey_event(enum MenuType menu, GetChFlags flags)
Determine what a keypress should do.
void mutt_keys_cleanup(void)
Free the key maps.
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.
#define STAILQ_HEAD(name, type)
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
Linked list.
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.