home *** CD-ROM | disk | FTP | other *** search
/ Media Share 9 / MEDIASHARE_09.ISO / utility / ddkey201.zip / DDKEY201.DOC < prev    next >
Text File  |  1993-02-26  |  44KB  |  917 lines

  1.  
  2.               _______
  3.          ____|__     |               (R)
  4.       --|       |    |-------------------
  5.         |   ____|__  |  Association of
  6.         |  |       |_|  Shareware
  7.         |__|   o   |    Professionals
  8.       -----|   |   |---------------------
  9.            |___|___|    MEMBER
  10.  
  11.  
  12.           Files included in this release:
  13.  
  14.           DDKEY201.DOC                        3UTILS.DOC
  15.             DDKEY.COM                           CTRL.COM
  16.             DINSTALL.COM     DDK-ORDR.FRM       DVORAK.COM
  17.             WS.KEY           VENDOR.DOC         KEYCODE.COM
  18.  
  19.           Update 1.8:  Several options were added to the menu:  
  20.      <A> allows setting a twenty-four hour alarm, <T> gives a 
  21.      table of ASCII codes, and <P> will print the screen of your 
  22.      active program to a sequential file, DDKEY.001, DDKEY.002, 
  23.      etc.
  24.           Update 1.9:  The cursor may now be set by pressing <-> 
  25.      at the menu.  One may now assign macros to key pairs:  a user 
  26.      definable trigger key followed by one of 94 regular ASCII 
  27.      keys.
  28.           Update 1.91:  <A>larm now shows the current time as a 
  29.      reference.  <-> includes ability to blank screen.
  30.           Update 2.0:  DINSTALL, DDKEY installation program for 
  31.      full customization.  At DOS prompt type:  DINSTALL DDKEY.COM
  32.           Update 2.01:  Dropped internal stack (WordStar conflict)
  33.                          _____________________
  34.  
  35.  
  36.                            DDKEY version 2.01
  37.               Copyright 1991, 1992, 1993, David M. Dibble
  38.                           All rights reserved
  39.                                 2/26/93
  40.  
  41.          A Dynamic DOS Key expander: a tiny but powerful macro
  42.      utility.  DDKEY was originally written to complement
  43.      WordStar, by allowing any key to be redefined, rather than
  44.      the "Escape + key" combination that WordStar requires.  Those
  45.      with 640k RAM may run WordStar and the spelling checker, etc.
  46.      completely in memory, but little room is left for a key
  47.      redefinition program.  Therefore DDKEY was designed to be
  48.      small and fast:  the TSR program code occupies 6.1k of RAM.  
  49.      Total memory usage, with the default 1.4k definition buffer, 
  50.      is 7.5k, for DKEY-0K.  For DDKEY an extra 4k is reserved as a 
  51.      buffer for saving and restoring the screen, so over 11k of 
  52.      DOS RAM is needed.  Had this program been written in C, 
  53.      instead of in assembly language, it would have been about 
  54.      seven times larger.
  55.  
  56.           DDKEY is ideal for use on laptops or with large 
  57.      databases, for working with text or for any sort of 
  58.      programming.  Various features make working with archive 
  59.      files easier.  It should work under DOS 2.0 and later.  DDKEY 
  60.      will pop up only in color text or monochrome mode.  DDKEY 
  61.      automatically senses the enhanced BIOS, and uses self- 
  62.      modifying code to install the correct version of the program 
  63.      in memory.
  64.  
  65.           The program itself compresses nicely with LZEXE or 
  66.      PKLITE to take up little room on disk.  Some features include:
  67.  
  68.      *  save and load key definition files from command line
  69.      *  display definitions active in memory, both within another
  70.         program, or from the command line
  71.      *  on-the-fly definitions, optional Record Mode
  72.      *  variable definition buffer for small and large needs
  73.      *  a no translate key, one time canceling of definitions
  74.      *  halt for user entry while a macro is executing
  75.      *  chain to another macro
  76.      *  on pop-up, saves and restores screen
  77.      *  instantly turn DDKEY on/off (active/inactive)
  78.      *  clear all definitions at once
  79.      *  a WordStar-type shorthand, assign macros to pairs of keys
  80.      *  toggle CapsLock on/off from within a macro.
  81.      *  toggle NumLock on/off from within a macro.
  82.      *  predetermined pause within an executing macro
  83.      *  automatic capitalization of letters following a period,
  84.         question mark, or exclamation point
  85.      *  edit or reassign defined keys at any time
  86.      *  twenty-four hour alarm
  87.      *  table of ASCII codes always available
  88.      *  print 80-column text screen to file within any program
  89.      *  change user cursor at any time
  90.      *  included utilities to switch Ctrl and CapsLock on the 
  91.         enhanced keyboard, or to create a Dvorak layout
  92.  
  93.           DDKEY is distributed as shareware, giving users a chance 
  94.      to try it before they buy it.  If you continue to use it, you 
  95.      are expected to register.  The essence of user-supported 
  96.      software is to provide personal computer users with quality 
  97.      software without high prices, and yet to provide incentive 
  98.      for programmers to continue to develop new products.  If you 
  99.      are unfamiliar with this distribution method, please read the 
  100.      comments at the end of this file.  You may pass a copy of 
  101.      DDKEY along to your friends for evaluation.  Please encourage 
  102.      them to register their copy if they continue to use it.
  103.  
  104.           All registered users will receive a copy of the latest 
  105.      version of DDKEY.  For your shareware payment of $18 ($19 for 
  106.      3½" disks) you will in addition receive the next available 
  107.      major update free.  You will also receive bonus programs such 
  108.      as DKEY-0K, discussed later; DEEPLOCK, an easy to use 
  109.      security program; and FOR-DO, an extension of the DOS FOR 
  110.      statement.
  111.  
  112.           Commercial, institutional, and government users of DDKEY 
  113.      must register and pay for their copies of DDKEY within 30 
  114.      days of first use or their license is withdrawn.  Contact the 
  115.      author for site-license arrangements.
  116.  
  117.           DDKEY IS SUPPLIED AS IS.  THE AUTHOR DISCLAIMS ALL 
  118.      WARRANTIES, EXPRESSED OR IMPLIED, INCLUDING, WITHOUT 
  119.      LIMITATION, THE WARRANTIES OF MERCHANTABILITY AND OF FITNESS 
  120.      FOR ANY PURPOSE.  THE AUTHOR ASSUMES NO LIABILITY FOR DAMAGES, 
  121.      DIRECT OR CONSEQUENTIAL, WHICH MAY RESULT FROM THE USE OF 
  122.      DDKEY.
  123.                                         David M. Dibble
  124.                                         12137 Calle Sombra, #213
  125.                                         Moreno Valley, CA  92557
  126.            February 26, 1993            U.S.A.
  127.  
  128.                           _________________
  129.  
  130.          The command line syntax follows.  To install the program 
  131.      (with the default 1440 byte buffer) type either:
  132.  
  133.            A>DDKEY       or     A>DDKEY /L FILESPEC
  134.  
  135.      The last loads a key definition file.  If DDKEY is not
  136.      installed, it will be.  Example:   DDKEY -L A:WS.KEY, where
  137.      the delimiter is either "/" or "-".  Once the program is
  138.      installed, typing
  139.  
  140.            A>DDKEY
  141.  
  142.      will show definitions active in memory.  The program will
  143.      only install once.  The display here, and with the /L option,
  144.      may be redirected to printer, file, or nul.  Send definitions 
  145.      to an ASCII file, and then sort and print it.  Typing
  146.  
  147.            A>DDKEY -L FILESPEC_2
  148.  
  149.      when DDKEY is already installed, will cause the definition
  150.      file, FILESPEC_2, to be loaded.  Any previous key definitions
  151.      will be erased.  New definitions may be created at any time.
  152.      These will be temporary, unless saved to a file with
  153.  
  154.            A>DDKEY /S FILESPEC
  155.  
  156.      If FILESPEC matches the name of a previously saved file, you
  157.      will be warned, and given a choice of whether to overwrite or 
  158.      append.  Files may be appended only if the key allotment 
  159.      values match--that is, the bytes allowed per definition must 
  160.      be the same.  This is an effective way to merge definitions.  
  161.      After merging, edit the file to remove or reassign duplicate 
  162.      keys.
  163.  
  164.      When DDKEY is no longer needed, or if it conflicts with
  165.      another program, it may be uninstalled with
  166.  
  167.            A>DDKEY /U
  168.  
  169.      Typing DDKEY /H or DDKEY /? will bring up the following help 
  170.      message:
  171.      ____________________________________________________________
  172.  
  173.      Usage:  DDKEY {/U} {/S filespec} {/O} {/T} {/L filespec}
  174.      /S  Save definitions   /U  Uninstall      /O  Old BIOS calls
  175.      /L  Load definitions   /2-9 Buffer size   /T  ^6 case Toggle
  176.  
  177.      Commands:
  178.      Alt =           show defined keys; menu  (Esc quits)
  179.           PgDn       next page      1-9, 0=10  macros/pg
  180.            Ret       start to define
  181.              R       record keystrokes within program, end with Alt =
  182.             ^C       clear buffer, set bytes per definition
  183.              A       twenty-four hour alarm
  184.              T       table of ASCII codes
  185.              P       print screen to file for active program
  186.              -       select cursor type; blank screen
  187.              C       automatic caps and dialogue
  188.              E       edit or create macro, insert mode
  189.      ^@              next key literal
  190.      ^@^@            DDKEY active/inactive (beeps)
  191.      
  192.      Codes to embed in macro string:
  193.      Alt -           halt execution for user entry; end entry with Ret
  194.      Alt = <Key>     chain to a defined macro <Key>
  195.      #C/#c           CapsLock ON/off
  196.      #N/#n           NumLock ON/off
  197.      #W              3/4 second pause
  198.      ____________________________________________________________
  199.  
  200.           The buffer size is now variable, with the default 
  201.      definition buffer being 1440 bytes.  This may be incremented 
  202.      in units of 1440 bytes, that is, /2 equals 2880, and /3 
  203.      equals 4320.  The largest buffer, /9, is equal to 12,960 
  204.      bytes.  This should provide a sufficient range for just about 
  205.      any need.  /1 does not need to be specified; if no digit is 
  206.      entered the buffer defaults to 1440 bytes.
  207.  
  208.           Because of the way TSRs are loaded, anything above the 
  209.      default buffer will not exist until DDKEY has been installed.  
  210.      Therefore large files must be loaded in a two-step process.
  211.  
  212.           To install DDKEY:
  213.  
  214.           A>DDKEY /5               ;create a 7,200 byte buffer
  215.           A>DDKEY /L BIGFILE       ;load a large file
  216.  
  217.      Once DDKEY has been installed with a large buffer, all 
  218.      further file loads proceed normally.  Small files, meaning 
  219.      those of 1444 bytes or less, may still be loaded with a 
  220.      single line.  The following is a permissible installation:
  221.  
  222.           A>DDKEY /5/L SMALFILE
  223.  
  224.      This would load a small file into the default buffer, then 
  225.      DDKEY would go memory resident, creating a large 7,200 byte 
  226.      buffer.  All subsequent loads would use the large buffer.
  227.  
  228.      Since the buffer is variable, the program now checks all key 
  229.      files to make sure they will fit in the existing buffer.  If 
  230.      the definition file is too large, DDKEY will refuse to load 
  231.      it.  You may change the buffer only when installing DDKEY.  
  232.      You can, however, uninstall the program, and then reinstall 
  233.      with any new buffer value /2 to /9.
  234.  
  235.  
  236.           When the program is first loaded, you will see a sign-on
  237.      message, DDKEY 2.01 loaded, or else DXKEY.  DXKEY indicates
  238.      that the version for the enhanced BIOS has been loaded.
  239.  
  240.           DXKEY allows use of the enhanced BIOS even with older
  241.      programs, letting some 47 additional keys be redefined, such
  242.      as <Alt Esc>, <Alt Bksp>, <Alt ~>, <Alt .> and, if you have
  243.      them, F11 and F12.
  244.  
  245.           With DOS 4.0 or above, use DXKEY.  With DOS 2.x, a non- 
  246.      enhanced DDKEY will automatically load.  Those with DOS 3.x 
  247.      will find themselves betwixt and between.  The BIOS is 
  248.      enhanced, so DXKEY will load, but the DOS uses non-enhanced 
  249.      calls, and this may cause problems.  GW-Basic will hang the 
  250.      system if INKEY$ is fed an enhanced key.  And TSRs that were 
  251.      written before DOS 4 expect to intercept a non-enhanced key 
  252.      call to BIOS, so DXKEY will have to be loaded first.  If 
  253.      conflicts arise, either upgrade your programs and utilities 
  254.      or, more simply, install with:
  255.  
  256.            A>DDKEY /O      or     A>DDKEY /O /L FILESPEC
  257.  
  258.      This is the letter O for "old" or "original", and it will
  259.      force load the non-enhanced version, even if the enhanced
  260.      BIOS is present.  The /O parameter may be used at any time.
  261.      When other parameters such as /O or /T are used, they must 
  262.      precede the /L option (if present).  With /O DDKEY will only 
  263.      respond to non-enhanced BIOS calls, presumably within older 
  264.      programs, and will not even pop up at the DOS prompt in DOS 
  265.      5.0.
  266.  
  267.  
  268.           ON-THE-FLY DEFINITIONS:  Press <Alt =>.
  269.  
  270.           Hit <Alt => to define.  You will see the first ten 
  271.      definitions, and a small menu.  Hit <PgDn> or <Space> to see 
  272.      the next screen of definitions.  This is cyclical, and will 
  273.      start again at the beginning after the last screen has been 
  274.      viewed.
  275.  
  276.          Hit <Esc> to quit.  Other features, such as <^C> for 
  277.      clear, <P>rtSc, <C>aps, and <E>dit, will be explained later.  
  278.      Any single digit 1-9, with 0=10, will set the number of 
  279.      macros displayed on a page.
  280.  
  281.           <Return> or <D> displays the "KEY:" prompt to begin 
  282.      definitions.  To simplify, try this initially with Editing 
  283.      OFF.  Note that from the "KEY:" prompt striking <Alt => will 
  284.      again return you to the initial definition screen.
  285.  
  286.           With "KEY:" displayed, there are two command keys:  
  287.      <Backspace> or <Return> (Enter).  To end a session:  hit 
  288.      <Return> when prompted for a key.  To clear a definition:  
  289.      hit <Return> after the equals sign.  To terminate a 
  290.      definition:  hit <Return>.  To delete left:  use <Backspace>.  
  291.      Most of this should seem fairly intuitive.  To enter either 
  292.      of these keys in a definition itself, use the control 
  293.      equivalent, ^H or ^M, or else use <^Bksp> and <^Ret>.  These 
  294.      last keys will echo as <Bksp> and <Ret>, and that is the code 
  295.      they will generate.
  296.  
  297.           The four keys, <Tab>, <Bksp>, <Ret>, and <Esc> require 
  298.      two bytes of storage within a macro string.  Their control 
  299.      equivalents, ^I, ^H, ^M, ^[, which share the same ASCII 
  300.      value, require only one byte.
  301.  
  302.           When the bytes allocated for a definition are filled,
  303.      the program will beep.  Either terminate the definition with
  304.      a <Return>, or else backspace and edit the macro or use the
  305.      chain-to-macro feature discussed below.  If the program
  306.      refuses input, but does not beep, it probably means you are
  307.      trying to enter a two-byte extended character, such as a
  308.      function key or Alt key, when there is only one byte of
  309.      definition space remaining.
  310.  
  311.           Any key returned by the BIOS may be defined, except for 
  312.      ^Pause.  This is a word zero (00 00) and will be interpreted 
  313.      by DDKEY as a terminator for a key definition file.
  314.  
  315.  
  316.           EDITING MODE
  317.  
  318.           The current value for editing is shown on the menu.  Hit 
  319.      <E> to toggle this between on and off.  Remember that you may 
  320.      return to the menu from the "KEY:" prompt by hitting <Alt =>.  
  321.      When editing, in addition to creating macros, you may recall 
  322.      previous definitions and move throughout them using the 
  323.      cursor left and right keys.  The <Bksp> and <Ret> keys work 
  324.      as they do for standard definitions, so it is suggested you 
  325.      familiarize yourself with that mode first.  An onscreen 
  326.      prompt will show additional command keys.  To accept a 
  327.      definition either hit the <Esc> key, or else move to the end 
  328.      and hit <Ret>.  <Shf Tab> allows you to reassign a macro to 
  329.      another key.  DDKEY goes through a macro table from top down, 
  330.      just as the keys are displayed.
  331.  
  332.           Thus if you have a macro table showing:
  333.  
  334.                <Alt 2> = ...
  335.                          ...
  336.                <Alt 8> = ...
  337.  
  338.      you may reassign <Alt 8> as <Alt 2>, then call up <Alt 2> and 
  339.      reassign it as <Alt 8>.  Trying to do this in reverse order 
  340.      by first renaming <Alt 2> as <Alt 8> will block access to the 
  341.      original <Alt 8>.  No harm is done.  Just temporarily 
  342.      rename the duplicate.
  343.  
  344.  
  345.           <-> SELECT CURSOR
  346.  
  347.           If you pop up DDKEY from a program with an invisible 
  348.      cursor, editing will be difficult.  At the menu type hyphen 
  349.      <-> and select 1 to 5 for a standard cursor type:  monochrome, 
  350.      color, block, or none at all.  On exit, your original screen 
  351.      and (presumably invisible) cursor will be restored.
  352.            To select a cursor for use outside DDKEY change the 
  353.      prompt to YES by pressing <U>, then select 1-5.
  354.  
  355.           BLANK SCREEN:  At the menu type -9.
  356.  
  357.  
  358.           RECORD MODE
  359.  
  360.           A Record feature on the main menu now lets you record 
  361.      macros from within a program.  Simply hit <R> and give the 
  362.      key which will hold the definition.  You will then be 
  363.      returned to your program.  All keystrokes you enter will be 
  364.      recorded to the macro, but DDKEY should be completely 
  365.      transparent at this point.  None of DDKEY's editing keys will 
  366.      operate.  <Bksp> will not correct, <Ret> will not terminate.
  367.  
  368.           When 16 bytes of definition space remain, DDKEY will 
  369.      begin to chirp or hiccup at each key press.  This should be 
  370.      faint and unobtrusive, but will help to alert you as to how 
  371.      much space a macro is taking.
  372.  
  373.           When done with the macro, hit <Alt => to terminate.  A 
  374.      beep will tell you the macro has ended, but you will still 
  375.      remain in your program.  If all of the room allotted for a 
  376.      definition is used, a beep will alert you, and the macro will 
  377.      terminate.  (The one similarity to DDKEY's regular definition 
  378.      mode is that input will be refused if there is one byte of 
  379.      definition space remaining and you try to enter a two-byte 
  380.      extended key, such as a function or Alt key.)
  381.  
  382.           If you make a mistake, finish recording the macro, then 
  383.      use the <Alt => pop-up, turn Editing ON, and edit the macro 
  384.      as you normally would.
  385.  
  386.  
  387.           PAIR OR COMBINATION MACROS
  388.  
  389.           Both WordStar and VDE offer "Esc + Key" macro 
  390.      combinations as a sort of shorthand.  A similar feature is 
  391.      now available with DDKEY, extending the possible number of 
  392.      macros considerably, and allowing macro output without 
  393.      slowing your typing speed.  You need no longer worry about 
  394.      Alt-key conflicts.  Also, those restricted to typing with one 
  395.      hand will find pair macros a relief from hard to reach key 
  396.      combinations.
  397.  
  398.           With DDKEY the initial or trigger key is user 
  399.      selectable.  For speed in typing choose an ASCII key such as 
  400.      [, although any key should do as the trigger key.  The 
  401.      trigger key can be defined in pair with any regular, 
  402.      printable ASCII in the range 33 decimal through 126 decimal.  
  403.      This means the second key can be any letter, number, or 
  404.      symbol on the keyboard.
  405.  
  406.           The default trigger key is tilde <~>, although this is 
  407.      intended for demonstration purposes only.  After testing this 
  408.      feature you will probably want to change the trigger key to 
  409.      something more useful, or else to turn this feature off.
  410.  
  411.           Define a combination macro at the "KEY:" prompt, in 
  412.      regular or Record mode, by hitting the trigger key and 
  413.      following it with a printable ASCII, for example:  ~a, ~A, 
  414.      ~3, ~$.  In edit mode, you may reassign existing macros to 
  415.      pair macros.  Case matters, so ~a and ~A are completely 
  416.      different macros.  There are 94 possible pairs.  The display 
  417.      should indicate the pair of keys to which you have assigned 
  418.      the macro.  To play back the macro, hit the trigger key and 
  419.      then its complement, as:  ~a, ~A, ~3.  In other words, things 
  420.      are pretty much as you would expect them to be.
  421.  
  422.           In normal shorthand, one types an abbreviation and, if 
  423.      defined, this is erased by backspacing, then followed with 
  424.      the macro.  This is all right in word processors where it is 
  425.      normal to backspace and then retype.  This doesn't work so 
  426.      well in other programs, where outputting ~*<Bksp><Bksp> will 
  427.      throw out some annoying beeps at best, and cause unexpected 
  428.      results at worst.  Therefore DDKEY takes a different 
  429.      approach.  When you type the trigger key, nothing is output 
  430.      until the next key is struck.  If the next key makes a macro 
  431.      pair, then the macro is sent.  If the next key is undefined 
  432.      as a pair, then both the trigger key and the second key are 
  433.      output exactly as you typed them.  The main thing is not to 
  434.      be put off by the initial lack of display of the trigger key, 
  435.      but to just type as you normally would.
  436.  
  437.           Given the above, the trigger key could be the semicolon 
  438.      for normal prose writing.  Then ;a ;h ;H could be words or 
  439.      phrases, but ;<space> would appear as per normal (the <space> 
  440.      can never be part of a defined pair).
  441.  
  442.           Type the literal key, ^@, either immediately before or 
  443.      after the trigger key to keep it from expanding a macro.
  444.  
  445.           There is no penalty for creating a number of pair macros 
  446.      and saving them to a file.  If you later decide to change the 
  447.      trigger key, then all of your definitions and the displays 
  448.      will automatically adjust to the new value you selected.  See 
  449.      the section on customizing DDKEY with DINSTALL.  As with all 
  450.      code modification, remember to work only on a program copy.
  451.  
  452.  
  453.           CLEAR ALL DEFINITIONS FROM MEMORY
  454.  
  455.           You would presumably clear all keys in order to start 
  456.      another key file.  Therefore, once the buffer is clear, you 
  457.      will be prompted to enter a value for the bytes to be 
  458.      allotted to each key + definition.  The default setting is 
  459.      48, which allows 30 keys to be defined within the 1,440 byte 
  460.      buffer.  The value 48 includes 2 bytes for the key to be 
  461.      defined, 1 byte for the final 00, leaving 45 for each 
  462.      definition.  So decide how much room you need for 
  463.      definitions, and add 3.
  464.  
  465.          To use the 1,440 byte buffer efficiently, choose a value
  466.      that evenly divides such as 5, 6, 8, 9, 10, 12, 15, 16, 18,
  467.      20, 24, 30, 32, 36, 40, 45, 48, 60, 72, 80, 90, 96 (decimal).
  468.      If a number does not divide evenly, any remainder is unused.
  469.      Of course, this is only relevant if you intend to fill the
  470.      entire buffer.
  471.  
  472.  
  473.           VARIABLE ENTRY
  474.  
  475.           If <Alt -> is entered in a definition string, it will
  476.      cause the macro, when executed, to pause for user entry.  All
  477.      entered keys will be literal.  Terminate variable entry with
  478.      <Return>.  This can be useful in DOS for entering file names
  479.      in a command line.  The <Alt -> key may be thought of as a
  480.      string of dashes, or as an underline for a fill-in-the-blanks
  481.      type of entry.  Example definitions:
  482.  
  483.           LHA P <Alt -> *.DOC *.TXT READ*.* | MORE
  484.           LHA E <Alt -> *.EXE *.COM
  485.  
  486.      When either of the above macros halt, enter the name of an 
  487.      LHA archive (the full name if a self-extracting EXE or COM 
  488.      file).  Press <Ret> for the macro to continue.  The above 
  489.      examples could optionally end with a final <Ret>.
  490.  
  491.  
  492.           TOGGLE CAPSLOCK AND NUMLOCK
  493.  
  494.           Within a definition string, #C will turn on CapsLock,
  495.      and #c will turn it off.  If you have an IBM AT or better,
  496.      your indicator lights will actually display the status of the
  497.      lock keys.  On other keyboards the CapsLock and NumLock
  498.      lights respond only to the corresponding key press, so there
  499.      is no visual clue that CapsLock has been turned on.  Control
  500.      of CapsLock is essential to scriptwriters, who must deal with
  501.      margin and capitalization changes every other line.  A single
  502.      macro could create wide description margins, then conclude
  503.      with:  #C<Alt ->#c<^M>   This would turn on CapsLock, and
  504.      begin variable entry (i.e. LIGHTNING FLASHES BEHIND JONES'S
  505.      HEAD).  Terminating variable entry with a "Return" will then
  506.      cause CapsLock to be turned off, and a carriage return to be
  507.      executed.
  508.  
  509.           Similarly #N/#n will toggle Numlock on/off within a
  510.      macro.
  511.  
  512.  
  513.           PAUSE OR WAIT
  514.  
  515.           Within a macro string a #W or #w will cause almost a 
  516.      three-fourths second delay.  This is not a toggle, so either 
  517.      upper or lower case may be used.  For a one-and-a-half-second 
  518.      delay use #w#w.  This may be helpful for database users.
  519.           WAIT FOR KEY:  To have more control over a delay, simply 
  520.      use variable entry, <Alt ->.  Then continue the macro at any 
  521.      time by pressing <Enter>.
  522.  
  523.  
  524.           CHAIN TO ANOTHER MACRO
  525.  
  526.           End a macro with <Alt => and then the key you want to
  527.      chain to, for example:  <Alt =><Alt G>.  DO NOT chain a macro
  528.      to itself.  Chaining to an ASCII key requires three bytes.
  529.      Chaining to an extended key requires four bytes.
  530.           Defined keys are exactly specified with scan code and
  531.      ASCII value, which means that DDKEY distinguishes between
  532.      keypad and keyboard keys.  Within a macro, however, only the
  533.      ASCII value is saved for most keys; the scan code is ignored.
  534.      This means the buffer is only about half the size it would
  535.      normally be.
  536.  
  537.           Thus keypad numerals and symbols will appear as 
  538.      duplicates when chaining.  If, say, both the keyboard "*" and 
  539.      the keypad "*" are defined, then an <Alt =>* will chain to 
  540.      the "*" which occurs first in the definition queue (nearest 
  541.      the top in the screen display).  Note that clearing a key 
  542.      definition, and then redefining it will result in that key 
  543.      appearing last in the definition table.
  544.  
  545.           Chain to a pair macro by specifying the concluding ASCII 
  546.      key; that is, in order to chain to ~H use <Alt =>H.
  547.  
  548.  
  549.           NO-TRANSLATE KEY
  550.  
  551.           When typing use ^@ to return the next struck key as a
  552.      literal, even if it was previously defined.  This applies to
  553.      <Alt => itself.  The ^@ key is the old teletype NUL, and may
  554.      be thought of as nullifying any definition.
  555.  
  556.  
  557.           MAKE DDKEY ACTIVE/INACTIVE
  558.  
  559.           Striking the literal key twice, ^@^@, will make ALL
  560.      definitions and features inactive.  Useful for turning DDKEY
  561.      off while in another program, when you want to use a number
  562.      of defined keys with their original values.  To reactivate
  563.      DDKEY, again strike the literal key twice:  ^@^@.  Each time
  564.      ^@^@ is struck you will hear a beep.
  565.  
  566.  
  567.           AUTOMATIC CAPITALIZATION AND DIALOGUE
  568.  
  569.           Hit <C> at the menu to toggle automatic capitalization.  
  570.      From a program use <Alt =>, <C>, <Esc>.  When on, the next 
  571.      letter struck after a period, question mark, or exclamation 
  572.      point will be capitalized.  This can be a great convenience 
  573.      (if not addictive), but it can also be a nuisance, so a 
  574.      pending capital can be aborted.  Striking ^@ shuts off the 
  575.      capital pending state; it need not be hit directly before the 
  576.      letter you wish to remain lowercase.  Striking any defined 
  577.      non-letter key will cancel a pending capital. This last 
  578.      assumes that if a macro has been executed, then the reason 
  579.      for the capital probably no longer exists.
  580.  
  581.           As an additional quirk for writers, the apostrophe key 
  582.      (') will generate a quote (") after a period, question mark, 
  583.      or exclamation point.  If an apostrophe directly follows a 
  584.      comma, excluding spaces, then it will also generate a quote. 
  585.      The following dialogue was typed without resorting to the 
  586.      shift key.
  587.  
  588.                "The missing piece to the map."  She stretched out
  589.           a finger.
  590.                "No," he said, "it's only a clever fake.  Ryshenko
  591.           managed to beat us here.  We've been set up."
  592.  
  593.      Note that the apostrophe key not only generates quotes, but
  594.      that it functions like a normal apostrophe within a sentence.
  595.      I realize the use of double quotes is American usage, and
  596.      that some English writers prefer the single quote mark, but
  597.      there it is.
  598.  
  599.  
  600.           ALARM
  601.  
  602.           Press <Alt =><A> to set the alarm.  Enter an alarm time 
  603.      using a.m. or p.m., or use <Return> or <Esc> to leave the 
  604.      current value unaffected.
  605.           The alarm will sound with a rather obnoxious beep.  It 
  606.      should be loud enough to call you back to your desk after a 
  607.      task requiring a set interval has passed.  Helpful for making 
  608.      sure you get to meetings, or that you catch the beginning of 
  609.      the nine o'clock movie.
  610.           The alarm uses the timer tick, which means that it can 
  611.      be used on any system, and that it is very accurate.  The 
  612.      alarm is good for twenty-four hours from the current time.
  613.  
  614.  
  615.           TABLE OF ASCII CODES
  616.  
  617.           Press <Alt =><T>, then use <PgUp> and <PgDn> to cycle 
  618.      through the ASCII chart.  Useful for programmers, or for 
  619.      those needing printer hex codes.  The table can be used for 
  620.      converting hex to decimal or vice versa.
  621.  
  622.  
  623.           PRINT SCREEN
  624.  
  625.           Press <Alt =><P> to print your program's active screen 
  626.      to a file.  Like shelling to DOS, this feature should be 
  627.      treated with a certain reserve.  If you have spent two hours 
  628.      on an installation routine, why not save your work first, and 
  629.      only then take a screenshot of it?
  630.  
  631.           The screen will be saved in nondocument mode, with a 
  632.      hard carriage return at the end of each line, and all 
  633.      trailing spaces removed.  The sequential output files, 
  634.      DDKEY.001, DDKEY.002, and so forth, will be written to the 
  635.      default drive and directory.  Initially, a search will be 
  636.      made through existing files to find the next sequential 
  637.      number.  Any time DDKEY finds an existing file with the same 
  638.      number as the one it is trying to write to, it will cancel 
  639.      the write, advance the counter, and try again.
  640.  
  641.           The screen may print immediately, or it may be necessary 
  642.      to strike a key first, thus fulfilling the original key 
  643.      request which DDKEY intercepted.  The screen is already in 
  644.      buffer, and changes to it at this point will not affect the 
  645.      printed file.
  646.  
  647.           Printing the screen is particularly useful for working 
  648.      with archives.  Large DOC files can be compressed, then 
  649.      scrolled to the screen and a screenshot taken.  In the 
  650.      following examples, press <P> on the DDKEY menu, then a 
  651.      second key to print the screen:
  652.  
  653.                     PKUNZIP -CM ZIPFILE
  654.                     LHA P LZHFILE | MORE
  655.  
  656.      A last example takes care of the final possibility in doing a 
  657.      print screen:
  658.  
  659.                     LHA P LZHFILE
  660.  
  661.      Here the file is scrolled to the screen, with <^S> used to 
  662.      stop the output.  Then press <Alt =><P>.  You have saved the 
  663.      screen, but nothing will appear to happen because DOS is 
  664.      being used to scroll the file.  The screen will not print 
  665.      until either the file is done scrolling, or until you hit 
  666.      Ctrl-Break to exit.  Once DOS is freed, the captured screen 
  667.      will print.  While waiting for a screen to print, do NOT hit 
  668.      <Alt => again, since this will destroy the screenshot and 
  669.      abort the print.  DDKEY has only one screen buffer, which is 
  670.      used for both the pop up and the print screen feature.
  671.  
  672.  
  673.           TOGGLE CASE:  CTRL-^ OR ^6
  674.  
  675.           Writing is rewriting.  Combining sentences means that 
  676.      one must often change a capital to a lowercase, or vice 
  677.      versa.  Users of VDE and early users of WordStar have the 
  678.      very convenient ^^ (WordStar now refers to this as ^6, and to 
  679.      avoid confusion I will follow this designation).  In WordStar 
  680.      5.5 this command was abolished.  DDKEY can restore it.
  681.  
  682.           WordStar uses ^6 to convert hard carriage returns to 
  683.      soft.  WSCHANGE can assign this function to ^N.  Otherwise ^N 
  684.      doesn't do anything but split a line, which is merely ^M^S.  
  685.      This frees up ^6 for its former use as a case toggle, which 
  686.      is turned on with DDKEY from the command line:
  687.  
  688.            A>DDKEY /T      or     A>DDKEY /T /L FILESPEC
  689.  
  690.      This is intended to make this feature accessible from batch 
  691.      files.  The first time /T is used, ^6 becomes a case toggle.  
  692.      The next time /T is used, it reverts to its default off 
  693.      state.  Thus a batch file might contain the lines:
  694.  
  695.           ddkey /t/l ws.key     or     ddkey /t/o/l ws.key
  696.           ws
  697.           ddkey /t/l dos.key
  698.  
  699.      The case toggle only works through WordStar, so you would 
  700.      remove it immediately on exiting WordStar.  The ^6 case 
  701.      toggle works in insert mode, since virtually all editing is 
  702.      done with insert on.  What it does is use the BIOS to read 
  703.      the character under the cursor.  Then DDKEY issues a ^V to 
  704.      turn insert off, then sends the reverse case of the character 
  705.      read, then a ^V to turn insert back on.  If the character 
  706.      under the cursor is not a letter then a ^D is used to move 
  707.      the cursor to the right.
  708.  
  709.  
  710.           DKEY-0K  (registered only)
  711.  
  712.           Since DDKEY operates in text mode, it should be possible 
  713.      to save and restore the current video screen by using video 
  714.      RAM itself.  If you have at least a CGA card and a compatible 
  715.      computer this will save 4k of DOS RAM.  DKEY-0K will save the 
  716.      screen to either 0B400 or 0BD00 depending on whether the 
  717.      computer is in monochrome or color text mode.  Basically, 
  718.      just try it and see if it works.  After an <Alt => pop-up, 
  719.      the screen should be restored.  If so, rename DKEY-0K and use 
  720.      it.  This will work for most people, but not for everyone, so 
  721.      I am treating DKEY-0K simply as a bonus.
  722.  
  723.  
  724.           THE KEYPAD DEFINITIONS:  WS.KEY
  725.  
  726.          The included definitions are for the keypad of the 84 key
  727.      AT-style keyboard.  Another use of the keypad would be to hold
  728.      formatting code for writing screenplays.  In WS.KEY the key
  729.      interval value is not 48, but 32, which means 45 keys may be
  730.      defined, leaving 30 free for the user.
  731.  
  732.       Paragraph:
  733.           Begin/Previous       Next       Mark       Mark to end
  734.                (7)             (8)        (9)          (*)
  735.  
  736.       Sentence:
  737.           Begin/Previous       Next       Mark       Mark to end
  738.                (4)             (5)        (6)          (-)
  739.  
  740.  
  741.            Quick Down     Quick Across  Go Marker
  742.                (1)             (2)        (3)
  743.  
  744.  
  745.                  Delete Word Left      Place Marker   Mark word
  746.                        (0)                (.)          (+)
  747.  
  748.       ^Backspace also gives "delete word left" (as in PC-Write).
  749.  
  750.          Load DDKEY /L WS.KEY and look at the display.  Most
  751.      definitions will be self-explanatory.  Quick down (1)
  752.      generates a series of ^Xs, which WordStar can't handle:
  753.      after the first ^X the rest are gobbled.  Thus this string is
  754.      preceded with the (undocumented) feature ^Q~ which forces
  755.      WordStar to accept the macro as given, without losing
  756.      keystrokes.  Also, it may not be clear from the opening
  757.      display, but "delete word left" is <space>^A^T.  Without the
  758.      initial space, the command might not only wipe out any mess
  759.      to the left of the cursor, but also the word to the right.
  760.  
  761.          The definitions assume double-spaced text, with a
  762.      WordStar added soft carriage return between paragraphs.  To
  763.      make them work with single-spaced text, with two hard
  764.      carriage returns between paragraphs, make these changes:
  765.  
  766.                <Keypad 8>   add ^F to end
  767.                <Keypad 9>   add ^F before final ^KK
  768.                <Keypad *>   delete ^A before final ^KK
  769.  
  770.      Corrections or reassignments may be done with DDKEY in edit 
  771.      mode.
  772.  
  773.  
  774.           DINSTALL - DDKEY AND DKEY-0K INSTALLATION
  775.  
  776.           DINSTALL changes the default settings in DDKEY to 
  777.      accommodate your needs.  The opening screen contains 
  778.      instructions, so anyone familiar with DDKEY can run DINSTALL 
  779.      immediately by typing at the DOS prompt:  DINSTALL DDKEY.COM
  780.  
  781.           If you have renamed DDKEY.COM, substitute that name.  
  782.      Keep an original, unmodified version of DDKEY safe so that 
  783.      you can refer back to it if problems arise.  First-time users 
  784.      should try the default settings before making any changes.
  785.  
  786.           The first question asks:  On the enhanced keyboard, make 
  787.      duplicate Home, PgUp, etc. keys equivalent to the keypad?  
  788.      Home on the keypad is 4700, while the duplicate Home is 
  789.      47E0. If you don't wish to define these keys, you may want 
  790.      to make them equivalent.  Older programs look for an ASCII 0 
  791.      as the definition of an extended key, and miss the E0 code.  
  792.      One solution, if a program cannot recognize the duplicate 
  793.      keys, is to install DDKEY with a /O.  The old BIOS 
  794.      automatically converts all cursor movement keys to the 
  795.      original keypad values.
  796.  
  797.           Unfortunately the old BIOS cuts down on the definition 
  798.      possibilities created by the enhanced BIOS, so you may wish to 
  799.      create your own filter with DINSTALL.  (This restores the 
  800.      DDKEY 1.52 filter, which watches for an E0 ASCII and zeros 
  801.      it.)  If so, answer Y to the first questions.
  802.  
  803.           The remaining options are self-explanatory.  The 
  804.      DINSTALL layout follows, with the default settings enclosed 
  805.      in square brackets:
  806.  
  807.      On the enhanced keyboard, make duplicate Home, PgUp, etc keys
  808.      equivalent to keypad  [N]:
  809.      Menu and macro display pop-up key  [Alt =]:
  810.      Leave Shorthand ON  [Y]:
  811.      Shorthand trigger key  [~]:
  812.      Record mode, begin speaker click when 5-50 bytes left  [16]:
  813.      Display 5-14 macros per page  [10]:
  814.      Automatic Caps toggle is initially OFF [Y]:
  815.      Edit mode toggle is initially OFF [Y]:
  816.      No translate key, active/inactive key  [^@]:
  817.      Each definition is allotted 5-96 bytes of space  [48]:
  818.      Use whatever screen color exists for pop-up display  [Y]:
  819.      Save current settings?  [Y]:
  820.  
  821.           Note that changing the pop-up key, <Alt =>, also changes 
  822.      the key used to end input in Record Mode.
  823.  
  824.           By default, DDKEY uses whatever screen attributes are 
  825.      under the cursor when it is popped up.  This means the color 
  826.      display changes to match the current program (though if the 
  827.      cursor is on highlighting or in a menu, the resulting screen 
  828.      color can be a bit unexpected).  To set your own color from a 
  829.      chart, answer N when queried about using the existing screen 
  830.      color.  If selected, this is the color the pop-up screen will 
  831.      always be.
  832.  
  833.  
  834.           COMMENTS
  835.  
  836.           There are some problems in WordStar arising from the 
  837.      getchar() function in C, with which WordStar was compiled.  
  838.      An Alt key cannot have spaces within its definitions; that 
  839.      is, defining "<Alt G> = one two three" will result in output 
  840.      of "onetwothree".  Also, getchar() reads in an entire macro 
  841.      at once.  When a deletion occurs, WordStar goes to the undo 
  842.      buffer and clears the getchar() buffer holding the macro, so 
  843.      everything following a ^T or ^G will be lost.  I use WordStar 
  844.      to define Esc Z as ^T^F^U, then use DDKEY with <Alt T> = 
  845.      <Esc>Z.  A rather roundabout way to do a word transpose, but 
  846.      it works.
  847.  
  848.           DDKEY does require a small stack of up to 54 bytes.  
  849.      Professional programs reserve a 150- to 250-byte stack, which 
  850.      is more than adequate.  A program with a zero-byte stack may 
  851.      have its code overwritten by an <Alt => pop up; if you ever 
  852.      encounter a problem after a pop up (usually with one specific 
  853.      program function), this is likely the cause.
  854.  
  855.           Thanks to Eric Isaacson for A86 and to Eric Meyer for
  856.      VDE; without them this program would never have been written.
  857.      Also thanks to those whose comments and suggestions helped to
  858.      improve this program.
  859.  
  860.  
  861.           OMBUDSMAN - Association of Shareware Professionals
  862.  
  863.           David M. Dibble is a member of the Association of 
  864.      Shareware Professionals (ASP).  ASP wants to make sure that 
  865.      the shareware principle works for you.  If you are unable to 
  866.      resolve a shareware-related problem with an ASP member by 
  867.      contacting the member directly, ASP may be able to help.  The 
  868.      ASP Ombudsman can help you resolve a dispute or problem with 
  869.      an ASP member, but does not provide technical support for 
  870.      members' products.  Please write to the ASP Ombudsman at 545 
  871.      Grover Road, Muskegon, MI 49442 or send a CompuServe message 
  872.      via CompuServe Mail to ASP Ombudsman 70007,3536.
  873.  
  874.  
  875.      NOTES ON SHAREWARE
  876.  
  877.           Shareware distribution gives users a chance to try 
  878.      software before buying it.  If you try a Shareware program 
  879.      and continue using it, you are expected to register. 
  880.  
  881.           Copyright laws apply to both Shareware and 
  882.      commercial software, and the copyright holder retains all 
  883.      rights, though shareware authors my grant specific rights to 
  884.      copy and distribute the software, in some cases requiring 
  885.      written permission before a commercial disk vendor may copy 
  886.      their Shareware.
  887.  
  888.           Shareware is a distribution method, not a type of 
  889.      software.  Because the overhead is low, prices are low.
  890.      Shareware has the ultimate money-back guarantee--if you don't 
  891.      use the product, you don't pay for it.
  892.  
  893.           DDKEY is a shareware program and is provided at no 
  894.      charge to the user for evaluation.  Feel free to share it 
  895.      with your friends, but please do not give it away altered or 
  896.      as part of another system.  If you find this program useful 
  897.      and find that you continue to use DDKEY after a reasonable 
  898.      trial period, you must make a registration payment to David 
  899.      M. Dibble.  The $18 registration fee ($19 for 3½" disks) will 
  900.      license one copy for use on any one computer at any one time.  
  901.      You must treat this software just like a book.  An example is 
  902.      that this software may be used by any number of people and 
  903.      may be freely moved from one computer location to another, so 
  904.      long as there is no possibility of it being used at one 
  905.      location while it's being used at another:  just as a book 
  906.      cannot be read by two different persons at the same time.
  907.  
  908.           Anyone distributing DDKEY for any kind of remuneration 
  909.      must first contact David M. Dibble at the above address for 
  910.      authorization.  This authorization will be automatically 
  911.      granted to distributors recognized by the (ASP) as adhering 
  912.      to its guidelines for shareware distributors, and such 
  913.      distributors may begin offering DDKEY immediately (however, 
  914.      David M. Dibble must still be advised so that the distributor 
  915.      can be kept up-to-date with the latest version of DDKEY).
  916.  
  917.