/* -*- c -*-
 *
 * JASSPA MicroEmacs - www.jasspa.com
 * ebind.def - keys to commands binding definitions.
 *
 * Copyright (C) 1993-2009 JASSPA (www.jasspa.com)
 *
 * 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.,
 * 675 Mass Ave, Cambridge, MA 02139, USA.
 */
/*
 * Created:     12th June 1993
 * Synopsis:    keys to commands binding definitions.
 * Authors:     Daniel Lawrence, Jon Green & Steven Phillips
 * Description:
 *     Included by ebind.h to create an ordered list of initial
 *     key binding definitions.
 *
 * Notes:
 *     The list MUST be in order as a binary chop algorithm is used
 *     to find a binding.
 */

	DEFBIND (('A'-'@'),		0, CK_GOBOL)
	DEFBIND (('B'-'@'),		0, CK_BAKCHR)
	DEFBIND (('D'-'@'),		0, CK_DELFOR)
	DEFBIND (('E'-'@'),		0, CK_GOEOL)
	DEFBIND (('F'-'@'),		0, CK_FORCHR)
	DEFBIND (('G'-'@'),		0, CK_ABTCMD)
	DEFBIND (('H'-'@'),		0x80000000+3, CK_PREFIX)
	DEFBIND (('I'-'@'),		0, CK_INSTAB)
	DEFBIND (('K'-'@'),		0x80000000+1, CK_KILEOL)
	DEFBIND (('L'-'@'),		0, CK_RECENT)
	DEFBIND (('M'-'@'),		0, CK_NEWLIN)
	DEFBIND (('N'-'@'),		0, CK_FORLIN)
	DEFBIND (('O'-'@'),		0, CK_OPNLIN)
	DEFBIND (('P'-'@'),		0, CK_BAKLIN)
	DEFBIND (('Q'-'@'),		0, CK_QUOTE)
	DEFBIND (('R'-'@'),		0, CK_BISRCH)
	DEFBIND (('S'-'@'),		0, CK_FISRCH)
	DEFBIND (('T'-'@'),		0, CK_TRNCHR)
	DEFBIND (('U'-'@'),		0, CK_UNVARG)
	DEFBIND (('V'-'@'),		0, CK_MOVDWND)
	DEFBIND (('W'-'@'),		0, CK_KILREG)
	DEFBIND (('X'-'@'),		0x80000000+2, CK_PREFIX)
	DEFBIND (('Y'-'@'),		0, CK_YANK)
	DEFBIND (('Z'-'@'),		0, CK_MOVUWND)
#if MEOPT_UNDO
	DEFBIND (('_'-'@'),		0, CK_UNDO)
#endif

        DEFBIND (ME_CONTROL|' ',	0, CK_SETMRK)

        DEFBIND (ME_SPECIAL|SKEY_backspace,	0, CK_DELBAK)
#if MEOPT_CALLBACK
        DEFBIND (ME_SPECIAL|SKEY_callback,	0, CK_VOIDFUNC)
#endif
        DEFBIND (ME_SPECIAL|SKEY_delete,	0, CK_DELFOR)
        DEFBIND (ME_SPECIAL|SKEY_down,		0, CK_FORLIN)
        DEFBIND (ME_SPECIAL|SKEY_end,		0, CK_GOEOF)
        DEFBIND (ME_SPECIAL|SKEY_esc,		0x80000000+1, CK_PREFIX)
        DEFBIND (ME_SPECIAL|SKEY_home,		0, CK_GOBOF)
        DEFBIND (ME_SPECIAL|SKEY_insert,	0x80000000+130+MDOVER, CK_BUFMOD)
        DEFBIND (ME_SPECIAL|SKEY_kp_delete,	0, CK_DELFOR)
        DEFBIND (ME_SPECIAL|SKEY_kp_down,	0, CK_FORLIN)
        DEFBIND (ME_SPECIAL|SKEY_kp_end,	0, CK_GOEOF)
        DEFBIND (ME_SPECIAL|SKEY_kp_home,	0, CK_GOBOF)
        DEFBIND (ME_SPECIAL|SKEY_kp_insert,	0x80000000+130+MDOVER, CK_BUFMOD)
        DEFBIND (ME_SPECIAL|SKEY_kp_left,	0, CK_BAKCHR)
        DEFBIND (ME_SPECIAL|SKEY_kp_page_down,	0, CK_MOVDWND)
        DEFBIND (ME_SPECIAL|SKEY_kp_page_up,	0, CK_MOVUWND)
        DEFBIND (ME_SPECIAL|SKEY_kp_right,	0, CK_FORCHR)
        DEFBIND (ME_SPECIAL|SKEY_kp_up,		0, CK_BAKLIN)
        DEFBIND (ME_SPECIAL|SKEY_left,		0, CK_BAKCHR)
        DEFBIND (ME_SPECIAL|SKEY_page_down,	0, CK_MOVDWND)
        DEFBIND (ME_SPECIAL|SKEY_page_up,	0, CK_MOVUWND)
#if MEOPT_CALLBACK
        DEFBIND (ME_SPECIAL|SKEY_redraw,	0, CK_UPDATE)
#endif
        DEFBIND (ME_SPECIAL|SKEY_return,	0, CK_NEWLIN)
        DEFBIND (ME_SPECIAL|SKEY_right,		0, CK_FORCHR)
        DEFBIND (ME_SPECIAL|SKEY_tab,		0, CK_DOTAB)
        DEFBIND (ME_SPECIAL|SKEY_up,		0, CK_BAKLIN)
        DEFBIND (ME_SPECIAL|SKEY_x_command,	0, CK_EXENCMD)
        DEFBIND (ME_SPECIAL|SKEY_x_line,	0, CK_EXECMD)

       	DEFBIND (ME_SPECIAL|ME_SHIFT|SKEY_backspace,	0, CK_DELBAK)
        DEFBIND (ME_SPECIAL|ME_SHIFT|SKEY_delete,	0, CK_DELFOR)
#if MEOPT_EXTENDED
        DEFBIND (ME_SPECIAL|ME_SHIFT|SKEY_tab,	0,CK_DELTAB)
#endif
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_down,	0x80000005, CK_FORLIN)
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_left,	0, CK_BAKWRD)
#if MEOPT_EXTENDED
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_page_down,	0, CK_SCLNXT)
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_page_up,	0, CK_SCLPRV)
#endif
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_right,	0, CK_FORWRD)
        DEFBIND (ME_SPECIAL|ME_CONTROL|SKEY_up,		0x80000005, CK_BAKLIN)

        DEFBIND (ME_SPECIAL|ME_ALT|SKEY_down,		0x80000001, CK_MOVDWND)
        DEFBIND (ME_SPECIAL|ME_ALT|SKEY_left,		0x80000001, CK_MOVLWND)
        DEFBIND (ME_SPECIAL|ME_ALT|SKEY_right,		0x80000001, CK_MOVRWND)
        DEFBIND (ME_SPECIAL|ME_ALT|SKEY_up,		0x80000001, CK_MOVUWND)

        /* prefix bindings */

#if MEOPT_WORDPRO
	DEFBIND (ME_PREFIX1|('C'-'@'),	0, CK_WRDCNT)
#endif
#if MEOPT_FENCE
	DEFBIND (ME_PREFIX1|('F'-'@'),	0, CK_GOFNC)
	DEFBIND (ME_PREFIX1|('I'-'@'),	0, CK_GOFNC)
#endif
        DEFBIND (ME_PREFIX1|('K'-'@'),	0, CK_UBNDKEY)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX1|('N'-'@'),	0, CK_NAMBUF)
#endif
	DEFBIND (ME_PREFIX1|('R'-'@'),	0, CK_QREP)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX1|('V'-'@'),	0, CK_SCLNXT)
	DEFBIND (ME_PREFIX1|('W'-'@'),	0, CK_KILRECT)
#endif
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX1|('Y'-'@'),	0, CK_YANKRECT)
	DEFBIND (ME_PREFIX1|('Z'-'@'),	0, CK_SCLPRV)
#endif
	DEFBIND (ME_PREFIX1|' ',	0, CK_SETMRK)
#if MEOPT_SPAWN
	DEFBIND (ME_PREFIX1|'!',	0, CK_PIPCMD)
#endif
	DEFBIND (ME_PREFIX1|'%',        0, CK_QREP)
	DEFBIND (ME_PREFIX1|'.',	0, CK_SETMRK)
	DEFBIND (ME_PREFIX1|'/',	0, CK_EXEFIL)
	DEFBIND (ME_PREFIX1|'<',	0, CK_GOBOF)
	DEFBIND (ME_PREFIX1|'>',	0, CK_GOEOF)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX1|'?',	0, CK_HELP)
#endif
#if MEOPT_SPAWN
	DEFBIND (ME_PREFIX1|'@',	0, CK_PIPCMD)
#endif
#if MEOPT_WORDPRO
	DEFBIND (ME_PREFIX1|'[',	0, CK_GOBOP)
#endif
#if MEOPT_IPIPES
        DEFBIND (ME_PREFIX1|'\\',	0, CK_IPIPCMD)
#endif
#if MEOPT_WORDPRO
	DEFBIND (ME_PREFIX1|']',	0, CK_GOEOP)
#endif
	DEFBIND (ME_PREFIX1|'b',	0, CK_BAKWRD)
	DEFBIND (ME_PREFIX1|'c',	0, CK_CAPWRD)
	DEFBIND (ME_PREFIX1|'d',	0, CK_DELFWRD)
#if	CRYPT
	DEFBIND (ME_PREFIX1|'e',	0, CK_SETCRY)
#endif
	DEFBIND (ME_PREFIX1|'f',	0, CK_FORWRD)
	DEFBIND (ME_PREFIX1|'g',	0, CK_GOLIN)
	DEFBIND (ME_PREFIX1|'i',	0, CK_DOTAB)
	DEFBIND (ME_PREFIX1|'k',	0, CK_BINDKEY)
	DEFBIND (ME_PREFIX1|'l',	0, CK_LOWWRD)
	DEFBIND (ME_PREFIX1|'m',	0, CK_GLOBMOD)
#if MEOPT_WORDPRO
	DEFBIND (ME_PREFIX1|'n',	0, CK_GOEOP)
	DEFBIND (ME_PREFIX1|'o',	0, CK_FILPAR)
	DEFBIND (ME_PREFIX1|'p',	0, CK_GOBOP)
	DEFBIND (ME_PREFIX1|'q',	0, CK_FILPAR)
#else
	DEFBIND (ME_PREFIX1|'n',	0x80000005, CK_FORLIN)
	DEFBIND (ME_PREFIX1|'p',	0x80000005, CK_BAKLIN)
#endif
	DEFBIND (ME_PREFIX1|'r',	0, CK_STRREP)
#if MEOPT_TAGS
	DEFBIND (ME_PREFIX1|'t',	0, CK_FNDTAG)
#endif
	DEFBIND (ME_PREFIX1|'u',	0, CK_HIWRD)
	DEFBIND (ME_PREFIX1|'v',	0, CK_MOVUWND)
	DEFBIND (ME_PREFIX1|'w',	0, CK_CPYREG)
	DEFBIND (ME_PREFIX1|'x',	0, CK_EXENCMD)
	DEFBIND (ME_PREFIX1|'y',	0, CK_REYANK)
	DEFBIND (ME_PREFIX1|'z',	0, CK_QEXIT)
	DEFBIND (ME_PREFIX1|'~',	0x80000000-2-MDEDIT, CK_BUFMOD)

        DEFBIND (ME_PREFIX1|ME_SPECIAL|SKEY_backspace,	0, CK_DELWBAK)


        DEFBIND (ME_PREFIX2|('A'-'@'),	0, CK_SETAMRK)
	DEFBIND (ME_PREFIX2|('B'-'@'),	0, CK_LSTBUF)
#if MEOPT_EXTENDED
        DEFBIND (ME_PREFIX2|('C'-'@'),	0, CK_QUIT)
#else
        DEFBIND (ME_PREFIX2|('C'-'@'),	0, CK_EXIT)
#endif
	DEFBIND (ME_PREFIX2|('E'-'@'),	0, CK_EXEMAC)
	DEFBIND (ME_PREFIX2|('F'-'@'),	0, CK_FNDFIL)
	DEFBIND (ME_PREFIX2|('H'-'@'),	0, CK_HUNBAK)
	DEFBIND (ME_PREFIX2|('I'-'@'),	0, CK_INSFIL)
	DEFBIND (ME_PREFIX2|('L'-'@'),	0, CK_RCASLOW)
        DEFBIND (ME_PREFIX2|('N'-'@'),	0x80000001, CK_MOVDWND)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX2|('O'-'@'),	0, CK_DELBLK)
#endif
        DEFBIND (ME_PREFIX2|('P'-'@'),	0x80000001, CK_MOVUWND)
#if MEOPT_RCS
	DEFBIND (ME_PREFIX2|('Q'-'@'),	0, CK_RCSCOCI)
#endif
	DEFBIND (ME_PREFIX2|('R'-'@'),	0, CK_REDFILE)
	DEFBIND (ME_PREFIX2|('S'-'@'),	0, CK_SAVBUF)
	DEFBIND (ME_PREFIX2|('T'-'@'),	0, CK_TRNLINE)
	DEFBIND (ME_PREFIX2|('U'-'@'),	0, CK_RCASHI)
	DEFBIND (ME_PREFIX2|('V'-'@'),	0, CK_VIWFIL)
	DEFBIND (ME_PREFIX2|('W'-'@'),	0, CK_WRTBUF)
	DEFBIND (ME_PREFIX2|('X'-'@'),	0, CK_SWPMRK)
	DEFBIND (ME_PREFIX2|('Y'-'@'),	0, CK_INSFLNM)
	DEFBIND (ME_PREFIX2|('Z'-'@'),	0x7fffffff, CK_WDWDPTH)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX2|'#',	0, CK_FILTBUF)
#endif
	DEFBIND (ME_PREFIX2|'(',	0, CK_BGNMAC)
	DEFBIND (ME_PREFIX2|')',	0, CK_ENDMAC)
#if MEOPT_ISEARCH
	DEFBIND (ME_PREFIX2|'/',	0, CK_FISRCH)
#endif
	DEFBIND (ME_PREFIX2|'0',	0, CK_DELWND)
	DEFBIND (ME_PREFIX2|'1',	0, CK_ONLYWND)
	DEFBIND (ME_PREFIX2|'2',	0, CK_SWNDV)
#if MEOPT_HSPLIT
	DEFBIND (ME_PREFIX2|'3',	0, CK_SWNDH)
#endif
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX2|'4',	0, CK_SFNDFIL)
#endif
#if MEOPT_FRAME
	DEFBIND (ME_PREFIX2|'5',	0, CK_CRTFRAME)
#endif
#if MEOPT_CRYPT
	DEFBIND (ME_PREFIX2|'8',	0x80000005, CK_FNDFIL)
#endif
	DEFBIND (ME_PREFIX2|'9',	0x80000003, CK_FNDFIL)
	DEFBIND (ME_PREFIX2|'<',	0, CK_MOVLWND)
	DEFBIND (ME_PREFIX2|'=',	0, CK_BUFPOS)
	DEFBIND (ME_PREFIX2|'>',	0, CK_MOVRWND)
	DEFBIND (ME_PREFIX2|'?',	0, CK_DESCKEY)
#if MEOPT_SPAWN
	DEFBIND (ME_PREFIX2|'@',	0, CK_PIPCMD)
#endif
	DEFBIND (ME_PREFIX2|'[',	0, CK_MOVUWND)
	DEFBIND (ME_PREFIX2|']',	0, CK_MOVDWND)
        DEFBIND (ME_PREFIX2|'^',	0x80000001, CK_WDWDPTH)
#if MEOPT_FILENEXT
	DEFBIND (ME_PREFIX2|'`',	0, CK_FLNEXT)
#endif
	DEFBIND (ME_PREFIX2|'a',	0, CK_GOAMRK)
	DEFBIND (ME_PREFIX2|'b',	0, CK_USEBUF)
#if MEOPT_SPAWN
	DEFBIND (ME_PREFIX2|'c',	0, CK_SPWCLI)
#endif
	DEFBIND (ME_PREFIX2|'e',	0, CK_EXEMAC)
	DEFBIND (ME_PREFIX2|'h',	0, CK_HUNFOR)
	DEFBIND (ME_PREFIX2|'k',	0, CK_DELBUF)
	DEFBIND (ME_PREFIX2|'m',	0, CK_BUFMOD)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX2|'n',	0, CK_CHGFIL)
#endif
	DEFBIND (ME_PREFIX2|'o',	0, CK_NXTWND)
	DEFBIND (ME_PREFIX2|'p',	0, CK_BAKWND)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX2|'q',	0, CK_MCRQURY)
#endif
#if MEOPT_ISEARCH
	DEFBIND (ME_PREFIX2|'r',	0, CK_BAKSRCH)
	DEFBIND (ME_PREFIX2|'s',	0, CK_FORSRCH)
#endif
#if MEOPT_UNDO
	DEFBIND (ME_PREFIX2|'u',	0, CK_UNDO)
#endif
	DEFBIND (ME_PREFIX2|'v',	0, CK_SETVAR)
	DEFBIND (ME_PREFIX2|'w',	0, CK_WDWDPTH)
	DEFBIND (ME_PREFIX2|'x',	0, CK_NXTBUF)
	DEFBIND (ME_PREFIX2|'y',	0x7fffffff, CK_INSFLNM)
	DEFBIND (ME_PREFIX2|'z',	0x80000001, CK_WDWDPTH)
#if MEOPT_HSPLIT
	DEFBIND (ME_PREFIX2|'{',	0x7fffffff, CK_WDWWDTH)
	DEFBIND (ME_PREFIX2|'}',	0x80000001, CK_WDWWDTH)
#endif
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX3|('C'-'@'),	0, CK_HELPCOM)
	DEFBIND (ME_PREFIX3|('I'-'@'),	0, CK_HELPITM)
	DEFBIND (ME_PREFIX3|('V'-'@'),	0, CK_HELPVAR)

        DEFBIND (ME_PREFIX3|'a',	0, CK_APROPS)
#endif
        DEFBIND (ME_PREFIX3|'b',	0, CK_DESCBIN)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX3|'c',	0, CK_LSTCOM)
#endif
	DEFBIND (ME_PREFIX3|'d',	0, CK_DESCVAR)
	DEFBIND (ME_PREFIX3|'k',	0, CK_DESCKEY)
#if MEOPT_EXTENDED
	DEFBIND (ME_PREFIX3|'v',	0, CK_LSTVAR)
#endif

