home *** CD-ROM | disk | FTP | other *** search
/ Phoenix CD 2.0 / Phoenix_CD.cdr / 24b / keyboard.zip / NEWKEY.DOC < prev    next >
Text File  |  1985-03-18  |  43KB  |  1,140 lines

  1.  
  2.  
  3.  
  4.  
  5.  
  6.  
  7.  
  8.  
  9.  
  10.  
  11.  
  12.  
  13.  
  14.  
  15.                               NEWKEY
  16.  
  17.                      A Keyboard Enhancer for
  18.                     The IBM Personal Computer
  19.  
  20.                            Version 1.1
  21.  
  22.  
  23.  
  24.  
  25.  
  26.                  (C)Copyright Frank A. Bell, 1984
  27.                        All rights reserved.
  28.  
  29.  
  30.  
  31.  
  32.  
  33.  
  34.  
  35.  
  36.  
  37.  
  38.  
  39.  
  40.  
  41.  
  42.  
  43.  
  44.  
  45. Frank A. Bell
  46. 20950 Smallwood
  47. Birmingham, MI 48010
  48. .pa
  49. TABLE OF CONTENTS
  50.  
  51.     INTRODUCTION ............................................. 1
  52.     GETTING STARTED........................................... 2
  53.       LOADING NEWKEY.......................................... 2
  54.         Newkey Parameters..................................... 2
  55.       DEFINING A KEY.......................................... 3
  56.         Space Considerations.................................. 3
  57.         Backspace Handling.................................... 4
  58.     SPECIAL KEY DEFINITION FEATURES........................... 4
  59.       NESTED KEY TRANSLATION.................................. 4
  60.         Recursion............................................. 4
  61.       TRANSLATION BYPASS...................................... 5
  62.       VARIABLE LENGTH FILL-IN-THE-BLANKS...................... 5
  63.       FIXED LENGTH FILL-IN-THE-BLANKS......................... 6
  64.     SPECIAL FEATURES.......................................... 7
  65.       SWITCHING NEWKEY OFF/ON................................. 7
  66.       TRANSLATION BYPASS...................................... 7
  67.     NEWKEY1 OVERVIEW.......................................... 8
  68.       INVOKING NEWKEY1........................................ 8
  69.     NEWKEY1 FUNCTIONS......................................... 8
  70.       DISPLAY DIRECTORY (/d).................................. 8
  71.       DISPLAY TRANSLATION OF KEY (/k)......................... 8
  72.       SAVE FILE (filename.ext/s).............................. 8
  73.       LOAD FILE (filename.ext/l).............................. 9
  74.         Special note to DOS 2.0 users......................... 9
  75.       MERGE FILE (filename.ext/m or filename.ext/m/o).........10
  76.       CLEAR CURRENT KEY DEFINITIONS (/c)......................10
  77.       SWITCH STATUS (/t)......................................10
  78.       UNLOAD AND RECLAIM MEMORY (DOS 1.1 only) (/u)...........10
  79.     MODIFYING NEWKEY..........................................11
  80.       MODIFICATIONS...........................................11
  81.       FIELDS WHICH MAY BE MODIFIED............................12
  82.     DESCRIPTION OF KEY TRANSLATION DISPLAY....................13
  83.     SAMPLE KEY DEFINITION FILES...............................14
  84.       ASM.KEY.................................................14
  85.       DVORAK.KEY..............................................14
  86.       TEST.KEY................................................14
  87.       WS.KEY..................................................15
  88.       GENERAL DOS KEYS COMMON TO MOST SAMPLE FILES............16
  89.     INFORMATION ABOUT THE FILES ON THE NEWKEY DISK............16 
  90.     NEWKEY OVERVIEW...........................................17
  91.       NEWKEY REQUIREMENTS.....................................17
  92.       HOW DOES NEWKEY WORK?...................................17
  93.       NEWKEY'S LIMITATIONS....................................17
  94.     TIPS ON USING NEWKEY......................................18
  95.       USE YOUR AUTOEXEC.BAT FILE..............................18
  96.       SETTING THE DYNAMIC DEFINE AREA SIZE PARAMETER..........18
  97.       DO NOT FORGET TO SAVE YOUR KEY DEFINITIONS..............18
  98.       COMBINING KEY DEFINITION FILES..........................19
  99.       MULTIPLE KEY DEFINITION FILES...........................19
  100.     DISCLAIMER................................................20
  101.     PERMISSION TO COPY........................................20
  102.     THE USER-SUPPORTED CONCEPT................................21 
  103.     PROBLEMS, SUGGESTIONS, ETC................................21 
  104. .pa
  105.                        NEWKEY INTRODUCTION
  106.  
  107. PURPOSE
  108.      
  109.      The Newkey keyboard enhancer simplifies the entry of common 
  110. keystroke sequences by allowing these sequences to be assigned to 
  111. any key desired.  Once assigned to a particular key, whenever that 
  112. key is struck the predefined sequence of keystrokes will be 
  113. returned in place of the struck key.  For example, the alt C key 
  114. might be defined as 'copy' and whenever alt C is struck the string 
  115. 'copy' will be returned. 
  116.  
  117.      Newkey allows customization of software packages, ready 
  118. creation of boiler plate passages, keyboard redefinition and 
  119. other useful purposes.  Several sample key definition files are 
  120. included with Newkey and will be described later. 
  121.  
  122.   Newkey provides many key translation features including:
  123.  
  124.   -  Ability to define any key
  125.  
  126.   -  Variable length "pauses" during key translation
  127.  
  128.   -  Fixed length "pauses" during key translation
  129.  
  130.   -  Nested key translation 
  131.  
  132.   -  Translation bypass for native entry of defined key
  133.  
  134.   -  User defined dynamic define area length
  135.  
  136.  
  137.      Newkey1, the Newkey support program, provides many functions 
  138. including:
  139.  
  140.   -  Saving key definitions on disk
  141.  
  142.   -  Loading key definitions from disk
  143.  
  144.   -  Merging key definitions from disk
  145.  
  146.   -  Directory display of keys with translations
  147.  
  148.   -  Individual display of key translations
  149.  
  150.   -  Newkey on/off switch
  151.  
  152.   -  Clear current key definitions
  153.  
  154.   -  Unload and reclaim memory (DOS 1.1 only)
  155. .pa
  156.                          GETTING STARTED
  157.  
  158.  
  159. LOADING NEWKEY
  160.  
  161. To load newkey type
  162.  
  163.     newkey [/parameters]
  164.  
  165. and press the enter key.  Within a second or two a full screen 
  166. will be displayed with the message;
  167.  
  168.     NEWKEY loaded
  169.  
  170. at the bottom.
  171.  
  172.      When you have received this message Newkey has been loaded.  
  173. At this stage Newkey is ready to use.  You may wish to load a 
  174. predefined set of key translations.  To do this refer to the 
  175. 'Load File' section.
  176.  
  177.  
  178. Newkey Parameters (optional)
  179.  
  180. Function:  Change dynamic define area length.  
  181.  
  182.      Newkey comes with a default dynamic define area length which 
  183. will accept up to 300 characters of new key definitions.  This 
  184. default may be changed at run time by specifying the parameter 
  185. '/xxxxx' when first invoking Newkey.  
  186.  
  187.      'xxxxx' is up to a 5 digit number specifying the number of 
  188. characters which Newkey will reserve for the dynamic define area.  
  189. Newkey will reserve twice this number of bytes in memory (each 
  190. character requires two bytes). 
  191.  
  192.      For example:
  193.  
  194.     newkey /500
  195.  
  196. will reserve enough space for 500 characters of translation (1000 
  197. bytes of storage.)  This parameter is especially valuable to DOS 
  198. 2.0 users as described in the 'LOAD FILE' section in the 'NEWKEY1 
  199. OVERVIEW'.
  200.  
  201.      The legal range for this number is 5 - 13,500. 
  202.  
  203. .pa
  204. DEFINING A KEY
  205.  
  206.      To define a key follow these steps:
  207.  
  208. 1.  Press the alt = key.  
  209.  
  210. This will cause the cursor to take on a  block shape.  As long as 
  211. you are in key definition mode the cursor will retain some sort of 
  212. block shape.
  213.  
  214. 2.  Press the key you wish to define.  
  215.  
  216. Although it will appear to you as if nothing has happened, Newkey 
  217. will assume that this is the key to  be defined.
  218.  
  219. 3.  Now enter the keystrokes you want the key to represent.  
  220.  
  221. The  system will continue to act on these keystrokes as if key 
  222. definition was not  occurring.  This enables you to monitor the 
  223. key definition to ensure that you are actually creating a 
  224. translation that will do what you wish.
  225.  
  226. 4.  When you have finished redefining the key press the alt = 
  227. key again.  
  228.  
  229. The cursor will take on its normal shape and key definition is 
  230. done.  Unless saved in a disk file ('Saving Key Definitions'), the 
  231. new key translation will be lost when the system is rebooted.
  232.  
  233.      For example, to define alt c as 'copy' follow these steps:
  234.  
  235.      1.  Press alt =, the cursor will change to block form.
  236.      2.  Press alt c, the key you wish to define.
  237.      3.  Type in 'copy'.
  238.      4.  Press alt =, the cursor will change back to its normal 
  239.          shape.
  240.  
  241.      Now press alt c and watch 'copy' be returned.
  242.  
  243.      To undefine a key, merely define it without a definition 
  244. (alt =, key, alt =).
  245.  
  246.  
  247. Space Considerations
  248.  
  249.      Newkey comes with enough translation space for 300 characters.
  250. If new key definitions total more than 300 characters in a 
  251. session, Newkey will display this message in reverse video:
  252.  
  253.    *OUT OF MEMORY FOR DYNAMIC DEFINING - PRESS ESC TO CONTINUE*    
  254.  
  255. If you receive this message all further new key definition will be 
  256. halted including the one you are in the middle of doing.  At this 
  257. point the only way to get new key definition space is to save the 
  258. current key definitions and then reload them.  This will 
  259. reinitialize the 300 free spaces for further key definition (DOS 
  260. 1.1 only, DOS 2.0 users will need to increase the size of the 
  261. dynamic define area.  Please refer to the special note in the 
  262. 'LOAD FILE' section in the Newkey1 Overview.)
  263.  
  264.      Should you wish to have more than 300 free spaces at the 
  265. beginning of the session refer to the parameters section in 
  266. 'LOADING NEWKEY'.  
  267.  
  268. Backspace handling
  269.  
  270.      During key definition, Newkey treats the back cursor key as a 
  271. back space and delete.  This allows you to make correct a mistake 
  272. during key definition without the correction becoming part of the 
  273. key definition.  
  274.    
  275.  
  276.                  SPECIAL KEY DEFINITION FEATURES
  277.  
  278.      Many of these features are illustrated in the key definition 
  279. file, TEST.KEY described later.
  280.  
  281.  
  282. NESTED KEY TRANSLATION 
  283.      
  284.      Newkey will translate keys within key definitions down to 8 
  285. levels.  For example, assume the following keys have been 
  286. defined as follows:
  287.  
  288.        alt 1 = level 1 alt 2
  289.        alt 2 = level 2 alt 3
  290.        alt 3 = level 3 alt 4
  291.        alt 4 = level 4 alt 5
  292.        alt 5 = level 5 alt 6
  293.        alt 6 = level 6 alt 7 
  294.        alt 7 = level 7 alt 8
  295.        alt 8 = level 8 alt 9
  296.        alt 9 = level 9 alt 0
  297.  
  298. When alt 1 is pressed, Newkey will check each character returned 
  299. ('L', 'e', 'v', 'e ', 'l',' ','1','alt 2') to see if they too have 
  300. been defined and if so, will return their translation.  Newkey 
  301. will find that alt 2 has been defined and will check its 
  302. definition for further translation to a depth of 8 levels.  At the 
  303. eighth level Newkey stops checking and returns that translation 
  304. without further checking.  So in this case, Newkey will return 
  305. 'level 1level 2level 3level 4level 5level 6level 7level 8alt 9'.  
  306. Translation continues to the eight level before it stops.
  307.  
  308. Recursion
  309.  
  310.      If at any time newkey detects a recursive loop which would 
  311. result in an infinite translation loop (a=b, b=c, c=a for example) 
  312. it will display the following message in reverse video:
  313.  
  314.   RECURSION DETECTED - TRANSLATION ENDED - PRESS ESC TO CONTINUE
  315.  
  316. Press the ESC key to continue.  The key at which recursion was 
  317. detected will be returned untranslated.
  318.  
  319.  
  320. TRANSLATION BYPASS
  321.  
  322.      Newkey provides the ability to prevent further translation 
  323. within a key definition.  If you have a character you wish to be 
  324. returned without any further translation follow these steps:
  325.  
  326.      1.  Before entering the key, press ctrl 2.
  327.      2.  Press the key you wish to always be returned.
  328.  
  329. When Newkey encounters this key at this spot within the key 
  330. definition it will return it without further translation even if 
  331. the key is defined in the key definition file.  For example, 
  332. suppose you wished to define a key to be 'ctrl k ctrl d' but 
  333. ctrl k was already defined as 'ctrl k ctrl q'.  Follow these 
  334. steps:
  335.  
  336.      1. Press alt = to start key definition.
  337.      2. Press alt k, the key you wish to define.
  338.      3. Press ctrl 2 to signal that the next key is not to be 
  339.      translated.
  340.      4. Press ctrl k, the key you wish to be returned.
  341.      5. Press ctrl d
  342.      6. Press alt = to end key definition.
  343.  
  344. Now when you press alt k, ctrl k, not 'ctrl k ctrl q', plus ctrl d 
  345. will be returned.  The no translate key only affects the next key 
  346. entered.  To prevent translation of subsequent keys it will be 
  347. necessary to press the no translate key before entering each of 
  348. them.
  349.  
  350.      Ctrl 2 may be changed to whatever you desire.  Please refer 
  351. to the section 'Modifying Newkey'.
  352.  
  353.  
  354. VARIABLE LENGTH FILL-IN-THE-BLANKS
  355.  
  356.      Newkey provides you with the ability to define variable 
  357. length fill-in-the-blanks fields within key translations.  When 
  358. one of these is encountered in a key translation, Newkey will stop 
  359. translation and wait for the user to enter any keystrokes he 
  360. wishes.  Newkey will continue to accept keystrokes until the 
  361. return key is pressed when normal translation will continue.  To 
  362. define a variable length fill-in-the-blanks field follow these 
  363. steps:
  364.  
  365.      1.  Press alt -.  The cursor will change from a full block to 
  366. half block with its bottom missing.
  367.  
  368.      2.  Enter whatever keystrokes you wish.
  369.  
  370.      3.  Press alt -.  The cursor will change back to a full block.
  371.  
  372.      For example, suppose you frequently started a letter with 'My 
  373. dear John (Frank, Susan, etc.) it is now time' you might wish to 
  374. define one key to mean 'My dear xxxxxx it is now time.'  To do 
  375. this you would follow these steps: 
  376.  
  377.      1.  Press alt = to start key definition.
  378.      2.  Press alt l, the key you wish to define.
  379.      3.  Type 'My dear '.
  380.      4.  Press alt - to start variable length field definition.
  381.      5.  Type in any name, although it is not necessary to the 
  382.          working of the key definition.
  383.      6.  Press alt - to end variable length field definition.
  384.      7.  Type in ' it is now time'.
  385.      8.  Press alt = to end key definition.
  386.  
  387. Now if you were to press alt l, 'My dear ' would be displayed and 
  388. the system would wait for you to enter a name.  Once you had 
  389. entered a name and pressed the return key the system would 
  390. continue with ' now is the time'.
  391.  
  392.      Alt - and the return key as terminator may be changed to 
  393. whatever you desire.  Please refer to the section 'Modifying 
  394. Newkey'.
  395.  
  396.  
  397. FIXED LENGTH FILL-IN-THE-BLANKS
  398.  
  399.      Newkey provides you with the ability to define fixed length 
  400. fill-in-the-blanks fields within key translations.  When one of 
  401. these is encountered in a key translation, Newkey will stop 
  402. translation and wait for the user to enter a predefined number of 
  403. keystrokes.   Newkey will accept keystrokes until the predefined 
  404. number is reached when normal translation will continue.  To 
  405. define a fixed length fill-in-the-blanks field follow these 
  406. steps:
  407.  
  408.      1.  Press ctrl -.  The cursor will change from a full block to 
  409. half block with its top missing.
  410.  
  411.      2.  Enter whatever keystrokes you wish.
  412.  
  413.      3.  Press ctrl -.  The cursor will change back to a full block.
  414.  
  415.      For example, suppose you frequently started a letter with 
  416. 'Enclosed are the xx (some number) items per your request' you 
  417. might wish to define one key to mean 'Enclosed are the xx items 
  418. per your request.'  To do this you would follow these steps: 
  419.  
  420.      1.  Press alt = to start key definition.
  421.      2.  Press alt l, the key you wish to define.
  422.      3.  Type 'Enclosed are the '.
  423.      4.  Press ctrl - to start fixed length field definition.
  424.      5.  Type in any two digit number. 
  425.      6.  Press ctrl - to end fixed length field definition.
  426.      7.  Type in ' items per your request'.
  427.      8.  Press alt = to end key definition.
  428.  
  429. Now if you were to press alt l, 'Enclosed are the 'would be 
  430. displayed and the system would wait for you to enter any two 
  431. characters.  Once you had entered the second character the system 
  432. would continue with ' items per your request.' 
  433.  
  434.      Ctrl - may be changed to whatever you desire.  Please refer to 
  435. the section 'Modifying Newkey'.
  436.  
  437.  
  438. SPECIAL NEWKEY FEATURES
  439.  
  440. Switching newkey off/on - CTRL 6
  441.  
  442.      Newkey may be deactivated/activated by pressing ctrl 6.  This 
  443. acts as a toggle switching Newkey from one status to another.  
  444. When deactivated Newkey is still resident in memory but it will 
  445. act as if the normal keyboard interrupt is in control.
  446.  
  447. Translation bypass - CTRL 2
  448.  
  449.      Key translation may be bypassed by pressing ctrl 2 followed 
  450. by the key desired.  This is the same procedure used to enter a no 
  451. translate key during key definition.
  452. .pa
  453.                          NEWKEY1 OVERVIEW
  454.  
  455.  
  456.      Newkey1 provides many features to complement Newkey functions.
  457.  
  458.  
  459. INVOKING NEWKEY1
  460.  
  461.      Newkey1 may be invoked in one of two ways:
  462.  
  463.      1.  Type Newkey1, press enter and a menu of options will be 
  464. displayed. 
  465.  
  466.      2.  Type Newkey1 plus a parameter and Newkey1 will perform 
  467. the requested function and return to DOS.  This option is 
  468. particularly useful in a batch file invoked at system 
  469. initialization.
  470.  
  471.  
  472.                         NEWKEY1 FUNCTIONS
  473.  
  474. DISPLAY DIRECTORY (/d)
  475.  
  476.      Select function #1 on the menu screen or else type in 
  477. 'newkey1 /d' and press enter.  Newkey1 will display a directory of 
  478. all keys that have been defined.
  479.  
  480.  
  481. DISPLAY TRANSLATION OF KEY (/k)
  482.  
  483.      Select function #2 on the menu screen or else type in 
  484. 'newkey1 /k' and press enter.  Newkey1 will display a screen 
  485. requesting you to enter the key you wish translated.  If the key 
  486. has been defined to Newkey its translation will be displayed.  
  487. The translation will be one character every five spaces and its 
  488. end will be marked by a string of 'FFFF'.  Each character will be 
  489. described by a string 1 to 4 characters in length.  For more 
  490. information refer to 'Description of key translation display'.
  491.  
  492.  
  493. SAVE FILE (filename.ext/s)
  494.  
  495.      Select function #3 on the menu screen or else type in 
  496. 'newkey1 file.key/s' and press enter.  'file.key' is the name of 
  497. the key definition file in which you wish to save your current key 
  498. definitions.  It may be any legal file name.  If you select 
  499. function #3, another screen will be displayed requesting a file 
  500. name.  This function will save your current key definitions from 
  501. memory in a disk file which may later be reloaded by Newkey1 into 
  502. memory again.
  503.  
  504. .pa
  505. LOAD FILE (filename.ext/l)
  506.  
  507.      Select function #4 on the menu screen or else type in 
  508. 'newkey1 file.key/l' and press enter.  'file.key' is the name of 
  509. the key definition file you wish to load into memory.  If you 
  510. select function #4, another screen will be displayed requesting a 
  511. file name.  This function will load the key definitions from a 
  512. disk file into memory where they can be used by Newkey.  Any 
  513. previous key definitions in memory will be wiped out.
  514.  
  515.    *** SPECIAL NOTE TO DOS 2.0 USERS ***
  516.  
  517.      When I wrote the bulk of Newkey only DOS 1.1 was out and I 
  518. made some basic design decisions designed to use a minimum amount 
  519. of memory.  One of these decisions involved loading the key 
  520. definition file from a program external to the resident portion of 
  521. Newkey and loading it right on top of the resident portion in 
  522. contiguous storage.  Naturally this works fine under DOS 1.1 but 
  523. not DOS 2.0.
  524.  
  525.      DOS 2.0 places a piece of storage after each piece of storage 
  526. made resident.  It uses this to check for storage corruption, 
  527. however it prevents the key definition file from being loaded on 
  528. top of Newkey.  Therefore, under DOS 2.0 the key definition file 
  529. is only loaded if there is enough space in the dynamic define area 
  530. (used for new key definitions) to hold the file's key definitions.
  531.  
  532.      If there is enough space, the key definitions are loaded and 
  533. the remaining space used for the dynamic key definition area.  If 
  534. there is not enough space the message:
  535.  
  536.                        FILE TOO BIG TO LOAD
  537.  
  538. is displayed.
  539.  
  540.      If you receive this message it will be necessary to expand 
  541. the dynamic define area either through the run time parameter 
  542. (refer to parameter section in 'LOADING NEWKEY') or by actually 
  543. modifying the code (refer to 'Modifying Newkey') to a size large 
  544. enough to hold the file's key definitions plus whatever size you 
  545. actually want the dynamic define area to be.
  546.  
  547.      To determine how much space must be reserved for a file's key 
  548. definitions follow this procedure:
  549.  
  550.      1.  Determine the size of the key definition file (use 'dir 
  551.      filename.ext').
  552.      2.  Subtract 760 from this file size.  This result is the 
  553.      number of bytes of key definitions which you need to reserve.
  554.      3.  Divide by 2 to get the number of characters.
  555.      4.  Add to this figure the number of characters you wish to 
  556.      reserve for the dynamic define area.
  557.      5.  Re-boot.
  558.      6.  Invoke the new version of Newkey setting the run time 
  559.      parameter appropriately.
  560.      7.  Load the key definition file.
  561.  
  562.  
  563. MERGE FILE (filename.ext/m or filename.ext/m/o)
  564.  
  565.      This function will merge the key definitions from a disk file 
  566. into memory where they can be used by Newkey.  The previous key 
  567. definitions in memory will be kept.  If the same key is defined 
  568. both in memory and in the merge file, the in-memory definition 
  569. will be retained unless the overwrite option is specified.
  570.  
  571.      To merge, select function #5 on the menu screen or else type 
  572. in 'newkey1 file.key/m' or 'newkey1 file.key/m/o' and press enter.  
  573. 'file.key' is the name of the key definition file you wish to 
  574. merge into memory.  The second form, ending in '/o', will invoke 
  575. the overwrite option.  If you select function #5, another screen 
  576. will be displayed requesting a file name and whether you want to 
  577. use the overwrite option.
  578.  
  579.      The same DOS 2.0 space considerations apply to this function 
  580. as to the load function described in the previous section.
  581.  
  582.  
  583. CLEAR CURRENT KEY DEFINITIONS (/c)
  584.  
  585.      Select function #6 on the menu screen or else type in 
  586. 'newkey1 /c' and press enter.  This function will clear all 
  587. current key definitions from memory.
  588.  
  589.  
  590. SWITCH STATUS (/t)
  591.  
  592.      Select function #7 on the menu screen or else type in 
  593. 'newkey1 /t' and press enter.  This function will switch newkey's 
  594. status from on to off or vice-versa.  When Newkey's status is off, 
  595. Newkey is still resident but permits no normal Newkey functions 
  596. (translation, key definition) to occur.
  597.  
  598.      If invoked through the menu the current status is displayed.  
  599. If invoked directly, Newkey1 will return a message indicating its 
  600. current status after the switch.  This function is equivalent to 
  601. using ctrl 6 to switch Newkey's status.
  602.  
  603.  
  604. UNLOAD AND RECLAIM MEMORY (DOS 1.1 only) (/u)
  605.  
  606.      Select function #8 on the menu screen or else type in 
  607. 'newkey1 /u' and press enter.  This function will unload Newkey 
  608. completely from the system and free up its memory for reuse.  
  609. Caution must be exercised in using this feature.  If another 
  610. program has been permanently loaded after Newkey then its storage 
  611. will also be freed.  This function will only work under DOS 1.1.  
  612. .pa
  613.                          MODIFYING NEWKEY
  614.  
  615.      Almost every key and parameter Newkey uses may be changed.  
  616. The following should provide the information necessary to do this.  
  617. All of these changes are done using Debug.  Follow these steps:
  618.  
  619.   1.  Type in 'copy newkey.exe newkey.alt' and press enter.  This 
  620.   will create an alternate version of newkey.exe.
  621.  
  622.   2.  Type in 'debug newkey.alt' and press enter.  This will 
  623.   invoke debug and load Newkey.alt.
  624.  
  625.   3.  Next enter the modifications as described below.  Note that 
  626.   when changing a keystroke it is necessary to change the scan 
  627.   code as well as the ascii code.
  628.  
  629.   4.  Before modifying Newkey first check that you are actually 
  630.   modifying the correct address by issuing a 'D address' command 
  631.   and checking the dumped data against what you expect to find.
  632.  
  633.   5.  If the dumped data agrees with what you expect to find then 
  634.   issue a 'F address l2 xx xx' where xxxx is the new data to be 
  635.   entered.
  636.  
  637.   6.  Repeat steps 3 and 4 until all desired changes have been 
  638.   made.
  639.  
  640.   7.  Type 'w' and press enter.  This will write the changes to 
  641.   disk.
  642.  
  643.   8.  Type 'q' and press enter.  This will end the debug session.
  644.  
  645.   9.  Type in 'ren newkey.exe newkey.old' and press enter.  This 
  646.   will rename the old version of newkey.
  647.  
  648.   10. Type in 'ren newkey.alt newkey.exe' and press enter.  This 
  649.   will rename the new version of newkey.
  650.  
  651.   11. Load your new version of Newkey and test the changes.  (DOS 
  652.   2.0 users will have to re-boot.)
  653.  
  654.      If problems develop, rename the new version back to 
  655.   newkey.alt, rename the old version back to newkey.exe and reload 
  656.   the old version.  Then use debug to check your changes.
  657.  
  658.  
  659. MODIFICATIONS
  660.  
  661. NOTE: The 8088 stores its data backwards, or in other words in 
  662. reverse order when working with 2 byte fields.  These 
  663. modifications all involve changing 2 byte fields.  Thus, once you 
  664. have decided what you are going to change, enter the last byte 
  665. first and the first byte last.  
  666.  
  667.      For example, suppose that you are going to change the size of 
  668. the dynamic define area from 300 characters to 256 characters.  
  669. First determine the hex equivalent of 256, x'0100', reverse the 
  670. '01' and '00' to get x'0001'.  This is the order in which you 
  671. would enter the change using debug.
  672.  
  673.      To modify the key codes you need to enter both the ascii code 
  674. and the scan code.  The first byte (displayed by debug) is the 
  675. ascii code, the second, the scan code.  These codes are documented 
  676. in the IBM Technical Reference Manual.  The 'current data' fields 
  677. are listed in the order displayed by debug which is backwards due 
  678. to 8088 processing as described above.
  679.  
  680.  
  681. FIELDS WHICH MAY BE MODIFIED
  682.  
  683. Dynamic define area length - changing the amount of dynamic define 
  684. area reserved for new key definitions.  This figure should not 
  685. exceed 13,500 decimal, '346c' hex.  
  686.  
  687.      Address:  30d
  688.      Current data: x'2c01'   Be careful to reverse order
  689.  
  690. Alt = - changing the define key initiator/terminator
  691.  
  692.      Function: To change the key used to begin and end the key 
  693.      definition process.
  694.  
  695.      Address:  38f   
  696.      Current data: x'0083'   Be careful to reverse order
  697.  
  698.  
  699. Alt - - changing the Newkey variable length fill-in-the-blanks key 
  700. initiator
  701.  
  702.      Function:  To change the key used to begin and end the 
  703.      definition of the variable length fill-in-the-blanks fields 
  704.      during key definition.
  705.  
  706.      Address:  387
  707.      Current data: x'0082'  Be careful to reverse order
  708.  
  709. CR - changing the end of the variable fill-in-the-blanks terminator
  710.  
  711.      Function: To change the key used to end a variable length 
  712.      fill-in-the-blanks pause during key translation.
  713.  
  714.      Address:  38d
  715.      Current data: x'0d1c'   Be careful to reverse order
  716.  
  717. Ctrl 6 - changing the Newkey toggle key
  718.  
  719.      Function:  To change the key used to turn Newkey off and on.
  720.  
  721.      Address:  385
  722.      Current data: x'1e07'   Be careful to reverse order
  723.  
  724. Ctrl - - changing the Newkey fixed length fill-in-the-blanks key 
  725. initiator
  726.  
  727.      Function:  To change the key used to begin and end the 
  728.      definition of the fixed length fill-in-the-blanks fields 
  729.      during key definition.
  730.  
  731.      Address:  389
  732.      Current data: x'1f0c'   Be careful to reverse order
  733.  
  734. Ctrl 2 - changing the no translate key indicator
  735.  
  736.      Function:  To change the key used to signal that the next key 
  737.      entered during key definition is not to be translated.
  738.  
  739.      Address: 38b
  740.      Current data: x'0003'   Be careful to reverse order
  741.  
  742.  
  743. DESCRIPTION OF KEY TRANSLATION DISPLAY
  744.  
  745.      The Newkey1 directory and key translation display use four 
  746. character codes to describe characters.  For the most part these 
  747. codes are self explanatory, but if there is any confusion about 
  748. their meaning the following should clarify matters.
  749.  
  750.   ^ - control prefix
  751.   ~ - alt prefix
  752.   \ - capitalization prefix
  753.   F - followed by a number is a function key prefix
  754.  
  755. SPECIAL
  756. CODE - DESCRIPTION
  757.  
  758. CR   - return key (Carraige Return)
  759. FILL - fixed length fill-in-the-blanks spot
  760. NOTR - 'no translate' character, indicates that next character 
  761.        will not be translated.
  762. PAUS - variable fill-in-the-blanks spot
  763. SPAC - space or blank
  764. ^END - control-end
  765. ^HOM - control-home
  766. ^PGD - control-pgdn
  767. ^PGU - control-pgup
  768. ^PSC - control-PrtSc
  769. ^<-- - control-<-- (cursor backwards)
  770. ^--> - control---> (cursor forwards)
  771. UNK  - unknown character, could not translate.  This should not 
  772.        happen.
  773. .pa
  774.                    SAMPLE KEY DEFINITION FILES
  775.  
  776.  
  777.      Several sample key definition files are supplied with Newkey 
  778. to illustrate its use and provide you with a starting point.  
  779. These files are described below.  There are a general set of DOS 
  780. keys common to these files which are described at the end.
  781.  
  782.  
  783. ASM.KEY - Assembler programmer's customization file
  784.  
  785.   KEYS        ACTION
  786.   ----          ------
  787.  
  788.   Alt a       ';****.....****' (line of '*'s)
  789.  
  790.   Alt b       'byte ptr '
  791.  
  792.   Alt o       'offset '
  793.  
  794.   Alt w       'word ptr '
  795.  
  796.  
  797.      I use Wordstar to do my programming so that these commands 
  798. are merged with my Wordstar file.  In addition to these, I use F1 
  799. to set up my assembler environment under Wordstar.  This involves 
  800. mainly setting appropriate tab stops and I have left F1 set up to 
  801. do this.
  802.  
  803.  
  804. DVORAK.KEY - Dvorak keyboard customization
  805.  
  806.      This file contains the key definitions necessary to redefine 
  807. your keyboard to the Dvorak layout.  There is one minor problem 
  808. with using the Dvorak layout with the Caps Lock feature.  Caps 
  809. Lock will only lock the standard alphabet into shift mode.  Since 
  810. the Dvorak layout uses some non-alphabetic keys the Caps Lock 
  811. feature will not automatically capitalize these keys, although 
  812. normal shifting will.
  813.  
  814.      For more information about the Dvorak layout consult the 
  815. article "Using IBM's Marvelous Keyboard" page 402 in the May 1983 
  816. issue of Byte magazine.
  817.  
  818.      The general DOS definitions are not part of this file.
  819.  
  820.  
  821. TEST.KEY - illustrates Newkey features
  822.  
  823.   KEY    ACTION
  824.   ---    ------
  825.  
  826.   F1     Illustrates the fixed length fill-in-the-blanks feature.
  827.  
  828.   F2     Illustrates the variable length fill-in-the-blanks 
  829.          feature.
  830.  
  831.   F3     Illustrates the no translate feature.
  832.  
  833.   Alt 1  Illustrates the nested definitions feature.  Each key 
  834.   thru   returns 'levelx' plus whatever the next higher alt number 
  835.          is defined as. These are defined as described in the 
  836.   Alt 9  'Nested key translation' section earlier in the text.
  837.  
  838.  
  839. WS.KEY - Wordstar customization file
  840.  
  841.      Newkey may be used to customize the Wordstar environment.  F1 
  842. creates a customized initial environment.  Many of the commands 
  843. depend upon making sure that alt f is defined to be the active 
  844. Wordstar file you are using.
  845.  
  846.  
  847.   KEYS        ACTION
  848.   ----        ------
  849.  
  850.   F1          Set help level to 0, toggle off justification, 
  851.               toggle off auto-hypenation
  852.  
  853.   F2          Save file (Ctrl KS), return to original cursor 
  854.               position (Ctrl QP), copy file (defined by alt f) to 
  855.               your a disk (Ctrl KO).  
  856.  
  857.               This will save your current file as defined by alt f 
  858.               and then copy it to your a disk.  This is a one step 
  859.               procedure Wordstar users on a ram disk can use to 
  860.               save their file on a floppy without leaving their 
  861.               current position within Wordstar.
  862.  
  863.   Alt F2      Save file and return to original cursor position.
  864.  
  865.   F5          Underscore
  866.  
  867.   Alt F5      Open underscore, accept input, close underscore 
  868.               after return key is struck.
  869.  
  870.   F6          Double strike
  871.  
  872.   Alt F6      Open double strike, accept input, close double 
  873.               strike after return key is struck.
  874.                                                                               
  875.   Alt F9      Address a short envelope and leave me at position to 
  876.               start receiver's address.
  877.  
  878.   Alt F10     Type my address and end at spot to enter date.
  879.  
  880.   Del         Delete character directly above cursor.
  881.  
  882.   Alt d       Call up Wordstar document file (d, alt f, return)
  883.  
  884.   Alt f       Current file name.  Used by F2, alt d, and alt n.
  885.  
  886.   Alt n       Call up Wordstar non-document file (n, alt f, return)
  887.  
  888.     
  889. GENERAL DOS KEYS COMMON TO MOST KEY FILES:
  890.  
  891.   Alt c       'copy '
  892.  
  893.   Alt e       'erase '
  894.  
  895.   Alt f       Current file name.  Used in other key translations.
  896.  
  897.   Alt t       'dir '
  898.  
  899.  
  900. INFORMATION ABOUT THE FILES ON THE NEWKEY DISK
  901.  
  902. LOADNEW.BAT - This is a sample batch file which will load Newkey 
  903. and the sample Wordstar key definition file, WS.KEY.
  904.  
  905. NEWKEY.DOC - This is the documentation file which contains this 
  906. document.  It is only required when you want to print the 
  907. documentation.
  908.  
  909. NEWKEY.EXE - This is the program whick actually replaces IBM's 
  910. keyboard interrupt (x'16).  This program remains resident while 
  911. other programs execute and unless called upon to translate will be 
  912. transparent.
  913.  
  914. NEWKEY1.EXE - This program provides several functions necessary to 
  915. effectively use Newkey and is described further in this document.
  916.  
  917. PRINTDOC.EXE - This program will print the document file, 
  918. NEWKEY.DOC and is only needed for that purpose.
  919.  
  920.      All files ending in 'KEY' are sample key definition files and 
  921. are described elsewhere in this document.
  922.  
  923. .pa
  924.                               NEWKEY OVERVIEW
  925.  
  926. NEWKEY REQUIREMENTS
  927.  
  928.      Newkey requires PC-DOS 1.1 OR 2.0 and will run on either a 
  929. monochrome or color monitor.  The base program requires 
  930. approximately 3.7K of memory plus an additional 2 bytes per 
  931. character of translation and reserved dynamic define area.
  932.  
  933.  
  934. HOW DOES NEWKEY WORK?
  935.  
  936.      The Newkey keyboard enhancer consists of two programs, 
  937. Newkey.exe and Newkey1.exe.  Newkey.exe, when invoked will replace 
  938. the normal keyboard interrupt (x'16') of DOS.  Just as the normal 
  939. keyboard interrupt, Newkey will read the keyboard buffer and 
  940. return the key to the requesting program, except that Newkey will 
  941. first check the key against its key definition file (where the key 
  942. translations are stored) and if it finds an entry for that key it 
  943. will return the corresponding translation.
  944.  
  945.      Newkey1.exe, the companion program to newkey.exe, provides 
  946. several functions necessary to use Newkey.exe effectively (as 
  947. described in the 'Newkey1 Overview'.  Newkey1 is loaded into high 
  948. memory so that key definition files may be freely loaded.  This 
  949. raises a potential problem should there not be enough free space 
  950. between the top of Newkey and the bottom of Newkey1 to load a key 
  951. definition file.  If this should happen results will be 
  952. unpredictable. 
  953.  
  954.  
  955. NEWKEY'S LIMITATIONS
  956.  
  957.      Newkey allows redefinition of any key (except ctrl break, 
  958. ctrl 6, ctrl 2,and alt =).  Newkey will handle up to approximately 
  959. 27k of key definitions, but any key definition may be as long as 
  960. you wish up to this maximum.  The 27k maximum includes a few bytes 
  961. for overhead and two bytes per character of translation.  Results 
  962. are unpredictable should the 27k maximum be exceeded. 
  963.  
  964. .pa
  965.                             TIPS ON USING NEWKEY
  966.  
  967. USE YOUR AUTOEXEC.BAT FILE
  968.  
  969.      Put the commands to load Newkey and your key definition file 
  970. in your autoexec.bat file.  This will cause Newkey and your key 
  971. definitions to be automatically loaded whenever you boot.  If you 
  972. have disks for different purposes, each disk could contain a copy 
  973. of Newkey, Newkey1 and your key definition files.   
  974.  
  975.      An example of the statements you would want to use can be 
  976. found in LOADNEW.BAT, a batch file supplied with Newkey.  Use your 
  977. editor to copy these statements into your autoexec.bat file and 
  978. change the parameters as appropriate.
  979.  
  980. SETTING THE DYNAMIC DEFINE AREA SIZE PARAMETER
  981.  
  982.      When you first install Newkey you will be actively defining 
  983. keys.  This will require a lot more space in the dynamic define 
  984. area than you will normally use.  During these early sessions set 
  985. the dynamic define area size parameter to a large number, 5000 for 
  986. example.  This will enable you to define key definitions using up 
  987. to 5000 characters without running out of space.
  988.  
  989.      Later, when you have finished creating your key definition 
  990. files, lower the number to a level which will support your normal 
  991. key definition needs during a session.  Newkey uses 300 as a 
  992. default, but you can set the number as low as 5.  Of course you 
  993. may set the define area size at any level you wish, but remember, 
  994. that area is not available to any other programs.
  995.  
  996.      DOS 2.0 users must also allow enough space to load their key 
  997. definitions in addition to supporting their normal key definition 
  998. needs during a session (see Special Note to DOS 2.0 Users in LOAD 
  999. FILE section under NEWKEY1 FUNCTIONS.)
  1000.  
  1001.      The dynamic define area size parameter is specified when you 
  1002. load Newkey.  For more information refer to the section Newkey 
  1003. Parameters under LOADING NEWKEY.
  1004.  
  1005. DO NOT FORGET TO SAVE YOUR KEY DEFINITIONS
  1006.  
  1007.      Do not forget to save your key definitions at the end of a 
  1008. session.  Unless you save the keys you have defined during the 
  1009. current session they will be lost when you re-boot or turn off the 
  1010. computer.  
  1011.  
  1012.       It is suggested that as soon as you have finished defining a 
  1013. set of keys you wish to keep, that you save them immediately.  It 
  1014. is very easy to start a session defining new keys, proceed to use 
  1015. them for the rest of the session, and then turn off the computer.  
  1016. If this happens, you will have to redefine each key again.  For 
  1017. information on saving your key definitions refer to the SAVE FILE 
  1018. section under NEWKEY1 FUNCTIONS.
  1019.  
  1020.  
  1021. COMBINING KEY DEFINITION FILES
  1022.  
  1023.       Occasionally you may wish to combine two key definition 
  1024. files.  This may be done by loading one of the files into memory 
  1025. using the LOAD FILE function, merging the second into memory using 
  1026. the MERGE FILE function, and then saving the key definitions using 
  1027. the SAVE FILE function.  These functions are described under 
  1028. NEWKEY1 FUNCTIONS.     
  1029.  
  1030.  
  1031. MULTIPLE KEY DEFINITION FILES
  1032.  
  1033.      You may wish to define multiple key definition files based 
  1034. on function.  This would allow you to easily build different key 
  1035. definition files without redefining each function's keys for each 
  1036. key definition file.  They could also be used to create in-memory 
  1037. key definitions at boot time without combining them all into one 
  1038. key definition file.
  1039.  
  1040.      For example, you could define a file for your word 
  1041. processor, speadsheet, general DOS commands, etc. and then merge 
  1042. various combinations of them together to create one file, or you 
  1043. could merge each file in at boot time.  
  1044.  
  1045. .pa
  1046. DISCLAIMER.
  1047.  
  1048.      In no event will the author be liable to you for any damages, 
  1049. including any lost profits, lost savings or other incidental or 
  1050. consequential damages arising out of the use of or inability to 
  1051. use these programs, even if the author has been advised of the 
  1052. possibility of such damages, or for any claim by any other party.
  1053.  
  1054.  
  1055. PERMISSION TO COPY:
  1056.  
  1057.      Individuals are granted permission by the author to freely 
  1058. copy the Newkey programs and documentation for their own use or to 
  1059. share with others, so long as no price or other consideration is 
  1060. charged.
  1061.  
  1062.      Computer clubs and other non-profit organizations are granted 
  1063. permission by the author to freely copy the Newkey programs and 
  1064. documentation and share it with their members, so long as:
  1065.  
  1066. 1.  No price or other consideration is charged.  However, a 
  1067.     distribution cost may be charged for the cost of the diskette, 
  1068.     so long as it is not more than $10 total.
  1069.  
  1070. 2.  Club members are informed of the user-supported concept and 
  1071.     encouraged to support it with their donations.
  1072.  
  1073. 3.  The programs and documentation are not modified in any way and 
  1074.     are distributed together.
  1075.  
  1076.      Companies are granted permission by the author to copy the 
  1077. Newkey programs and documentation for use on other computers and 
  1078. at other locations in the company, so long as:
  1079.  
  1080. 1.  The full registration fee of $30 has been paid for the 
  1081.     original copy of the program.
  1082.  
  1083. 2.  A usage fee of $25 is paid for each additional "building" 
  1084.     where Newkey will be used.  Within any building for which the 
  1085.     usage fee has been paid, Newkey may be copied freely for use 
  1086.     on any computer in that building.
  1087.  
  1088. .pa
  1089. THE USER-SUPPORTED CONCEPT.
  1090.  
  1091.                      User-supported Software
  1092.   You are encouraged to copy and share this program with others.
  1093.     If after evaluating this program you find it to be useful,
  1094.                 I trust you to send a $30 payment.
  1095.  
  1096.                             Frank Bell
  1097.                          20950 Smallwood
  1098.                        Birmingham, MI 48010
  1099.  
  1100.  
  1101. User-supported software is an experiment in distributing computer 
  1102. programs, based on these beliefs:
  1103.  
  1104. 1.  That the value and utility of software is best assessed by the 
  1105.     user on his/her own system.
  1106.  
  1107. 2.  That the creation of personal computer software can and should 
  1108.     be supported by the computing community.
  1109.  
  1110. 3.  That copying of programs should be encouraged, rather than 
  1111.     restricted.
  1112.  
  1113.      Anyone may legally obtain an evaluation copy of the program 
  1114. from a friend or computer club.  After you have had a chance to 
  1115. use and evaluate the program in your own environment, you are 
  1116. trusted to either forward a payment to the author, or to 
  1117. discontinue use of the program.  In any case, you are encouraged 
  1118. to copy the program for evaluation by others.
  1119.  
  1120.      Free distribution of software and voluntary payment for its 
  1121. use eliminates costs for advertising and copy protection schemes.  
  1122. Users obtain quality software at greatly reduced cost.  They can 
  1123. try it out before buying, and do so at their own pace and in the 
  1124. comfort of their own home or office.  The best programs will 
  1125. survive, based purely on their quality and usefulness.
  1126.  
  1127.      Please join the experiment.
  1128.  
  1129.      If you believe in these ideals, your contribution is 
  1130. solicited to help make them work.
  1131.  
  1132.  
  1133. PROBLEMS, SUGGESTIONS, ETC. 
  1134.  
  1135.      If you should have any problems, suggestions or questions 
  1136. please feel free to write me at the above address.
  1137. 
  1138.  
  1139.     If you should have any problems, suggestions or questions 
  1140. pleeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeeee