2 * Copyright (C) 1996-2000,2002,2010 Michael R. Elkins <me@mutt.org>
4 * This program is free software; you can redistribute it and/or modify
5 * it under the terms of the GNU General Public License as published by
6 * the Free Software Foundation; either version 2 of the License, or
7 * (at your option) any later version.
9 * This program is distributed in the hope that it will be useful,
10 * but WITHOUT ANY WARRANTY; without even the implied warranty of
11 * MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
12 * GNU General Public License for more details.
14 * You should have received a copy of the GNU General Public License
15 * along with this program; if not, write to the Free Software
16 * Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
24 /* maximal length of a key binding sequence used for buffer in km_bindkey */
27 /* type for key storage, the rest of mutt works fine with int type */
28 typedef short keycode_t;
30 void km_bind (char *, int, int, char *, char *);
31 void km_bindkey (char *, int, int);
34 void init_extended_keys(void);
36 /* entry in the keymap tree */
39 char *macro; /* macro expansion (op == OP_MACRO) */
40 char *descr; /* description of a macro for the help menu */
41 struct keymap_t *next; /* next key in map */
42 short op; /* operation to perform */
43 short eq; /* number of leading keys equal to next entry */
44 short len; /* length of key sequence (unit: sizeof (keycode_t)) */
45 keycode_t *keys; /* key sequence */
48 int km_expand_key (char *, size_t, struct keymap_t *);
49 struct keymap_t *km_find_func (int, int);
51 void km_error_key (int);
52 void mutt_what_key (void);
71 #ifdef CRYPT_BACKEND_GPGME
73 MENU_KEY_SELECT_SMIME,
88 /* the keymap trees (one for each menu) */
89 extern struct keymap_t *Keymaps[];
91 /* dokey() records the last real key pressed */
94 extern const struct mapping_t Menus[];
98 char *name; /* name of the function */
99 int op; /* function id number */
100 char *seq; /* default key binding */
103 const struct binding_t *km_get_table (int menu);
105 extern const struct binding_t OpGeneric[];
106 extern const struct binding_t OpPost[];
107 extern const struct binding_t OpMain[];
108 extern const struct binding_t OpAttach[];
109 extern const struct binding_t OpPager[];
110 extern const struct binding_t OpCompose[];
111 extern const struct binding_t OpBrowser[];
112 extern const struct binding_t OpEditor[];
113 extern const struct binding_t OpQuery[];
114 extern const struct binding_t OpAlias[];
116 extern const struct binding_t OpPgp[];
118 extern const struct binding_t OpSmime[];
121 extern const struct binding_t OpMix[];
125 extern const struct binding_t OpAutocryptAcct[];
128 #include "keymap_defs.h"
130 #endif /* KEYMAP_H */