home *** CD-ROM | disk | FTP | other *** search
/ Frostbyte's 1980s DOS Shareware Collection / floppyshareware.zip / floppyshareware / DPSX / DDKEY11.ZIP / DDKEY11.DOC < prev    next >
Encoding:
Text File  |  1991-03-31  |  12.7 KB  |  278 lines

  1.  
  2.                            DDKEY version 1.1
  3.  
  4.          A Dynamic DOS Key expander: a tiny but powerful macro 
  5.      utility.  This version has an enlarged 1440 byte buffer, with 
  6.      a default setting of 36 keys each allotted 40 bytes.  It is 
  7.      very useful for complementing WordStar's anemic macros, as 
  8.      the included file WS.KEY demonstrates.
  9.  
  10.           This update adds a no translate key, ^@, to return the 
  11.      literal value of a defined key, allows variable entry within 
  12.      a macro with "Alt -", and allows chaining to another macro 
  13.      with "Alt =".  The program no longer terminates a definition 
  14.      when all bytes are filled, but waits for input, in case you 
  15.      wish to backspace and chain to another macro.  A definition 
  16.      line is now blanked initially, to avoid onscreen clutter.  
  17.      You may now write the key allotment value to an otherwise 
  18.      empty file.
  19.  
  20.          DDKEY becomes memory resident at slightly under 3k.  Only 
  21.      the first parameter on a command line will be acted upon.  
  22.      Currently, the display is geared toward an 84 key, AT-style 
  23.      keyboard, and a non-enhanced bios.
  24.  
  25.            A>DDKEY       to install.
  26.            A>DDKEY /U    to uninstall.  Delimiter is "/" or "-".
  27.  
  28.            A>DDKEY /L FILESPEC  load a key definition file.  If 
  29.                                ddkey is not installed, it will be.
  30.                                Example:   ddkey /l ws.key
  31.  
  32.            A>DDKEY /S FILESPEC  save a key file.
  33.  
  34.            A>DDKEY       show definitions active in memory.  The 
  35.                          program will only install once.
  36.  
  37.  
  38.           ON-THE-FLY DEFINITIONS
  39.  
  40.          The hot key is Alt =.  You will be prompted for a key.  
  41.      All editing is done with either "Backspace" or "Carriage 
  42.      Return."  To end a session:  hit "Return" when prompted for a 
  43.      key.  To clear a definition:  hit "Return" after the equals 
  44.      sign.  To terminate a definition:  hit "Return."  To delete 
  45.      left:  use "Backspace."  Most of this should seem fairly 
  46.      intuitive.  To enter either of these keys in a definition 
  47.      itself, use the control equivalent, ^H or ^M.
  48.  
  49.           When the bytes allocated for a definition are filled, 
  50.      the program will beep.  Either terminate the definition with 
  51.      a "Return," or else backspace and edit the macro or use the 
  52.      chain-to-macro feature discussed below.  If the program 
  53.      refuses input, but does not beep, it probably means you are 
  54.      trying to enter a two-byte extended character, such as a 
  55.      function key or Alt key, when there is only one byte of 
  56.      definition space remaining.
  57.  
  58.           Clear all definitions
  59.  
  60.           The hot key cannot be redefined, so entering Alt = in 
  61.      response to the key prompt will give you a y/n choice of 
  62.      clearing all definitions from memory.
  63.  
  64.          Variable entry
  65.  
  66.           If Alt - is entered in a definition string, it will 
  67.      cause the macro, when executed, to pause for user entry.  All 
  68.      entered keys will be literal.  Terminate variable entry with 
  69.      "Return."  This can be useful in DOS for entering file names 
  70.      in a command line.  The "Alt -" key may be thought of as a 
  71.      string of dashes, or as an underline for a fill-in-the-blanks 
  72.      type of entry.
  73.  
  74.           Chain to another macro
  75.  
  76.           End a macro with "Alt =" and then the key you want to 
  77.      chain to, for example:  <Alt =><Alt G>.  DO NOT chain a macro 
  78.      to itself.  Chaining to an Ascii key requires three bytes.  
  79.      Chaining to an extended key requires four bytes.  Since only 
  80.      one byte is reserved for Ascii keys, the keypad numerals and 
  81.      symbols will appear as duplicates.  If, say, both the 
  82.      keyboard "*" and the keypad "*" are defined, then issuing an 
  83.      <Alt =>* will result in chaining to the "*" which occurs 
  84.      first in the definition queue (nearest the top in the screen 
  85.      display).  Note that clearing a key definition, and then 
  86.      redefining it will result in that key appearing last in the 
  87.      definition table.
  88.  
  89.           Exit code
  90.  
  91.          After keys are defined an exit code is sent.  The default 
  92.      setting is ^@ which causes DOS to redisplay its prompt.  To 
  93.      use this program in WordStar change the exit code to ^\, 
  94.      which will automatically clear the screen of garbage.  DON'T 
  95.      use ^@ in VDE, as you may have to abandon your work.  VDE 
  96.      also accepts ^\.  The exit code is located at address 01B9.
  97.  
  98.          The key is exactly specified with both the Ascii code and 
  99.      the Scan code.  This is the typical reversed order of all two- 
  100.      byte values, such as addresses, in DOS.  Obtain the codes 
  101.      from a table, or better, use KEYCODE, an accompanying 
  102.      utility.  Note that KEYCODE correctly returns the Scan code, 
  103.      then the Ascii code, so these two hex bytes must be reversed 
  104.      when entering with Debug.  The suggested codes, with Ascii 
  105.      listed first are:
  106.  
  107.           Place at 01B9:   ^@        00 03    - DOS
  108.                            ^\        1C 2B    - WordStar or VDE
  109.  
  110.          ^@ will work in WordStar, but it won't clear the screen, 
  111.      and ^\ will work in DOS, but you will have to press "Escape" 
  112.      and "Return" to redisplay the DOS prompt after creating 
  113.      definitions.
  114.  
  115.           Literal key
  116.  
  117.           When typing use ^@ (typed by user--no connection to the 
  118.      exit code) to return the next struck key as a literal, even 
  119.      if it was previously defined.  This applies to "Alt =" and to 
  120.      ^@ itself.  The ^@ key is the old teletype NUL, and may be 
  121.      thought of as nullifying any definition.
  122.  
  123.  
  124.           THE KEYPAD DEFINITIONS:  WS.KEY
  125.  
  126.          The included definitions are for the keypad of the 84 key 
  127.      AT-style keyboard.  The 101 key enhanced keyboard probably 
  128.      has the keypad too far to the right for rapid-fire editing, 
  129.      though similar definitions could be place on the overhead 
  130.      function keys.  Another use of the keypad would be to hold 
  131.      formatting code for writing screenplays.  In WS.KEY the key 
  132.      interval value is not 40, but 32, which means 45 keys may be 
  133.      defined, leaving 30 free for the user.
  134.  
  135.       Paragraph:
  136.           Begin/Previous       Next       Mark       Mark to end 
  137.                (7)             (8)        (9)          (*)
  138.   
  139.       Sentence:
  140.           Begin/Previous       Next       Mark       Mark to end
  141.                (4)             (5)        (6)          (-)
  142.  
  143.  
  144.            Quick Down     Quick Across  Go Marker
  145.                (1)             (2)        (3)
  146.  
  147.  
  148.                  Delete Word Left      Place Marker   Mark word
  149.                        (0)                (.)          (+)
  150.  
  151.       ^Backspace also gives "delete word left" (as in PC-Write).
  152.  
  153.          Of course, users of other word processors already have 
  154.      most of these commands available as part of their programs.
  155.  
  156.          Load DDKEY /L WS.KEY and look at the display.  Most 
  157.      definitions will be self-explanatory.  Quick down (1) 
  158.      generates a series of ^Xs, which WordStar can't handle:  
  159.      after the first ^X the rest are gobbled.  Thus this string is 
  160.      preceded with the (undocumented) feature ^Q~ which forces 
  161.      WordStar to accept the macro as given, without losing 
  162.      keystrokes.  Also, it may not be clear from the opening 
  163.      display, but "delete word left" is <space>^A^T.  Without the 
  164.      initial space, the command might not only wipe out any mess 
  165.      to the left of the cursor, but also the word to the right.
  166.  
  167.          The definitions assume double-spaced text, with a 
  168.      WordStar added soft carriage return between paragraphs.  To 
  169.      make them work with single-spaced text, with two hard 
  170.      carriage returns between paragraphs, make these changes:
  171.  
  172.                <Keypad 8>   add ^F to end
  173.                <Keypad 9>   add ^F before final ^KK
  174.                <Keypad *>   delete ^A before final ^KK
  175.  
  176.  
  177.           MODIFYING DDKEY
  178.  
  179.          Each key has 40 bytes allotted to it:  2 bytes for the 
  180.      key, 37 for the definition, 1 byte for the final 00.  You may 
  181.      change the key allotment, using Debug on DDKEY itself.  Then 
  182.      all future saved files will have your new chosen value.  The 
  183.      address to change is 06FC, with a current value of 28 hex 
  184.      (40d).
  185.  
  186.          To use the 1,440 byte buffer efficiently, choose a value 
  187.      that evenly divides such as 5, 6, 8, 9, 10, 12, 15, 16, 18, 
  188.      20, 24, 30, 32, 36, 40, 45, 48, 60, 72, 80, 90, 96 (decimal).  
  189.      If a number does not divide evenly, any remainder is unused.  
  190.      Decide on your required definition length and add 3, or 
  191.      simply choose a convenient value and use the chain-to-macro 
  192.      feature to handle long definitions.
  193.  
  194.          Change the byte at 06FC to 14 hex (20d) to create many 
  195.      small definitions, or to 50 hex (80d) to reassign keys with 
  196.      long definitions.  Save definitions to a file.  The key 
  197.      allotment is the first byte of the file.  The default value 
  198.      may be reset, but any time a file is loaded, the key 
  199.      allotment reverts to the value of that file.  (To avoid a 
  200.      mismatch, when you load a file all former definitions are 
  201.      deleted from memory.  Only those in the file will be active.)  
  202.      To restore a default value, either read in a file, or 
  203.      uninstall the program, then reinstall it.
  204.  
  205.          Assume you wish to use DDKEY with WordStar, but dislike 
  206.      WS.KEY.  You want to define virtual every Alt key, 
  207.      substituting Alt B for ^KB, Alt K for ^KK, Alt L for ^QR^QL, 
  208.      and so forth.  To do so:
  209.  
  210.            DEBUG DDKEY.COM
  211.            E 1B9 1C 2B        ;after creating definitions, the 
  212.                               ;code for ^\ will be sent.  This is 
  213.                               ;WordStar specific, and refreshes 
  214.                               ;the screen
  215.  
  216.            E 6FC 10           ;10 hex = 16 decimal.  This allows 
  217.                               ;90 keys, enough for your needs, 
  218.                               ;each with 13 bytes available for a 
  219.                               ;definition string
  220.            N WSKEY.COM
  221.            W
  222.            Q
  223.  
  224.          This creates a file, WSKEY.COM, to try out.  Make a 
  225.      couple of new definitions and save to a file.  Now you may 
  226.      change the key allotment to 50 hex (80d), and redefine 18 
  227.      keys for use in DOS.  When you load the WordStar file the key 
  228.      allotment will be reset to 16d.  
  229.  
  230.  
  231.           TECHNICAL STUFF
  232.  
  233.           The whole choice of using key partitions has its 
  234.      advantages and disadvantages.  It is very fast:  the macro 
  235.      facility simply zips down the list looking for matches.  And 
  236.      if you are making many small definitions it is very 
  237.      efficient.  There are no reference addresses or length values 
  238.      to check.  For instance, by choosing a key allotment of 5, the 
  239.      whole keyboard could be redefined to a Dvorak layout.  
  240.      Avoiding reference addresses saves a couple of hundred bytes 
  241.      in this situation.  Note that defined keys are exactly 
  242.      specified with scan code and Ascii value, which means that 
  243.      the program distinguishes between keypad and keyboard keys.  
  244.      Within a macro, however, only the Ascii value is saved for 
  245.      most keys; the scan code is ignored.  Most programs recognize 
  246.      a letter resulting from holding down the Alt key and entering 
  247.      the decimal Ascii code on the keypad.  In such a case the 
  248.      returned scan code is zero.  Also most text files save only 
  249.      the Ascii value.  DDKEY does output scan codes (from a 
  250.      translation table) for all control characters, since WordStar 
  251.      needs these to differentiate keys.
  252.  
  253.  
  254.           COMMENTS
  255.  
  256.          This program was inspired by two CP/M public domain key 
  257.      redefinition programs, GKEY by Eric Gans, and QWIKKEY by 
  258.      Anton Fleig.  I was baffled that DOS required at least 20k to 
  259.      do what took less than 4k in CP/M.  The name would have been 
  260.      DKEY, but that name was already taken.
  261.  
  262.          This utility is free for all personal and private use.  
  263.      Use at your own risk.  I have no responsibility for any 
  264.      damage, incidental or otherwise, that may be caused by its 
  265.      use.
  266.  
  267.           If there are problems, please let me know.  I do not 
  268.      have an enhanced keyboard so it may be a while before I adapt 
  269.      DDKEY for the enhanced BIOS, unless someone desperately needs 
  270.      it.  I suppose anyone who sends money or who volunteers to 
  271.      serve as a guinea pig for a new program will be considered 
  272.      desperate.
  273.  
  274.                                           David M. Dibble
  275.                                           1133 Blaine Street, #112
  276.            April 3, 1991                  Riverside, CA  92507
  277.  
  278.