w3m

Unnamed repository; edit this file to name it for gitweb.
git clone https://logand.com/git/w3m.git/
Log | Files | Refs | README

keybind.c (12311B)


      1 /* $Id$ */
      2 #include "funcname2.h"
      3 
      4 unsigned char GlobalKeymap[128] = {
      5     /*  C-@     C-a     C-b     C-c     C-d     C-e     C-f     C-g      */
      6 #ifdef __EMX__
      7     pcmap, linbeg, movL, nulcmd, nulcmd, linend, movR, curlno,
      8 #else
      9     _mark, linbeg, movL, nulcmd, nulcmd, linend, movR, curlno,
     10 #endif
     11     /*  C-h     C-i     C-j     C-k     C-l     C-m     C-n     C-o      */
     12     ldHist, nextA, followA, cooLst, rdrwSc, followA, movD, nulcmd,
     13     /*  C-p     C-q     C-r     C-s     C-t     C-u     C-v     C-w      */
     14     movU, closeT, isrchbak, isrchfor, tabA, prevA, pgFore, wrapToggle,
     15     /*  C-x     C-y     C-z     C-[     C-\     C-]     C-^     C-_      */
     16     nulcmd, nulcmd, susp, escmap, nulcmd, nulcmd, nulcmd, nulcmd,
     17     /*  SPC     !       "       #       $       %       &       '        */
     18     pgFore, execsh, reMark, pipesh, linend, nulcmd, nulcmd, nulcmd,
     19     /*  (       )       *       +       ,       -       .       /        */
     20     undoPos, redoPos, nulcmd, pgFore, col1L, pgBack, col1R, srchfor,
     21     /*  0       1       2       3       4       5       6       7        */
     22     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     23     /*  8       9       :       ;       <       =       >       ?        */
     24     nulcmd, nulcmd, chkURL, chkWORD, shiftl, pginfo, shiftr, srchbak,
     25     /*  @       A       B       C       D       E       F       G        */
     26     readsh, nulcmd, backBf, nulcmd, ldDL, editBf, rFrame, goLineL,
     27     /*  H       I       J       K       L       M       N       O        */
     28     ldhelp, followI, lup1, ldown1, linkLst, extbrz, srchprv, nulcmd,
     29     /*  P       Q       R       S       T       U       V       W        */
     30     nulcmd, quitfm, reload, svBuf, newT, goURL, ldfile, movLW,
     31     /*  X       Y       Z       [       \       ]       ^       _        */
     32     nulcmd, nulcmd, ctrCsrH, topA, nulcmd, lastA, linbeg, nulcmd,
     33     /*  `       a       b       c       d       e       f       g        */
     34     nulcmd, svA, pgBack, curURL, nulcmd, nulcmd, nulcmd, goLineF,
     35     /*  h       i       j       k       l       m       n       o        */
     36     movL, peekIMG, movD, movU, movR, msToggle, srchnxt, ldOpt,
     37     /*  p       q       r       s       t       u       v       w        */
     38     nulcmd, qquitfm, dispVer, selMn, nulcmd, peekURL, vwSrc, movRW,
     39     /*  x       y       z       {       |       }       ~       DEL      */
     40     nulcmd, nulcmd, ctrCsrV, prevT, pipeBuf, nextT, nulcmd, nulcmd,
     41 };
     42 
     43 unsigned char EscKeymap[128] = {
     44     /*  C-@     C-a     C-b     C-c     C-d     C-e     C-f     C-g      */
     45     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     46     /*  C-h     C-i     C-j     C-k     C-l     C-m     C-n     C-o      */
     47     nulcmd, prevA, svA, nulcmd, nulcmd, svA, nulcmd, nulcmd,
     48     /*  C-p     C-q     C-r     C-s     C-t     C-u     C-v     C-w      */
     49     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     50     /*  C-x     C-y     C-z     C-[     C-\     C-]     C-^     C-_      */
     51     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     52     /*  SPC     !       "       #       $       %       &       '        */
     53     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     54     /*  (       )       *       +       ,       -       .       /        */
     55     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     56     /*  0       1       2       3       4       5       6       7        */
     57     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     58     /*  8       9       :       ;       <       =       >       ?        */
     59     nulcmd, nulcmd, chkNMID, nulcmd, goLineF, nulcmd, goLineL, nulcmd,
     60     /*  @       A       B       C       D       E       F       G        */
     61     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     62     /*  H       I       J       K       L       M       N       O        */
     63     nulcmd, svI, nulcmd, nulcmd, nulcmd, linkbrz, nulcmd, escbmap,
     64     /*  P       Q       R       S       T       U       V       W        */
     65     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, dictwordat,
     66     /*  X       Y       Z       [       \       ]       ^       _        */
     67     nulcmd, nulcmd, nulcmd, escbmap, nulcmd, nulcmd, nulcmd, nulcmd,
     68     /*  `       a       b       c       d       e       f       g        */
     69     nulcmd, adBmark, ldBmark, execCmd, nulcmd, editScr, nulcmd, goLine,
     70     /*  h       i       j       k       l       m       n       o        */
     71     nulcmd, nulcmd, nulcmd, defKey, listMn, movlistMn, nextMk, setOpt,
     72     /*  p       q       r       s       t       u       v       w        */
     73     prevMk, nulcmd, nulcmd, svSrc, tabMn, gorURL, pgBack, dictword,
     74     /*  x       y       z       {       |       }       ~       DEL      */
     75     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     76 };
     77 
     78 unsigned char EscBKeymap[128] = {
     79     /*  C-@     C-a     C-b     C-c     C-d     C-e     C-f     C-g      */
     80     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     81     /*  C-h     C-i     C-j     C-k     C-l     C-m     C-n     C-o      */
     82     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     83     /*  C-p     C-q     C-r     C-s     C-t     C-u     C-v     C-w      */
     84     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     85     /*  C-x     C-y     C-z     C-[     C-\     C-]     C-^     C-_      */
     86     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     87     /*  SPC     !       "       #       $       %       &       '        */
     88     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     89     /*  (       )       *       +       ,       -       .       /        */
     90     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     91     /*  0       1       2       3       4       5       6       7        */
     92     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     93     /*  8       9       :       ;       <       =       >       ?        */
     94     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
     95     /*  @       A       B       C       D       E       F       G        */
     96     nulcmd, movU, movD, movR, movL, nulcmd, goLineL, pgFore,
     97     /*  H       I       J       K       L       M       N       O        */
     98     goLineF, pgBack, nulcmd, nulcmd, nulcmd, mouse, nulcmd, nulcmd,
     99     /*  P       Q       R       S       T       U       V       W        */
    100     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    101     /*  X       Y       Z       [       \       ]       ^       _        */
    102     nulcmd, nulcmd, prevA, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    103     /*  `       a       b       c       d       e       f       g        */
    104     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    105     /*  h       i       j       k       l       m       n       o        */
    106     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    107     /*  p       q       r       s       t       u       v       w        */
    108     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    109     /*  x       y       z       {       |       }       ~       DEL      */
    110     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    111 };
    112 
    113 unsigned char EscDKeymap[128] = {
    114     /*  0       1       INS     3       4       PgUp,   PgDn    7        */
    115     nulcmd, goLineF, mainMn, nulcmd, goLineL, pgBack, pgFore, nulcmd,
    116     /*  8       9       10      F1      F2      F3      F4      F5       */
    117     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    118     /*  16      F6      F7      F8      F9      F10     22      23       */
    119     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    120     /*  24      25      26      27      HELP    29      30      31       */
    121     nulcmd, nulcmd, nulcmd, nulcmd, mainMn, nulcmd, nulcmd, nulcmd,
    122 
    123     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    124     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    125     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    126     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    127 
    128     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    129     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    130     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    131     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    132 
    133     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    134     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    135     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    136     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,
    137 };
    138 
    139 #ifdef __EMX__
    140 unsigned char PcKeymap[256] = {
    141     //                        Null
    142     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//   0
    143     //                                                        S-Tab
    144     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, prevA,	//   8
    145     // A-q    A-w     A-E     A-r     A-t     A-y     A-u     A-i
    146     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  16
    147     // A-o    A-p     A-[     A-]                     A-a     A-s
    148     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  24
    149     // A-d    A-f     A-g     A-h     A-j     A-k     A-l     A-;
    150     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  32
    151     // A-'    A-'             A-\             A-x     A-c     A-v
    152     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  40
    153     // A-b    A-n     A-m     A-,     A-.     A-/             A-+
    154     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  48
    155     //                        F1      F2      F3      F4      F5
    156     nulcmd, nulcmd, nulcmd, ldhelp, nulcmd, qquitfm, nulcmd, nulcmd,	//  56
    157     // F6     F7      F8      F9      F10                     Home
    158     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, goLineF,	//  64
    159     // Up     PgUp    A-/     Left    5       Right   C-*     End
    160     movU, pgBack, nulcmd, movL, nulcmd, movR, nulcmd, goLineL,	//  72
    161     // Down   PgDn    Ins     Del     S-F1    S-F2    S-F3    S-F4
    162     movD, pgFore, mainMn, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  80
    163     // S-F5   S-F6    S-F7    S-F8    S-F9    S-F10   C-F1    C-F2
    164     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  88
    165     // C-F3   C-F4    C-F5    C-F6    C-F7    C-F8    C-F9    C-F10
    166     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	//  96
    167     // A-F1   A-F2    A-F3    A-F4    A-F5    A-F6    A-F7    A-F8
    168     nulcmd, nulcmd, nulcmd, qquitfm, nulcmd, nulcmd, nulcmd, nulcmd,	// 104
    169     // A-F9   A-F10   PrtSc   C-Left  C-Right C-End   C-PgDn  C-Home
    170     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 112
    171     // A-1    A-2     A-3     A-4     A-5     A-6     A-7/8   A-9
    172     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 120
    173     // A-0    A -     A-=             C-PgUp  F11     F12     S-F11
    174     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 128
    175     // S-F12  C-F11   C-F12   A-F11   A-F12   C-Up    C-/     C-5
    176     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 136
    177     // S-*    C-Down  C-Ins   C-Del   C-Tab   C -     C-+
    178     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 144
    179     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 152
    180     //                                A -     A-Tab   A-Enter
    181     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 160
    182     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 168
    183     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 176
    184     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 184
    185     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 192
    186     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 200
    187     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 208
    188     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 216
    189     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 224
    190     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 232
    191     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd,	// 240
    192     nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd, nulcmd	// 248
    193 };
    194 #endif