2005-05-31 11:50:56 -04:00
|
|
|
/* EBIND.H
|
|
|
|
*
|
|
|
|
* Initial default key to function bindings
|
|
|
|
*
|
|
|
|
* Modified by Petri Kutvonen
|
|
|
|
*/
|
|
|
|
|
|
|
|
/*
|
|
|
|
* Command table.
|
|
|
|
* This table is *roughly* in ASCII order, left to right across the
|
|
|
|
* characters of the command. This explains the funny location of the
|
|
|
|
* control-X commands.
|
|
|
|
*/
|
2005-09-30 18:26:09 -04:00
|
|
|
KEYTAB keytab[NBINDS] = {
|
|
|
|
{CONTROL | 'A', gotobol}
|
|
|
|
,
|
|
|
|
{CONTROL | 'B', backchar}
|
|
|
|
,
|
|
|
|
{CONTROL | 'C', insspace}
|
|
|
|
,
|
|
|
|
{CONTROL | 'D', forwdel}
|
|
|
|
,
|
|
|
|
{CONTROL | 'E', gotoeol}
|
|
|
|
,
|
|
|
|
{CONTROL | 'F', forwchar}
|
|
|
|
,
|
|
|
|
{CONTROL | 'G', ctrlg}
|
|
|
|
,
|
|
|
|
{CONTROL | 'H', backdel}
|
|
|
|
,
|
|
|
|
{CONTROL | 'I', tab}
|
|
|
|
,
|
|
|
|
{CONTROL | 'J', indent}
|
|
|
|
,
|
|
|
|
{CONTROL | 'K', killtext}
|
|
|
|
,
|
|
|
|
{CONTROL | 'L', refresh}
|
|
|
|
,
|
|
|
|
{CONTROL | 'M', newline}
|
|
|
|
,
|
|
|
|
{CONTROL | 'N', forwline}
|
|
|
|
,
|
|
|
|
{CONTROL | 'O', openline}
|
|
|
|
,
|
|
|
|
{CONTROL | 'P', backline}
|
|
|
|
,
|
|
|
|
{CONTROL | 'Q', quote}
|
|
|
|
,
|
|
|
|
{CONTROL | 'R', backsearch}
|
|
|
|
,
|
|
|
|
{CONTROL | 'S', forwsearch}
|
|
|
|
,
|
|
|
|
{CONTROL | 'T', twiddle}
|
|
|
|
,
|
|
|
|
{CONTROL | 'U', unarg}
|
|
|
|
,
|
|
|
|
{CONTROL | 'V', forwpage}
|
|
|
|
,
|
|
|
|
{CONTROL | 'W', killregion}
|
|
|
|
,
|
|
|
|
{CONTROL | 'X', cex}
|
|
|
|
,
|
|
|
|
{CONTROL | 'Y', yank}
|
|
|
|
,
|
|
|
|
{CONTROL | 'Z', backpage}
|
|
|
|
,
|
|
|
|
{CONTROL | ']', meta}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'B', listbuffers}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'C', quit}
|
|
|
|
, /* Hard quit. */
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE & AEDIT
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | CONTROL | 'A', detab}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | CONTROL | 'D', filesave}
|
|
|
|
, /* alternative */
|
2005-05-31 11:50:56 -04:00
|
|
|
#else
|
|
|
|
#if AEDIT
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | CONTROL | 'D', detab}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
#if AEDIT
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | CONTROL | 'E', entab}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{CTLX | CONTROL | 'F', filefind}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'I', insfile}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'L', lowerregion}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'M', delmode}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'N', mvdnwind}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'O', deblank}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'P', mvupwind}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'R', fileread}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'S', filesave}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if AEDIT
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | CONTROL | 'T', trim}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{CTLX | CONTROL | 'U', upperregion}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'V', viewfile}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'W', filewrite}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'X', swapmark}
|
|
|
|
,
|
|
|
|
{CTLX | CONTROL | 'Z', shrinkwind}
|
|
|
|
,
|
|
|
|
{CTLX | '?', deskey}
|
|
|
|
,
|
|
|
|
{CTLX | '!', spawn}
|
|
|
|
,
|
|
|
|
{CTLX | '@', pipecmd}
|
|
|
|
,
|
|
|
|
{CTLX | '#', filter}
|
|
|
|
,
|
|
|
|
{CTLX | '$', execprg}
|
|
|
|
,
|
|
|
|
{CTLX | '=', showcpos}
|
|
|
|
,
|
|
|
|
{CTLX | '(', ctlxlp}
|
|
|
|
,
|
|
|
|
{CTLX | ')', ctlxrp}
|
|
|
|
,
|
|
|
|
{CTLX | '^', enlargewind}
|
|
|
|
,
|
|
|
|
{CTLX | '0', delwind}
|
|
|
|
,
|
|
|
|
{CTLX | '1', onlywind}
|
|
|
|
,
|
|
|
|
{CTLX | '2', splitwind}
|
|
|
|
,
|
|
|
|
{CTLX | 'A', setvar}
|
|
|
|
,
|
|
|
|
{CTLX | 'B', usebuffer}
|
|
|
|
,
|
|
|
|
{CTLX | 'C', spawncli}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if BSD | __hpux | SVR4
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | 'D', bktoshell}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{CTLX | 'E', ctlxe}
|
|
|
|
,
|
|
|
|
{CTLX | 'F', setfillcol}
|
|
|
|
,
|
|
|
|
{CTLX | 'K', killbuffer}
|
|
|
|
,
|
|
|
|
{CTLX | 'M', setmode}
|
|
|
|
,
|
|
|
|
{CTLX | 'N', filename}
|
|
|
|
,
|
|
|
|
{CTLX | 'O', nextwind}
|
|
|
|
,
|
|
|
|
{CTLX | 'P', prevwind}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | 'Q', quote}
|
|
|
|
, /* alternative */
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#if ISRCH
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | 'R', risearch}
|
|
|
|
,
|
|
|
|
{CTLX | 'S', fisearch}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{CTLX | 'W', resize}
|
|
|
|
,
|
|
|
|
{CTLX | 'X', nextbuffer}
|
|
|
|
,
|
|
|
|
{CTLX | 'Z', enlargewind}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if WORDPRO
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | CONTROL | 'C', wordcount}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | CONTROL | 'D', newsize}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#if PROC
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | CONTROL | 'E', execproc}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#if CFENCE
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | CONTROL | 'F', getfence}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{META | CONTROL | 'H', delbword}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'K', unbindkey}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'L', reposition}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'M', delgmode}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'N', namebuffer}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'R', qreplace}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'S', newsize}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'T', newwidth}
|
|
|
|
,
|
|
|
|
{META | CONTROL | 'V', scrnextdw}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if WORDPRO
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | CONTROL | 'W', killpara}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{META | CONTROL | 'Z', scrnextup}
|
|
|
|
,
|
|
|
|
{META | ' ', setmark}
|
|
|
|
,
|
|
|
|
{META | '?', help}
|
|
|
|
,
|
|
|
|
{META | '!', reposition}
|
|
|
|
,
|
|
|
|
{META | '.', setmark}
|
|
|
|
,
|
|
|
|
{META | '>', gotoeob}
|
|
|
|
,
|
|
|
|
{META | '<', gotobob}
|
|
|
|
,
|
|
|
|
{META | '~', unmark}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if APROP
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'A', apro}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'B', backword}
|
|
|
|
,
|
|
|
|
{META | 'C', capword}
|
|
|
|
,
|
|
|
|
{META | 'D', delfword}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if CRYPT
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'E', setkey}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'F', forwword}
|
|
|
|
,
|
|
|
|
{META | 'G', gotoline}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE
|
|
|
|
#if WORDPRO
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'J', justpara}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'K', bindtokey}
|
|
|
|
,
|
|
|
|
{META | 'L', lowerword}
|
|
|
|
,
|
|
|
|
{META | 'M', setgmode}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if WORDPRO
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'N', gotoeop}
|
|
|
|
,
|
|
|
|
{META | 'P', gotobop}
|
|
|
|
,
|
|
|
|
{META | 'Q', fillpara}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'R', sreplace}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'S', forwsearch}
|
|
|
|
, /* alternative P.K. */
|
2005-05-31 11:50:56 -04:00
|
|
|
#else
|
|
|
|
#if BSD
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'S', bktoshell}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
2005-09-30 18:26:09 -04:00
|
|
|
{META | 'U', upperword}
|
|
|
|
,
|
|
|
|
{META | 'V', backpage}
|
|
|
|
,
|
|
|
|
{META | 'W', copyregion}
|
|
|
|
,
|
|
|
|
{META | 'X', namedcmd}
|
|
|
|
,
|
|
|
|
{META | 'Z', quickexit}
|
|
|
|
,
|
|
|
|
{META | 0x7F, delbword}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
#if MSDOS
|
2005-09-30 18:26:09 -04:00
|
|
|
{SPEC | CONTROL | '_', forwhunt}
|
|
|
|
,
|
|
|
|
{SPEC | CONTROL | 'S', backhunt}
|
|
|
|
,
|
|
|
|
{SPEC | 71, gotobol}
|
|
|
|
,
|
|
|
|
{SPEC | 72, backline}
|
|
|
|
,
|
|
|
|
{SPEC | 73, backpage}
|
|
|
|
,
|
|
|
|
{SPEC | 75, backchar}
|
|
|
|
,
|
|
|
|
{SPEC | 77, forwchar}
|
|
|
|
,
|
|
|
|
{SPEC | 79, gotoeol}
|
|
|
|
,
|
|
|
|
{SPEC | 80, forwline}
|
|
|
|
,
|
|
|
|
{SPEC | 81, forwpage}
|
|
|
|
,
|
|
|
|
{SPEC | 82, insspace}
|
|
|
|
,
|
|
|
|
{SPEC | 83, forwdel}
|
|
|
|
,
|
|
|
|
{SPEC | 115, backword}
|
|
|
|
,
|
|
|
|
{SPEC | 116, forwword}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if WORDPRO
|
2005-09-30 18:26:09 -04:00
|
|
|
{SPEC | 132, gotobop}
|
|
|
|
,
|
|
|
|
{SPEC | 118, gotoeop}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
{SPEC | 84, cbuf1}
|
|
|
|
,
|
|
|
|
{SPEC | 85, cbuf2}
|
|
|
|
,
|
|
|
|
{SPEC | 86, cbuf3}
|
|
|
|
,
|
|
|
|
{SPEC | 87, cbuf4}
|
|
|
|
,
|
|
|
|
{SPEC | 88, cbuf5}
|
|
|
|
,
|
|
|
|
{SPEC | 89, cbuf6}
|
|
|
|
,
|
|
|
|
{SPEC | 90, cbuf7}
|
|
|
|
,
|
|
|
|
{SPEC | 91, cbuf8}
|
|
|
|
,
|
|
|
|
{SPEC | 92, cbuf9}
|
|
|
|
,
|
|
|
|
{SPEC | 93, cbuf10}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#if PKCODE
|
2005-09-30 18:26:09 -04:00
|
|
|
{SPEC | 117, gotoeob}
|
|
|
|
,
|
|
|
|
{SPEC | 119, gotobob}
|
|
|
|
,
|
|
|
|
{SPEC | 141, gotobop}
|
|
|
|
,
|
|
|
|
{SPEC | 145, gotoeop}
|
|
|
|
,
|
|
|
|
{SPEC | 146, yank}
|
|
|
|
,
|
|
|
|
{SPEC | 147, killregion}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
#endif
|
|
|
|
#endif
|
|
|
|
|
|
|
|
#if VT220
|
2005-09-30 18:26:09 -04:00
|
|
|
{SPEC | '1', fisearch}
|
|
|
|
, /* VT220 keys */
|
|
|
|
{SPEC | '2', yank}
|
|
|
|
,
|
|
|
|
{SPEC | '3', killregion}
|
|
|
|
,
|
|
|
|
{SPEC | '4', setmark}
|
|
|
|
,
|
|
|
|
{SPEC | '5', backpage}
|
|
|
|
,
|
|
|
|
{SPEC | '6', forwpage}
|
|
|
|
,
|
|
|
|
{SPEC | 'A', backline}
|
|
|
|
,
|
|
|
|
{SPEC | 'B', forwline}
|
|
|
|
,
|
|
|
|
{SPEC | 'C', forwchar}
|
|
|
|
,
|
|
|
|
{SPEC | 'D', backchar}
|
|
|
|
,
|
|
|
|
{SPEC | 'c', meta}
|
|
|
|
,
|
|
|
|
{SPEC | 'd', backchar}
|
|
|
|
,
|
|
|
|
{SPEC | 'e', forwline}
|
|
|
|
,
|
|
|
|
{SPEC | 'f', gotobob}
|
|
|
|
,
|
|
|
|
{SPEC | 'h', help}
|
|
|
|
,
|
|
|
|
{SPEC | 'i', cex}
|
|
|
|
,
|
|
|
|
#endif
|
|
|
|
|
|
|
|
{0x7F, backdel}
|
|
|
|
,
|
2005-05-31 11:50:56 -04:00
|
|
|
|
|
|
|
/* special internal bindings */
|
2005-10-01 02:52:55 -04:00
|
|
|
{ SPEC | META | 'W', wrapword }, /* called on word wrap */
|
|
|
|
{ SPEC | META | 'C', nullproc }, /* every command input */
|
|
|
|
{ SPEC | META | 'R', nullproc }, /* on file read */
|
|
|
|
{ SPEC | META | 'X', nullproc }, /* on window change P.K. */
|
2005-05-31 11:50:56 -04:00
|
|
|
|
2005-09-30 18:26:09 -04:00
|
|
|
{0, NULL}
|
2005-05-31 11:50:56 -04:00
|
|
|
};
|