Set up the key bindings. More...
#include "config.h"
#include <stdbool.h>
#include <stdio.h>
#include <string.h>
#include <strings.h>
#include "mutt/lib.h"
#include "config/lib.h"
#include "core/lib.h"
#include "gui/lib.h"
#include "key/lib.h"
#include "menu/lib.h"
#include "ncrypt/lib.h"
Go to the source code of this file.
Data Structures | |
struct | Extkey |
Map key names from NeoMutt's style to Curses style. More... | |
Functions | |
static const char * | find_ext_name (const char *key) |
Find the curses name for a key. | |
void | init_extended_keys (void) |
Initialise map of ncurses extended keys. | |
static void | create_bindings (const struct MenuOpSeq *map, enum MenuType mtype) |
Attach a set of keybindings to a Menu. | |
void | km_init (void) |
Initialise all the menu keybindings. | |
static void | mutt_keymaplist_free (struct KeymapList *km_list) |
Free a List of Keymaps. | |
void | mutt_keys_cleanup (void) |
Free the key maps. | |
void | mutt_init_abort_key (void) |
Parse the abort_key config string. | |
int | main_config_observer (struct NotifyCallback *nc) |
Notification that a Config Variable has changed - Implements observer_t -. | |
Variables | |
const struct MenuOpSeq | AliasDefaultBindings [] |
Key bindings for the Alias Menu. | |
const struct MenuOpSeq | AttachmentDefaultBindings [] |
Key bindings for the Attachment Menu. | |
const struct MenuOpSeq | AutocryptDefaultBindings [] |
Key bindings for the Autocrypt Account. | |
const struct MenuOpSeq | BrowserDefaultBindings [] |
Key bindings for the file Browser Menu. | |
const struct MenuOpSeq | ComposeDefaultBindings [] |
Key bindings for the Compose Menu. | |
const struct MenuOpSeq | EditorDefaultBindings [] |
Key bindings for the Editor Menu. | |
const struct MenuOpSeq | IndexDefaultBindings [] |
Key bindings for the Index Menu. | |
const struct MenuOpSeq | PagerDefaultBindings [] |
Key bindings for the Pager Menu. | |
const struct MenuOpSeq | PgpDefaultBindings [] |
Key bindings for the Pgp Menu. | |
const struct MenuOpSeq | PostponedDefaultBindings [] |
Key bindings for the Postpone Menu. | |
const struct MenuOpSeq | QueryDefaultBindings [] |
Key bindings for the external Query Menu. | |
const struct MenuOpSeq | SmimeDefaultBindings [] |
Key bindings for the Smime Menu. | |
static const struct Extkey | ExtKeys [] |
Mapping between NeoMutt and Curses key names. | |
Set up the key bindings.
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 init.c.
|
static |
Find the curses name for a key.
key | Key name |
ptr | Curses name |
Look up NeoMutt's name for a key and find the ncurses extended name for it.
Definition at line 114 of file init.c.
void init_extended_keys | ( | void | ) |
Initialise map of ncurses extended keys.
Determine the keycodes for ncurses extended keys and fill in the KeyNames array.
This function must be called after initscr(), or mutt_tigetstr() fails. This creates a bit of a chicken-and-egg problem because km_init() is called prior to start_curses(). This means that the default keybindings can't include any of the extended keys because they won't be defined until later.
Definition at line 134 of file init.c.
Attach a set of keybindings to a Menu.
map | Key bindings |
mtype | Menu type, e.g. MENU_PAGER |
Definition at line 165 of file init.c.
void km_init | ( | void | ) |
Initialise all the menu keybindings.
Definition at line 177 of file init.c.
|
static |
Free a List of Keymaps.
km_list | List of Keymaps to free |
Definition at line 211 of file init.c.
void mutt_keys_cleanup | ( | void | ) |
Free the key maps.
Definition at line 224 of file init.c.
void mutt_init_abort_key | ( | void | ) |
Parse the abort_key config string.
Parse the string into $abort_key
and put the keycode into AbortKey.
Definition at line 237 of file init.c.
|
extern |
Key bindings for the Alias Menu.
Definition at line 93 of file functions.c.
|
extern |
Key bindings for the Attachment Menu.
Definition at line 98 of file functions.c.
|
extern |
Key bindings for the Autocrypt Account.
Definition at line 68 of file functions.c.
|
extern |
Key bindings for the file Browser Menu.
Definition at line 106 of file functions.c.
|
extern |
Key bindings for the Compose Menu.
Definition at line 155 of file functions.c.
|
extern |
Key bindings for the Editor Menu.
Definition at line 88 of file functions.c.
|
extern |
Key bindings for the Index Menu.
Definition at line 235 of file functions.c.
|
extern |
Key bindings for the Pager Menu.
Definition at line 229 of file functions.c.
|
extern |
Key bindings for the Pgp Menu.
Definition at line 64 of file functions.c.
|
extern |
Key bindings for the Postpone Menu.
Definition at line 62 of file functions.c.
|
extern |
Key bindings for the external Query Menu.
Definition at line 110 of file functions.c.
|
extern |
Key bindings for the Smime Menu.
Definition at line 74 of file functions.c.