home *** CD-ROM | disk | FTP | other *** search
/ vsiftp.vmssoftware.com / VSIPUBLIC@vsiftp.vmssoftware.com.tar / FREEWARE / FREEWARE40.ZIP / pine / pico / ebind.h < prev    next >
Encoding:
C/C++ Source or Header  |  1994-04-06  |  5.3 KB  |  188 lines

  1. /*
  2.  * $Id: ebind.h,v 4.3 1993/05/24 07:36:26 mikes Exp $
  3.  *
  4.  * Program:    Default key bindings
  5.  *
  6.  *
  7.  * Michael Seibel
  8.  * Networks and Distributed Computing
  9.  * Computing and Communications
  10.  * University of Washington
  11.  * Administration Builiding, AG-44
  12.  * Seattle, Washington, 98195, USA
  13.  * Internet: mikes@cac.washington.edu
  14.  *
  15.  * Please address all bugs and comments to "pine-bugs@cac.washington.edu"
  16.  *
  17.  * Copyright 1991-1993  University of Washington
  18.  *
  19.  *  Permission to use, copy, modify, and distribute this software and its
  20.  * documentation for any purpose and without fee to the University of
  21.  * Washington is hereby granted, provided that the above copyright notice
  22.  * appears in all copies and that both the above copyright notice and this
  23.  * permission notice appear in supporting documentation, and that the name
  24.  * of the University of Washington not be used in advertising or publicity
  25.  * pertaining to distribution of the software without specific, written
  26.  * prior permission.  This software is made available "as is", and
  27.  * THE UNIVERSITY OF WASHINGTON DISCLAIMS ALL WARRANTIES, EXPRESS OR IMPLIED,
  28.  * WITH REGARD TO THIS SOFTWARE, INCLUDING WITHOUT LIMITATION ALL IMPLIED
  29.  * WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE, AND IN
  30.  * NO EVENT SHALL THE UNIVERSITY OF WASHINGTON BE LIABLE FOR ANY SPECIAL,
  31.  * INDIRECT OR CONSEQUENTIAL DAMAGES OR ANY DAMAGES WHATSOEVER RESULTING FROM
  32.  * LOSS OF USE, DATA OR PROFITS, WHETHER IN AN ACTION OF CONTRACT, TORT
  33.  * (INCLUDING NEGLIGENCE) OR STRICT LIABILITY, ARISING OUT OF OR IN CONNECTION
  34.  * WITH THE USE OR PERFORMANCE OF THIS SOFTWARE.
  35.  *
  36.  * Pine and Pico are trademarks of the University of Washington.
  37.  * No commercial use of these trademarks may be made without prior
  38.  * written permission of the University of Washington.
  39.  *
  40.  *
  41.  * NOTES:
  42.  *
  43.  *    This files describes the key bindings for pico and the pine 
  44.  *      composer.  The binds are static, (i.e., no way for the user
  45.  *      to change them) so as to keep pico/composer as simple to use
  46.  *      as possible.  This, of course, means the number of functions is
  47.  *      greatly reduced, but, then again, this is seen as very desirable.
  48.  *
  49.  *      There are very limited number of flat ctrl-key bindings left, and 
  50.  *      most of them are slated for yet-to-be implemented functions, like
  51.  *      invoking an alternate editor in the composer and necessary funcs
  52.  *      for imlementing attachment handling.  We really want to avoid 
  53.  *      going to multiple keystroke functions. -mss
  54.  *
  55.  */
  56.  
  57. /*    EBIND:        Initial default key to function bindings for
  58.             MicroEMACS 3.2
  59.  
  60.             written by Dave G. Conroy
  61.             modified by Steve Wilhite, George Jones
  62.             greatly modified by Daniel Lawrence
  63. */
  64.  
  65. #ifndef    EBIND_H
  66. #define    EBIND_H
  67.  
  68.  
  69. /*
  70.  * Command table.
  71.  * This table  is *roughly* in ASCII order, left to right across the
  72.  * characters of the command. This expains the funny location of the
  73.  * control-X commands.
  74.  */
  75. /* ctrl|'T' moved to the top for easy overloading by toggle_language */
  76. KEYTAB  keytab[NBINDS] = {
  77.     {CTRL|'T',        spell},
  78.     {K_PAD_UP,        backline},
  79.     {K_PAD_DOWN,        forwline},
  80.     {K_PAD_RIGHT,        call_forwchar},
  81.     {K_PAD_LEFT,        call_backchar},
  82.     {K_PAD_PREVPAGE,    backpage},
  83.     {K_PAD_NEXTPAGE,    forwpage},
  84.     {K_PAD_HOME,        gotobol},
  85.     {K_PAD_END,        gotoeol},
  86.     {K_PAD_DELETE,        forwdel},
  87.     {CTRL|'A',        gotobol},
  88.     {CTRL|'B',        call_backchar},
  89.     {CTRL|'C',        abort_composer},
  90.     {CTRL|'D',        forwdel},
  91.     {CTRL|'E',        gotoeol},
  92.     {CTRL|'F',        call_forwchar},
  93.     {CTRL|'G',        whelp},
  94.     {CTRL|'H',        backdel},
  95.     {CTRL|'I',        tab},
  96.     {CTRL|'J',        fillpara},
  97.     {CTRL|'K',        killregion},
  98.     {CTRL|'L',        refresh},
  99.     {CTRL|'M',        newline},
  100.     {CTRL|'N',        forwline},
  101.     {CTRL|'O',        suspend_composer},
  102.     {CTRL|'P',        backline},
  103.     {CTRL|'R',        insfile},
  104.     {CTRL|'U',        yank},
  105.     {CTRL|'V',        forwpage},
  106.     {CTRL|'W',        forwsearch},
  107.     {CTRL|'X',        wquit},
  108.     {CTRL|'Y',        backpage},
  109. #ifdef    JOB_CONTROL
  110.     {CTRL|'Z',        bktoshell},
  111. #endif
  112.     {CTRL|'@',        forwword},
  113.     {CTRL|'^',        setmark},
  114. #ifdef    JOB_CONTROL
  115.     {CTRL|'_',        alt_editor},
  116. #endif
  117.     {0x7F,            backdel},
  118. #ifdef HEBREW
  119.     {META|'T',               toggle_ed},    
  120. #endif
  121.     {0,            NULL}
  122. };
  123.  
  124.  
  125. /*
  126.  * Command table.
  127.  * This table  is *roughly* in ASCII order, left to right across the
  128.  * characters of the command. This expains the funny location of the
  129.  * control-X commands.
  130.  */
  131. KEYTAB  pkeytab[NBINDS] = {
  132.     {CTRL|'T',        spell},
  133.     {K_PAD_UP,        backline},
  134.     {K_PAD_DOWN,        forwline},
  135.     {K_PAD_RIGHT,        call_forwchar},
  136.     {K_PAD_LEFT,        call_backchar},
  137.     {K_PAD_PREVPAGE,    backpage},
  138.     {K_PAD_NEXTPAGE,    forwpage},
  139.     {K_PAD_HOME,        gotobol},
  140.     {K_PAD_END,        gotoeol},
  141.     {K_PAD_DELETE,        forwdel},
  142.     {CTRL|'A',        gotobol},
  143.     {CTRL|'B',        call_backchar},
  144.     {CTRL|'C',        showcpos},
  145.     {CTRL|'D',        forwdel},
  146.     {CTRL|'E',        gotoeol},
  147.     {CTRL|'F',        call_forwchar},
  148.     {CTRL|'G',        whelp},
  149.     {CTRL|'H',        backdel},
  150.     {CTRL|'I',        tab},
  151.     {CTRL|'J',        fillpara},
  152. #ifdef    ONLYWHILETESTING
  153.     {CTRL|'K',        killtext},
  154. #else
  155.     {CTRL|'K',        killregion},
  156. #endif
  157.     {CTRL|'L',        refresh},
  158.     {CTRL|'M',        newline},
  159.     {CTRL|'N',        forwline},
  160.     {CTRL|'O',        filewrite},
  161.     {CTRL|'P',        backline},
  162.     {CTRL|'R',        insfile},
  163.     {CTRL|'U',        yank},
  164.     {CTRL|'V',        forwpage},
  165.     {CTRL|'W',        forwsearch},
  166.     {CTRL|'X',        wquit},
  167.     {CTRL|'Y',        backpage},
  168. #ifdef    JOB_CONTROL
  169.     {CTRL|'Z',        bktoshell},
  170. #endif
  171.     {CTRL|'@',        forwword},
  172.     {CTRL|'^',        setmark},
  173.     {0x7F,            backdel},
  174. #ifdef HEBREW
  175.     {META|'T',               toggle_ed},    
  176. #endif
  177.     {0,            NULL}
  178. };
  179. #ifdef HEBREW
  180. char escfuns[]="T";
  181. #endif
  182.  
  183. #endif    /* EBIND_H */
  184.  
  185.  
  186.  
  187.  
  188.