home *** CD-ROM | disk | FTP | other *** search
/ Source Code 1992 March / Source_Code_CD-ROM_Walnut_Creek_March_1992.iso / usenet / altsrcs / 1 / 1339 / README < prev   
Encoding:
Text File  |  1990-12-28  |  4.6 KB  |  133 lines

  1. ( To get best results when reading these files, use an option in your favourite
  2.   editor to expand a TAB to 4 SPACEs. E.g. in vi it is "set tabstop=4"
  3. )
  4.  
  5.  
  6. 1.) What do you have here?
  7.  
  8.     This is the README file for 'KEF'.
  9.     'KEF' is a library to help a program recognize function key hits from a
  10.     keyboard.
  11.     It can be used by all program that read characters immediately
  12.     when a key is hit.
  13.     KEF uses a simple database to identify sequences of characters
  14.     in the input and returns a user-selectable value for such a
  15.     sequence to the calling routines.
  16.  
  17.     You can easily see that KEF is not for people who only want to
  18.     write applications running under X with direct input from mouse
  19.     and keyboard. These people can use the translation mechanisms of
  20.     X to map event sequences to actions and be quite happy.
  21.  
  22.     But for all of us that have to deal with function keys, KEF
  23.     can be quite useful.
  24.  
  25.  
  26. 2.) Version
  27.  
  28.     Current version is 1.0 alpha.
  29.  
  30.     This version is not yet complete.
  31.     Missing :
  32.     - In the manuals (and probably some
  33.         other places there are references to part of the KEF library called
  34.         "kef-id". This part of the library is not part of the current release.
  35.     - For documentation there are only the manual pages. An article is
  36.         planned.
  37.     - There are only a few demo programs.
  38.  
  39.  
  40. 3.) Files
  41.  
  42.     You should have a lot of files in several directories. See MANIFEST
  43.     for a list of the files.
  44.  
  45.     The directories are:
  46.     kdb-low        : low level database routines
  47.     kdb-high    : high level database routines
  48.     kef            : low + high level routines to read from keyboard
  49.     demos        : some demonstration programs (not complete yet)
  50.     cfg            : some "config.sh" prototypes
  51.     
  52.     Some important files:
  53.     COPYING        : the terms of redistribution, usage, etc.
  54.     README        : you are reading it.
  55.     PORTING        : what to do when porting to a new machine.
  56.     kef.h        : global header file for KEF.
  57.  
  58.  
  59. 4.) How does KEF work?
  60.  
  61.     A function key is a key on the keyboard, whose pressing causes several
  62.     characters to be transmitted. For example the arrow keys typically send
  63.     a 2 or 3 character sequence. On my keyboard, "up arrow" sends "\E[A" where
  64.     "\E" stands for the ASCII character ESC (hex 1b).
  65.     
  66.     The KEF routines use a simple database to store strings and their
  67.     associated values and to retrieve values.
  68.     A program can enter a character sequence and an associated value
  69.     into the KEF database. When the sequence is seen in the input, the
  70.     KEF routines return the associated value.
  71.     In order to identify sequences that are prefixes of other sequences it
  72.     is possible to specify in milliseconds how long a KEF routine should
  73.     wait for one more character.
  74.     
  75.     It is possible to use KEF in programs that do not include the routines
  76.     malloc/realloc or free or that use routines named differently but
  77.     performing equally.
  78.  
  79.     KEF uses ultimately the routine "read" to get characters.
  80.     As the implentation of "read" may vary widely, the range of
  81.     possible operations has been kept relatively small. KEF uses
  82.     only operations that should be implementable on almost any
  83.     architecture and operating system that allows single character input.
  84.     Possible operations:
  85.     - try to read one or more characters
  86.         - block until a character is available
  87.         - wait at most for a certain time
  88.         - don't wait, don't block
  89.     - is a character available? Don't block.
  90.     All of these operations are interruptible. If they are interrupted,
  91.     they tell the calling routine about it.
  92.     To implement these operations one may have to use a couple of system
  93.     calls together, e.g. on 4.3BSD I use "select" to wait for characters
  94.     and "read" to actually fetch them.
  95.  
  96.     See the programs in directory "demos" for some sample runs.
  97.  
  98.  
  99. 5.) What about bugs?
  100.  
  101.     If you find bugs, tell me. If you fixed them or if you made an
  102.     extension which really is one, drop me a note.
  103.  
  104. 6.) Feedback
  105.  
  106.     If you like these routines or if you think something can be
  107.     added or improved write me a letter.
  108.  
  109. 7.) Status
  110.  
  111.     Read COPYING.
  112.  
  113. 8.) Author
  114.  
  115.            ___---~~~-_
  116.   ___---~~~     ___   ~-_
  117. |~     ___---~~~  |~-_--~|
  118. |~-_~~~-_ ___---~~~-_|__-'
  119. |  |~-_  ~-_         ~
  120. |  |   ~-_  ~-_           ___---~-_
  121. |  |  -_  ~-_  ~-___---~~~ ___---~|
  122. |  |  | ~-_  ~-_  ___---~~~       |
  123. |  |  |  | ~-_  |~      ___---~|  |
  124. |  |  |  |    ~-|_---~~~     | |  |       Michael T. Greim
  125. |  |  |  |          _--~-_   | |  |
  126. |  -_ |  |          |~-_  ~-_| |  |       e-mail : greim@cs.uni-sb.de
  127.  ~-_ ~-_~~-_        |_  ~-_  | |  |                uunet!unido!sbsvax!greim
  128.     ~-_ ~-_ ~-_       ~-___~-_ | _|       @-mail : Sudstr.22 D-6602 Dudweiler
  129.        ~-_ ~-_ ~-_---~~~___---~~~ |                West Germany
  130.           ~-_ ~-__---~~~   ___---~~
  131.              ~-_| ___---~~~       
  132.                 ~~  
  133.