home *** CD-ROM | disk | FTP | other *** search
-
-
- Eric Gans
- French Dep't UCLA
- Los Angeles, CA 90024
- GKEY2.DOC v1.0
- 05/06/86
-
- After writing GKEY for the Kaypro 10, it seemed natural to
- adapt it for general use. Unfortunately, this involves not only
- some programming tricks but the sacrifice of some space in the
- TPA (=Transient Program Area, where programs are loaded).
-
- GKEY2 is a keyboard enhancement program that has a few
- decided advantages over SMARTKEY and other commercial programs.
-
- - takes less memory space, leaving more for programs
- - loads and responds faster
- - can save key files, clear current settings, or take itself
- out of memory without the need for an auxiliary program.
- - allows redefinition of escape sequences, thereby doubling
- the number of redefinable keys.
-
- This last feature was the deciding factor in writing the
- program. After some recent experience with MS-DOS, where
- keyboard enhancers have so much more to work with, I was struck
- by the poverty of programs that are limited to the standard ASCII
- set, most of which cannot be redefined without great
- inconvenience. GKEY2 allows the redefinition of <ESC> + any key,
- thereby adding 127 configurable combinations few of which are
- ever used by application software.
-
- The general structure of the program is similar to SMARTKEY,
- although it is much simpler (one might say, less sophisticated).
- To redefine a key, you use the "setup" key, originally defined as
- "|"; a "shift" key, originally defined as "\", allows you to use
- the original value of a redefined key. Unlike SMARTKEY, GKEY2
- lets you abort a redefinition by typing the shift key; you don't
- have to re-redefine. You can also reset a key by redefining it as
- nothing. GKEY2 can load and save key files, clear current
- settings, and remove itself from memory. (You need only enter
- the filename; the program will supply the .GK2.) A companion
- file, GK2SET, can read key files and current settings, and change
- the setup and switch keys in GKEY2; it also includes some help
- information. (Unlike FIXKEY, GK2SET does not require GKEY2 to be
- in memory at time of use.)
-
- GKEY2 Commands:
-
- To redefine a key:
- <setup> <key> [you will be prompted by "=" here] <new
- definition> <setup>
- Typing the shift key at any point will abort the
- redefinition.
-
- To produce the original value of a redefined key:
- <shift> <key>
-
- To load a key file:
- GKEY2 fn(.GK2)
- To save current settings in a file:
- GKEY2 fn(.GK2) $
- To remove GKEY2 from memory:
- GKEY2 -
- To clear current settings (leave GKEY2 in memory):
- GKEY2 #
-
- <ESC> + <key> is treated as a single key in these procedures. For
- example, the sequence: |<ESC>B(=)blurk| will define <ESC> B as
- blurk. (The "=" is a prompt added by the program, not typed by
- you.) To type a straight <ESC>, either use the shift key or just
- hit the <ESC> key twice.
-
- There are 512 bytes available for definitions, enough for nearly
- any conceivable use. If you get past the maximum you will get a
- beep while trying to redefine. Any single redefinition can
- contain as many as 256 characters.
-
- GKEY2's redefinitions are not cumulative: if you redefine B as
- blurk then if you redefine <ESC> 1 as BLURK you really get BLURK,
- not blurkLURK.
-
- Another simple but (I think) nice feature of GKEY2 is that it
- doesn't kill high bits used by some modified systems; it merely
- ignores them. (SMARTKEY won't work with the French Wordstar
- program my wife uses, for example.) GKEY2 doesn't tamper with
- the console ready (or CONSTAT) BIOS function, nor does it care
- about Warm Boots. It changes only the BIOS CONIN address to
- "translate" keys as they are typed and fixes a few addresses to
- protect the program in the TPA. (SMARTKEY uses the CONOUT
- function to check for the BDOS address after Warm Boots; GKEY2
- uses the -- less often used -- SELDSK function.)
-
- Technical notes: As opposed to GKEY, GKEY2 uses a 1-byte pointer
- to key definitions (which must therefore start at even bytes).
- This permits separate redefinition addresses for all 256 possible
- redefinitions in only 256 bytes.