home *** CD-ROM | disk | FTP | other *** search
- ( To get best results when reading these files, use an option in your favourite
- editor to expand a TAB to 4 SPACEs. E.g. in vi it is "set tabstop=4"
- )
-
-
- 1.) What do you have here?
-
- This is the README file for 'KEF'.
- 'KEF' is a library to help a program recognize function key hits from a
- keyboard.
- It can be used by all program that read characters immediately
- when a key is hit.
- KEF uses a simple database to identify sequences of characters
- in the input and returns a user-selectable value for such a
- sequence to the calling routines.
-
- You can easily see that KEF is not for people who only want to
- write applications running under X with direct input from mouse
- and keyboard. These people can use the translation mechanisms of
- X to map event sequences to actions and be quite happy.
-
- But for all of us that have to deal with function keys, KEF
- can be quite useful.
-
-
- 2.) Version
-
- Current version is 1.0 alpha.
-
- This version is not yet complete.
- Missing :
- - In the manuals (and probably some
- other places there are references to part of the KEF library called
- "kef-id". This part of the library is not part of the current release.
- - For documentation there are only the manual pages. An article is
- planned.
- - There are only a few demo programs.
-
-
- 3.) Files
-
- You should have a lot of files in several directories. See MANIFEST
- for a list of the files.
-
- The directories are:
- kdb-low : low level database routines
- kdb-high : high level database routines
- kef : low + high level routines to read from keyboard
- demos : some demonstration programs (not complete yet)
- cfg : some "config.sh" prototypes
-
- Some important files:
- COPYING : the terms of redistribution, usage, etc.
- README : you are reading it.
- PORTING : what to do when porting to a new machine.
- kef.h : global header file for KEF.
-
-
- 4.) How does KEF work?
-
- A function key is a key on the keyboard, whose pressing causes several
- characters to be transmitted. For example the arrow keys typically send
- a 2 or 3 character sequence. On my keyboard, "up arrow" sends "\E[A" where
- "\E" stands for the ASCII character ESC (hex 1b).
-
- The KEF routines use a simple database to store strings and their
- associated values and to retrieve values.
- A program can enter a character sequence and an associated value
- into the KEF database. When the sequence is seen in the input, the
- KEF routines return the associated value.
- In order to identify sequences that are prefixes of other sequences it
- is possible to specify in milliseconds how long a KEF routine should
- wait for one more character.
-
- It is possible to use KEF in programs that do not include the routines
- malloc/realloc or free or that use routines named differently but
- performing equally.
-
- KEF uses ultimately the routine "read" to get characters.
- As the implentation of "read" may vary widely, the range of
- possible operations has been kept relatively small. KEF uses
- only operations that should be implementable on almost any
- architecture and operating system that allows single character input.
- Possible operations:
- - try to read one or more characters
- - block until a character is available
- - wait at most for a certain time
- - don't wait, don't block
- - is a character available? Don't block.
- All of these operations are interruptible. If they are interrupted,
- they tell the calling routine about it.
- To implement these operations one may have to use a couple of system
- calls together, e.g. on 4.3BSD I use "select" to wait for characters
- and "read" to actually fetch them.
-
- See the programs in directory "demos" for some sample runs.
-
-
- 5.) What about bugs?
-
- If you find bugs, tell me. If you fixed them or if you made an
- extension which really is one, drop me a note.
-
- 6.) Feedback
-
- If you like these routines or if you think something can be
- added or improved write me a letter.
-
- 7.) Status
-
- Read COPYING.
-
- 8.) Author
-
- ___---~~~-_
- ___---~~~ ___ ~-_
- |~ ___---~~~ |~-_--~|
- |~-_~~~-_ ___---~~~-_|__-'
- | |~-_ ~-_ ~
- | | ~-_ ~-_ ___---~-_
- | | -_ ~-_ ~-___---~~~ ___---~|
- | | | ~-_ ~-_ ___---~~~ |
- | | | | ~-_ |~ ___---~| |
- | | | | ~-|_---~~~ | | | Michael T. Greim
- | | | | _--~-_ | | |
- | -_ | | |~-_ ~-_| | | e-mail : greim@cs.uni-sb.de
- ~-_ ~-_~~-_ |_ ~-_ | | | uunet!unido!sbsvax!greim
- ~-_ ~-_ ~-_ ~-___~-_ | _| @-mail : Sudstr.22 D-6602 Dudweiler
- ~-_ ~-_ ~-_---~~~___---~~~ | West Germany
- ~-_ ~-__---~~~ ___---~~
- ~-_| ___---~~~
- ~~
-