home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / lambda / soundpot / f / gkey2.lbr / GKEY2.DZC / GKEY2.DOC
Encoding:
Text File  |  1993-10-26  |  4.4 KB  |  97 lines

  1.    
  2.  
  3. Eric Gans
  4. French Dep't UCLA
  5. Los Angeles, CA 90024
  6.                          GKEY2.DOC v1.0
  7.                             05/06/86
  8.  
  9.      After  writing GKEY for the Kaypro 10,  it seemed natural to 
  10. adapt it for general use.   Unfortunately, this involves not only 
  11. some  programming tricks but the sacrifice of some space  in  the 
  12. TPA (=Transient Program Area, where programs are loaded).
  13.  
  14.      GKEY2  is  a  keyboard enhancement program that  has  a  few 
  15. decided advantages over SMARTKEY and other commercial programs.
  16.  
  17.      - takes less memory space, leaving more for programs
  18.      - loads and responds faster
  19.      - can save key files, clear current settings, or take itself 
  20. out of memory without the need for an auxiliary program. 
  21.      - allows redefinition of escape sequences,  thereby doubling 
  22. the number of redefinable keys.
  23.  
  24.      This  last  feature was the deciding factor in  writing  the 
  25. program.    After  some  recent  experience  with  MS-DOS,  where 
  26. keyboard enhancers have so much more to work with,  I was  struck 
  27. by the poverty of programs that are limited to the standard ASCII 
  28. set,   most   of   which  cannot  be  redefined   without   great 
  29. inconvenience.  GKEY2 allows the redefinition of <ESC> + any key, 
  30. thereby  adding  127 configurable combinations few of  which  are 
  31. ever used by application software.
  32.  
  33.      The general structure of the program is similar to SMARTKEY, 
  34. although it is much simpler (one might say,  less sophisticated).  
  35. To redefine a key, you use the "setup" key, originally defined as 
  36. "|";  a "shift" key, originally defined as "\", allows you to use 
  37. the  original value of a redefined key.  Unlike  SMARTKEY,  GKEY2 
  38. lets you abort a redefinition by typing the shift key;  you don't 
  39. have to re-redefine. You can also reset a key by redefining it as 
  40. nothing.   GKEY2  can  load and save  key  files,  clear  current 
  41. settings,   and  remove itself from memory.  (You need only enter 
  42. the  filename;  the  program will supply the .GK2.)  A  companion 
  43. file, GK2SET, can read key files and current settings, and change 
  44. the  setup and switch keys in GKEY2;  it also includes some  help 
  45. information.  (Unlike FIXKEY, GK2SET does not require GKEY2 to be 
  46. in memory at time of use.)
  47.  
  48.      GKEY2 Commands:
  49.  
  50. To redefine a key:
  51.      <setup>  <key>  [you  will be prompted  by  "="  here]  <new      
  52. definition> <setup>
  53.      Typing   the   shift  key  at  any  point  will  abort   the 
  54.      redefinition. 
  55.  
  56. To produce the original value of a redefined key:
  57.      <shift> <key>
  58.  
  59. To load a key file:
  60.      GKEY2 fn(.GK2)
  61. To save current settings in a file:
  62.      GKEY2 fn(.GK2) $
  63. To remove GKEY2 from memory:
  64.      GKEY2 -
  65. To clear current settings (leave GKEY2 in memory):
  66.      GKEY2 # 
  67.  
  68. <ESC> + <key> is treated as a single key in these procedures. For 
  69. example,  the sequence:  |<ESC>B(=)blurk| will define <ESC> B  as 
  70. blurk.  (The  "=" is a prompt added by the program,  not typed by 
  71. you.) To type a straight <ESC>,  either use the shift key or just 
  72. hit the <ESC> key twice.
  73.  
  74. There are 512 bytes available for definitions,  enough for nearly 
  75. any conceivable use.  If you get past the maximum you will get  a 
  76. beep  while  trying  to redefine.  Any  single  redefinition  can 
  77. contain as many as 256 characters.
  78.  
  79. GKEY2's  redefinitions are not cumulative:  if you redefine B  as 
  80. blurk then if you redefine <ESC> 1 as BLURK you really get BLURK, 
  81. not blurkLURK. 
  82.  
  83. Another  simple  but (I think) nice feature of GKEY2 is  that  it 
  84. doesn't  kill high bits used by some modified systems;  it merely 
  85. ignores  them.  (SMARTKEY  won't work with  the  French  Wordstar 
  86. program  my wife uses,  for example.)  GKEY2 doesn't tamper  with 
  87. the  console ready (or CONSTAT) BIOS function,  nor does it  care 
  88. about  Warm  Boots.  It  changes only the BIOS CONIN  address  to 
  89. "translate"  keys as they are typed and fixes a few addresses  to 
  90. protect  the  program  in the TPA.   (SMARTKEY  uses  the  CONOUT 
  91. function  to check for the BDOS address after Warm  Boots;  GKEY2 
  92. uses the -- less often used -- SELDSK function.)
  93.  
  94. Technical notes:  As opposed to GKEY, GKEY2 uses a 1-byte pointer 
  95. to  key  definitions (which must therefore start at even  bytes). 
  96. This permits separate redefinition addresses for all 256 possible 
  97. redefinitions in only 256 bytes.