home *** CD-ROM | disk | FTP | other *** search
/ CP/M / CPM_CDROM.iso / cpm / utils / sysutl / egutil53.lbr / GKX.DZC / GKX.DOC
Text File  |  1988-07-12  |  9KB  |  221 lines

  1. Eric Gans
  2. French Dep't UCLA
  3. Los Angeles, CA 90024
  4.  
  5.                 GKX.DOC (Formerly GKEY2) v 3.90
  6.                             01/30/88
  7.  
  8. Version 3.90
  9.      Allows  reconfiguration  of ESC (trigger) key and  of  macro 
  10. buffer size.  (Suggested by Benjamin Cohen.)
  11.  
  12. Version 3.80
  13.      Adds  option  to  change keyboard port number  (in  GKXSET).  
  14. Fixes a bug in GKXS372.
  15.  
  16. Version 3.72
  17.      Adds  Kaypro-10 extensions,  append file command (+),  space 
  18. for  comments  in  GKX  files.   Renamed  files  to  GKX.COM  and 
  19. GKXSET.COM to avoid confusion.
  20.  
  21. Version 3.0
  22.      Uses ASCII files for macros.  GKX files can be edited with a 
  23. text editor.
  24.      Allows  reconfiguring  "highbit" keys (keypad and  arrow  or 
  25. function keys).   Captures BIOS CONSTAT to allow long key strings 
  26. in   Wordstar and other word processors.    Allows 1 K of  memory 
  27. for key storage.
  28.  
  29.                               * * *
  30.  
  31.      GKX  is  a  keyboard enhancement program that  has   several 
  32. decided advantages over SMARTKEY and other commercial programs.
  33.  
  34.      - special  extensions  for Kaypro 10  allow  undelete,  case 
  35. change  and  letter transpositions in Wordstar 3 and  other  word 
  36. processors (new in v3.72)
  37.      - stores macros in editable ASCII files (new in v3.0)
  38.      - takes less memory space, leaving more for programs
  39.      - loads and responds faster
  40.      - can save key files, clear current settings, or take itself 
  41. out of memory without the need for an auxiliary program
  42.      - allows redefinition of escape sequences,  thereby doubling 
  43. the number of redefinable keys
  44.  
  45.  This  last  feature  was the deciding  factor  in  writing  this 
  46. program.    After  some  experience with  MS-DOS,  where keyboard  
  47. enhancers  have so much more to work with,   I was struck by  the 
  48. poverty  of programs that are limited to the standard ASCII  set,   
  49. most    of    which   cannot   be   redefined    without    great 
  50. inconvenience.   GKX  allows the redefinition of <ESC> + any key, 
  51. thereby  adding  127 configurable combinations few of  which  are 
  52. ever used by application software.   If ESC is not convenient for 
  53. this purpose,  v3.9 allows you to change it to another key (e.g., 
  54. '~').
  55.  
  56.      The general structure of the program is similar to SMARTKEY, 
  57. although  it  is much simpler.  To redefine a key,  you  use  the 
  58. "setup" key, originally defined as "|"; a "shift" key, originally 
  59. defined  as  "\",  allows  you to use the  original  value  of  a 
  60. redefined   key.    Unlike  SMARTKEY,    GKX  lets  you  abort  a 
  61. redefinition  by  typing the shift key;  you don't  have  to  re-
  62. redefine.  You  can also reset a key by redefining it as nothing. 
  63. GKX can load and save key files,   clear current  settings,   and 
  64. remove  itself from memory.   (You need only enter the  filename; 
  65. the  program will supply the extension .GKX.)  A companion  file, 
  66. GKXSET, can read current settings and change the setup and switch 
  67. keys in GKX;   it also includes some help  information.   (Unlike 
  68. FIXKEY,   GKXSET does not require GKX to be in memory at time  of 
  69. use.)
  70.  
  71.      GKX Commands:
  72.  
  73. To redefine a key:
  74.      <setup>  <key>  [you  will be prompted  by  "="  here]  <new      
  75. definition> <setup>
  76.      Typing   the   shift  key  at  any  point  will  abort   the 
  77.      redefinition. 
  78.  
  79. To produce the original value of a redefined key:
  80.      <shift> <key>
  81.  
  82. To load a key file:
  83.      GKX fn(.GKX)
  84. To append a key file to current settings (duplicate keys will be 
  85. overwritten):
  86.      GKX fn(.GKX) + 
  87. To save current settings in a file:
  88.      GKX fn(.GKX) $
  89. To remove GKX from memory:
  90.      GKX -
  91. To clear current settings (leave GKX in memory):
  92.      GKX # 
  93.  
  94. <ESC> + <key> is treated as a single key in these procedures. For 
  95. example,  the sequence:  |<ESC>B(=)blurk| will define <ESC> B  as 
  96. blurk.  (The  "=" is a prompt added by the program,  not typed by 
  97. you.) To type a straight <ESC>,  either use the shift key or just 
  98. hit the <ESC> key twice.
  99.  
  100. Up to 1024 bytes (default) are available for definitions,  enough 
  101. for  nearly any conceivable use.  If you get past the maximum you 
  102. will   get  a  beep  while  trying  to  redefine.    Any   single 
  103. redefinition can contain as many as 255 characters.
  104.  
  105. GKX's   redefinitions are not cumulative:   if you redefine B  as 
  106. blurk then if you redefine <ESC> 1 as BLURK you really get BLURK, 
  107. not blurkLURK. 
  108.  
  109. Version   3 of GKX allows you to reconfigure high bit keys   like 
  110. the  Kaypro  keypad and arrows,  or function keys.   In order  to 
  111. allow  multi-character  strings  in  Wordstar  and  other   word-
  112. processors,   GKX  now sets the console ready (or CONSTAT)   BIOS 
  113. function  active during the playback of such strings.  It changes 
  114. the BIOS CONIN address to "translate" keys as they are typed  and 
  115. fixes  a  few  addresses  to  protect the  program  in  the  TPA. 
  116. (SMARTKEY uses the CONOUT function to check for the BDOS  address 
  117. after   Warm  Boots;   GKX uses the -- less often used  -- SELDSK 
  118. function.)
  119.  
  120.                         Reconfiguring GKX
  121.  
  122. The  following items may be changed in GKX v3.90:  the setup  key 
  123. (originally  '|');  the shift key (originally '\');  the keyboard 
  124. port number (originally 5);  the "trigger" key for the second set 
  125. of key redefinitions (originally ESC = 1bh);  and the size of the 
  126. macro  buffer  (originally 1024 bytes;  may be  set  to  anything 
  127. between 100H = 256 and 400H = 1024 bytes).   GKXSET allows you to 
  128. do  this without patching;  or if you prefer,  the bytes  may  be 
  129. found in the first sector of the file:
  130.  
  131. 102H 7C        '|'       = setup          
  132. 103H 5C        '\'       = shift
  133. 104H 05                  = keyboard port
  134. 105H 1B        ESCAPE    = trigger for second set of macros
  135. 106H 00 04     1024      = size of macro buffer
  136.  
  137.  
  138.                             GKX Files
  139.  
  140. GKX Version 3 uses ASCII key files to store macros.   This  means 
  141. that you can read these files on the screen and edit them with  a 
  142. text editor--a convenience borrowed from MS-DOS programs.  If you 
  143. save  the current settings in a file,  25 spaces are reserved for 
  144. comments for each redefine.
  145.  
  146. The format of key definitions is as follows:
  147.  
  148. char  [comment] =def
  149.  
  150. The character should be written as normally typed, except for the 
  151. following:
  152. <H>(char-80h)  for "high-bit" characters over 127 (80h)
  153. <E>char        for <ESC> + char   
  154. <E><H>char     for <ESC> + highbit
  155. ^char          for control characters
  156. #D             for <DELETE>
  157. #B (or ^H)     for Backspace
  158. #S             for <SPACE>
  159. #V             variable length input (until CR) 
  160. ##             for #
  161. (see below for Kaypro 10 extensions)
  162.  
  163. The same characters are used in the definitions,  except that the 
  164. <H> and <E> symbols are not permitted.
  165.  
  166. A  comment  may be placed between the defined key and  the  equal 
  167. sign.  The definition must follow the equal sign directly.   Each 
  168. definition  must   be   followed   by a  CRLF.    Spaces  may  be  
  169. included   in  the definitions,  but if a definition ends with  a 
  170. space you should use '#S'.  Maximum length is 255 characters.
  171.  
  172. The easiest way to get started is to define a few macros and save 
  173. the file; this will give you an idea of the file format (comments 
  174. cannot be saved in this manner).
  175.  
  176. *****************************************************************
  177.  
  178.                   !!! KAYPRO 10 Extensions !!!
  179.  
  180. If you have a Kaypro 10 with the standard BIOS you should be able 
  181. to  use the following extensions.   (If they won't work  on  your 
  182. system,  please let me know!)  They have been set up to work with 
  183. Wordstar  v3.3,  but  they  are  not specific  to  any  one  word 
  184. processor.
  185.  
  186. ***  If you DON'T have a Kaypro,  DON'T use these  characters  in 
  187. ***  your key files.   They depend on specific BIOS addresses and 
  188. ***  are guaranteed NOT to work on any other system!
  189.  
  190. The  enclosed  file  WS.GKX (sorry I forgot to  include  this  in 
  191. previous versions) gives examples of the possibilities of GKX for 
  192. undeletion,  case  toggles,  and  letter transposition (the  most 
  193. common editing features left out of WS 3).
  194.  
  195. #L        get line at cursor
  196. #R        restore saved line at cursor
  197. #W *      get word at cursor
  198. #I *      insert saved word at cursor
  199. #G        get letter at cursor
  200. #P        insert saved letter at cursor
  201. #C        toggle case (upper/lower) of letter at cursor
  202. #U **     change user number
  203. #H ***    delay to reset cursor position
  204.  
  205. *  Consecutive words saved at the same cursor position are  saved 
  206. cumulatively.   This  allows you move several words  in  the same 
  207. line by deleting them (in  WS  using  ^T),   then undeleting them 
  208. somewhere else.
  209.  
  210. ** You are prompted with '>'.  Enter the user number in HEX, that 
  211. is,   0 - 9,   and a - f for users 10 - 15.  The user number will 
  212. change immediately.   This is handly if you have fixed old WS  to 
  213. keep  its  overlays  in  a  single user area (using the   patches  
  214. WSUSER   or  WSUSR2)  and  want  to  edit  files   in   different  
  215. areas  without reloading.
  216.  
  217. ***   This   is  useful in WS for commands that make use  of  the  
  218. cursor position  after a change (see WS.GKX for  examples).    It 
  219. does  not  seem  to  be  necessary in VDE,   which  updates   the  
  220. cursor much faster.
  221.