home *** CD-ROM | disk | FTP | other *** search
/ Simtel MSDOS 1992 December / simtel1292_SIMTEL_1292_Walnut_Creek.iso / msdos / turbopas / bonus507.arc / TPKEYS.ARC / TPKEYS.DOC next >
Text File  |  1989-01-25  |  6KB  |  130 lines

  1. TPKEYS - Keyboard installation program for Turbo Professional 5.0
  2. -----------------------------------------------------------------
  3. TurboPower Software
  4. 1/89
  5. Version 5.04
  6. Released to the public domain
  7.  
  8. Overview
  9. ------------------------------------------------------------------------------
  10. TPKEYS serves two purposes. The first and most obvious is to provide a
  11. convenient and easy means of customizing the key assignments in several Turbo
  12. Professional units: TPEDIT, TPENTRY, TPHELP, TPMENU, and TPPICK. The second is
  13. to demonstrate how to write an installation program using the TPCLONE and
  14. TPCMD units.
  15.  
  16. Using TPKEYS
  17. ------------------------------------------------------------------------------
  18. When you start TPKEYS, it will try to open five files:
  19.  
  20.   TPEDIT.TPU
  21.   TPENTRY.TPU
  22.   TPHELP.TPU
  23.   TPMENU.TPU
  24.   TPPICK.TPU
  25.  
  26. If any one of these files cannot be found, it will abort with an error
  27. message. Although it is best to change to the directory containing the TPU
  28. files before running TPKEYS, the files will always be found as long as they
  29. exist in a directory on DOS's PATH.
  30.  
  31. After the files have been opened, you'll see a main menu displaying the names
  32. of the five units. Move the menu highlight to the name of the unit whose key
  33. assignments you wish to modify and press <Enter>. (If you have a mouse, you
  34. can move the mouse cursor to the appropriate menu item and click the left
  35. mouse button instead.)
  36.  
  37. The middle portion of the screen will then show a list of key assignments for
  38. the unit. The far left column shows the name of each command, and the next
  39. three columns show the current key assignment(s), if any. Each command may
  40. have a maximum of 3 key sequences assigned to it, and each sequence may
  41. contain a maximum of 6 keys (keys with extended scan codes, such as <F1> and
  42. <Left>, count as 2 keys).
  43.  
  44. To add or change a key assignment, move the cursor to the appropriate row and
  45. column, then press <Enter>. (You can also use a mouse to move the cursor.
  46. Clicking the left button once moves the cursor to the item pointed to by the
  47. mouse, and clicking it a second time selects the item for editing.) The key
  48. editor will then be displayed in a popup window in the middle of the screen.
  49.  
  50. Within the key editor, the following keys and mouse buttons have special
  51. meanings:
  52.  
  53.     <Bksp>
  54.     Delete previous char.
  55.  
  56.     <C>
  57.     Clear key assignment.
  58.  
  59.     <R>
  60.     Restore; cancel changes and keep editing.
  61.  
  62.     <Enter>, <ClickLeft>
  63.     Accept key assignment.
  64.  
  65.     <Esc>, <ClickRight>
  66.     Cancel edits and exit from editor. Pressing any mouse button combination
  67.     involving the center button (on a three-button mouse) will also execute
  68.     this command.
  69.  
  70.     <ScrollLock>, <ClickBoth>
  71.     Toggle between Command and Literal mode. <ClickBoth> can be used only
  72.     while in Command mode.
  73.  
  74. In Command mode, the default, the key and mouse button combinations listed
  75. above perform the functions as described. In Literal mode, only <ScrollLock>
  76. has any special meaning; all other key and mouse button combinations are
  77. inserted into the key string being edited.
  78.  
  79. Although the behavior of the key editor is quite intuitive, there are a couple
  80. of things that you should keep in mind when using it. First, "normal keys"
  81. (alphabetic and numeric characters, punctuation marks, <Space>, etc) should
  82. almost never be used for commands. (The only real exceptions to this rule are
  83. the "Increment choice" and "Decrement choice" commands in TPENTRY.) To
  84. discourage use of some of these keys, the key editor translates alphabetic
  85. characters into their control-key equivalents: e.g., <A> is translated into
  86. <^A>. Second, you should be especially careful when editing commands with the
  87. word "mouse" in their names. These commands should be assigned only to mouse
  88. button combinations, not to keys.
  89.  
  90. After you have made your changes to a given set of commands, press <Esc> or
  91. <ClickRight> to return to the main menu. TPKEYS will then take a few moments
  92. to analyze the edits that you've made. The first thing it will do is to check
  93. for conflicting key assignments. For example, if one command were assigned to
  94. <^Q> and another to <^Q><^W>, or if two commands were assigned to the same key
  95. combination, a conflict would arise. All conflicting key assignments would
  96. then be highlighted, and you would be given an opportunity to resolve the
  97. conflicts. TPKEYS will also check to insure that there is room in the
  98. installation area of the unit for all the key assignments that you've
  99. selected. If there isn't enough room, an error message will be displayed, and
  100. you'll be given an opportunity to eliminate unnecessary key assignments in
  101. order to make more room.
  102.  
  103. Once you're back at the main menu, you'll have two choices. You can either
  104. select another unit for editing, or you can press <Esc> or <ClickRight> to
  105. exit from the program. When you do decide to exit, TPKEYS will check to see if
  106. any key assignments have been changed. If any changes were made, you will be
  107. asked to confirm that you want to "Install changes permanently". Press <Y> to
  108. save your changes, or <N> to cancel them. Assuming that you answer Yes, TPKEYS
  109. will then modify the installation areas in all units where changes were made.
  110. (Note that the date/time stamps on the modified TPU files will not be changed.
  111. TPKEYS preserves the old date/time stamp to try to prevent unnecessary
  112. recompilation.)
  113.  
  114. TPKEYS as Model
  115. ------------------------------------------------------------------------------
  116. As indicated earlier, part of our purpose in providing this program is to give
  117. you a model to use when creating your own programs. In one key respect,
  118. however, TPKEYS is an atypical model.
  119.  
  120. Most installation programs modify only a single file. TPKEYS works with five,
  121. and much of the complexity of TPKEYS is due to the fact that it is, in a
  122. sense, five installation programs in one. Please try to keep this in mind when
  123. studying the source code for the program. TPKEYS would be much smaller and
  124. simpler if it only had to work with a single file. If you intend to modify
  125. TPKEYS for use with one of your own programs, a good first step might
  126. therefore be to trim the program down to the point where it works with only a
  127. single file. Once you've done that, you should have a much better idea about
  128. how to add the additional features that you need for your particular
  129. application.
  130.