/*
* Copyright (C) 1996-2000,2002,2010-2011 Michael R. Elkins <me@mutt.org>
*
* This program is free software; you can redistribute it and/or modify
* it under the terms of the GNU General Public License as published by
* the Free Software Foundation; either version 2 of the License, or
* (at your option) any later version.
*
* 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, write to the Free Software
* Foundation, Inc., 51 Franklin Street, Fifth Floor, Boston, MA 02110-1301, USA.
*/
#if HAVE_CONFIG_H
# include "config.h"
#endif
#include "mutt.h"
#include "mutt_menu.h"
#include "mutt_curses.h"
#include "keymap.h"
#include "mapping.h"
#include "mutt_crypt.h"
#ifdef USE_IMAP
#include "imap/imap.h"
#endif
#ifdef USE_INOTIFY
#include "monitor.h"
#endif
#include <stdlib.h>
#include <string.h>
#include <ctype.h>
#include "functions.h"
const struct mapping_t Menus[] = {
{ "alias", MENU_ALIAS },
{ "attach", MENU_ATTACH },
{ "browser", MENU_FOLDER },
{ "compose", MENU_COMPOSE },
{ "editor", MENU_EDITOR },
{ "index", MENU_MAIN },
{ "pager", MENU_PAGER },
{ "postpone", MENU_POST },
{ "pgp", MENU_PGP },
{ "smime", MENU_SMIME },
#ifdef CRYPT_BACKEND_GPGME
{ "key_select_pgp", MENU_KEY_SELECT_PGP },
{ "key_select_smime", MENU_KEY_SELECT_SMIME },
#endif
#ifdef MIXMASTER
{ "mix", MENU_MIX },
#endif
{ "query", MENU_QUERY },
{ "generic", MENU_GENERIC },
{ NULL, 0 }
};
#define mutt_check_menu(s) mutt_getvaluebyname(s, Menus)
static struct mapping_t KeyNames[] = {
{ "<PageUp>", KEY_PPAGE },
{ "<PageDown>", KEY_NPAGE },
{ "<Up>", KEY_UP },
{ "<Down>", KEY_DOWN },
{ "<Right>", KEY_RIGHT },
{ "<Left>", KEY_LEFT },
{ "<Delete>", KEY_DC },
{ "<BackSpace>",KEY_BACKSPACE },
{ "<Insert>", KEY_IC },
{ "<Home>", KEY_HOME },
{ "<End>", KEY_END },
#ifdef KEY_ENTER
{ "<Enter>", KEY_ENTER },
#endif
{ "<Return>", MUTT_ENTER_C },
{ "<Esc>", '\033' },
{ "<Tab>", '\t' },
{ "<Space>", ' ' },
#ifdef KEY_BTAB
{ "<BackTab>", KEY_BTAB },
#endif
#ifdef KEY_NEXT
{ "<Next>", KEY_NEXT },
#endif
#ifdef NCURSES_VERSION
/* extensions supported by ncurses. values are filled in during initialization */
/* CTRL+key */
{ "<C-Up>", -1 },
{ "<C-Down>", -1 },
{ "<C-Left>", -1 },
{ "<C-Right>", -1 },
{ "<C-Home>", -1 },
{ "<C-End>", -1 },
{ "<C-Next>", -1 },
{ "<C-Prev>", -1 },
/* SHIFT+key */
{ "<S-Up>", -1 },
{ "<S-Down>", -1 },
{ "<S-Left>", -1 },
{ "<S-Right>", -1 },
{ "<S-Home>", -1 },
{ "<S-End>", -1 },
{