home *** CD-ROM | disk | FTP | other *** search
/ Club Amiga de Montreal - CAM / CAM_CD_1.iso / files / 627b.lha / MenuHelper_v37.1 / MenuHelper.doc.pp / MenuHelper.doc
Text File  |  1992-04-09  |  27KB  |  546 lines

  1.     
  2.                              MenuHelper
  3.  
  4.  
  5.                           ©1991 Ken Lowther
  6.  
  7.  
  8.    MenuHelper is a release 2.0 commodity that allows easier keyboard
  9. access to menus than what Intuition provides.  Intuition utilizes the
  10. Right Amiga-Right Alt key combination along with a cursor key to move
  11. the mouse pointer anywhere on the screen.  This is a simple yet flexible
  12. approach, however, if you have ever tried to use it for menu selection
  13. you probably found it to be very cumbersome.  Keyboard shortcuts are 
  14. usually provided to invoke menu selections, but unless you use a
  15. particular program a lot its hard to remember all the key combinations
  16. from one program to the next.  You then find yourself reaching for the
  17. mouse to see what menu options are available.
  18.  
  19.     With MenuHelper, all you need do is press the 'Activate' key
  20. combination and the menu for the currently active window will appear.
  21. You may then use the 'Move' key combinations to move through the menu as
  22. you choose.  When you have reached the menu item you desire you can select
  23. it by pressing the 'Select' key combination.  If you change your mind and
  24. decide not to select an item, the 'Deactivate' key combination may be used
  25. to exit the menu without making a selection.
  26.  
  27.     MenuHelper remembers the location of the mouse pointer when a menu
  28. session is started and repositions the pointer to that location when the
  29. session is ended.  You can take over the menu session at any time by
  30. pressing the right mouse button.  This causes MenuHelper to relinquish
  31. control of the mouse pointer.
  32.  
  33.  
  34.  
  35. Workbench or CLI
  36.  
  37.     MenuHelper may be executed from either the workbench or the command
  38. line interface (CLI).  Regardless of how MenuHelper is started, the
  39. tooltypes in MenuHelper's icon are always used to determine MenuHelper's
  40. initial configuration settings.  Default configuration settings are
  41. provided, as described below, if a MenuHelper icon does not exist or if
  42. a particular tooltype does not exist in the icon.
  43.  
  44.     When executing MenuHelper from the CLI, command line options may be
  45. used to override the settings in MenuHelper's icon. These command line
  46. options take the same form as the icon tooltypes.  Note that options
  47. containing embedded spaces must be surrounded by double quotes.  For
  48. example, the following command could be used to override MenuHelper's
  49. icon settings:
  50.  
  51.     MenuHelper CX_POPUP=NO "ACTIVATE=ralt help" AUTOWRAP=NO
  52.  
  53.  
  54.  
  55. Configuration Window
  56.  
  57.     A configuration window is presented upon startup, unless CX_POPUP=NO
  58. is specified as a command line option or a tooltype in MenuHelper's icon.
  59. It may also be activated by pressing the CX_POPKEY key combination or
  60. double clicking on MenuHelper's icon at any time subsequent to startup.
  61. This window allows you to alter the configuration settings that control
  62. MenuHelper's execution.  It is divided into three major sections as
  63. follows:
  64.  
  65.     Key Definitions
  66.  
  67.         This section contains eight string gadgets that allow you to modify
  68.     the key combinations that MenuHelper uses to activate, deactivate,
  69.     select and move through menus.  To modify a definition, you must
  70.     activate it's associated string gadget by either clicking on the desired
  71.     gadget or pressing the keyboard shortcut key defined for that gadget.
  72.     The keyboard shortcut key is easily identified as it is the only
  73.     underlined character in the text description of the gadget.  Once
  74.     activated, you may then enter the definition of the key/key combination
  75.     that you wish to use.  Refer to the 'Key Definition Expressions' section
  76.     below for a description of valid expressions.  After you have entered
  77.     your new definition you must either press the return key to enter it or
  78.     the tab/shift tab key to advance forward/backward to the next key
  79.     gadget.  Note that you must use one of these keys to exit a modified
  80.     string gadget otherwise MenuHelper will not see the changes that you
  81.     have made.  Key definitions may be entered for each of the following:
  82.  
  83.         Activate    - defines the key combination used to start a menu
  84.                       session.
  85.  
  86.         Deactivate  - defines the key combination used to end a menu
  87.                       session without selecting a menu item.
  88.  
  89.         Select      - defines the key combination used to select the menu
  90.                       item that you are currently positioned on.
  91.  
  92.         Up          - defines the key combination used to move up in the
  93.                       menu.
  94.  
  95.         Down        - defines the key combination used to move down in the
  96.                       menu.
  97.  
  98.         Left        - defines the key combination used to move left in the
  99.                       menu.
  100.  
  101.         Right       - defines the key combination used to move right in the
  102.                       menu.
  103.  
  104.         Modifier    - defines the key combination used to modify the action
  105.                       of the 'Select' and 'Move' keys.  Refer to "Modifier
  106.                       Key Definition" below for more information.
  107.  
  108.  
  109.  
  110.     Options
  111.  
  112.         This section contains six option boxes that depict the settings of
  113.     various MenuHelper options.  A checkmark appearing in the option box
  114.     indicates that the option is 'turned on'.  The option is 'turned off'
  115.     if the option box is empty.  You may change the setting of an option
  116.     by clicking on the option box or pressing the keyboard shortcut key
  117.     that is defined for the option.  Again, the keyboard shortcut key is
  118.     the underlined character in the text description of the option.  The
  119.     following options are available.
  120.  
  121.         Hide Pointer        - Causes MenuHelper to turn off sprites whenever
  122.                               a menu session is started.  Since Intuition's
  123.                               pointer is a sprite, this has the effect of
  124.                               hiding the pointer from view during the entire
  125.                               menu session.  Sprites are turned on again
  126.                               when the menu session is ended.  While the
  127.                               pointer is hidden, the only indication that
  128.                               you have as to where you are in the menu is
  129.                               the menu highlighting provided by Intuition.
  130.                               This can become confusing when you activate a
  131.                               menu that contains disabled items because the
  132.                               disabled items do not highlight when you move
  133.                               over them.  The 'Skip Disabled' option
  134.                               described below can be used to minimize this
  135.                               problem.
  136.  
  137.         Skip Disabled       - This option tells MenuHelper to skip over
  138.                               disabled menus, menu items and menu subitems.
  139.                               The following exceptions should be noted.
  140.  
  141.                               If an entire subitem menu is disabled,
  142.                               MenuHelper will allow you to move into the
  143.                               subitem menu, but you will not be able to move
  144.                               around within subitem menu itself.  This
  145.                               allows you to 'step through' the disabled
  146.                               subitem menu to get to the next menu.
  147.  
  148.                               When starting a menu session, MenuHelper may
  149.                               position you on the menu item/subitem that you
  150.                               were on when the last menu session ended even
  151.                               if that menu item/subitem has been disabled
  152.                               since the last menu session occurred. Refer
  153.                               to the remember mode section below.
  154.  
  155.         Use Menu Bar        - This option causes MenuHelper to position you
  156.                               in the menu bar when moving left or right from
  157.                               one menu list to the next rather than
  158.                               positioning you on the first available menu
  159.                               item in the list. This allows you to
  160.                               predictably move through the menus without
  161.                               having to step through any subitem lists that
  162.                               you may run into along the way.
  163.  
  164.         Auto Wrap           - When this option is specified, MenuHelper will
  165.                               move to the opposite extreme when the
  166.                               start/end of a menu list is reached.  For
  167.                               example, pressing the 'down' key combination
  168.                               when you are at the bottom of a menu list will
  169.                               move you to the top of the list.
  170.  
  171.         Remember Subitems   - Tells MenuHelper to extend its remember mode
  172.                               to the subitem level.  This means that if you
  173.                               were positioned on a subitem when you ended
  174.                               the last menu session, MenuHelper will
  175.                               reposition you on that subitem when you begin
  176.                               the next menu session.  If this option is not
  177.                               specified, you will be positioned on the menu
  178.                               item that contains the subitem list.  Note
  179.                               that this option has no effect if MenuHelper's
  180.                               remember mode is set to 'None'.
  181.  
  182.         Override RMBTRAP    - RMBTRAP is a flag that is set by programs that
  183.                               wish to use the right mouse button for their
  184.                               own purposes rather than dedicating it to menu
  185.                               operations only.  A common example of this can
  186.                               be found in most paint programs where the
  187.                               right mouse button is used for drawing in one
  188.                               color and the left mouse button is used for
  189.                               drawing in another.  Usually, these type
  190.                               programs force you to move the mouse pointer
  191.                               to a certain area of the window, the title bar
  192.                               for example, if you want to access the menu.
  193.                               When they detect that the pointer is at that 
  194.                               at that certain area, they clear the RMBTRAP
  195.                               flag allowing normal menu operations to take
  196.                               place.  This option determines what
  197.                               MenuHelper's action will be when you try to
  198.                               activate a menu and it's associated window has
  199.                               the RMBTRAP flag set.  If this option is
  200.                               turned off, MenuHelper will not activate the
  201.                               menu.  If this option is turned on, MenuHelper
  202.                               will override the program and clear the
  203.                               RMBTRAP flag.  This allows MenuHelper to be
  204.                               used with such programs without regard to the
  205.                               mouse pointer's current position in the
  206.                               window.  This option should be used with
  207.                               CAUTION.  It is impossible to predict how any
  208.                               particular program will react to someone else
  209.                               resetting their RMBTRAP flag.  In other words,
  210.                               if you would like to try this option with a
  211.                               particular program, make sure you try it when
  212.                               you have nothing to lose if the program takes
  213.                               serious offense and crashes your machine.
  214.  
  215.  
  216.     Remember Mode
  217.  
  218.         This section lists three modes of which only one may be selected.
  219.     The selected mode defines to MenuHelper how much information to
  220.     'remember' about previous menu sessions.  To modify MenuHelper's
  221.     remember mode, you may click on the mode's gadget or press the keyboard
  222.     shortcut key that is defined for the mode.  The keyboard shortcut key
  223.     can be easily identified as it is the only underlined character in the
  224.     text description of the mode.  When a new mode is selected, the gadget
  225.     for the currently selected mode is automatically turned off.  The three
  226.     modes available are described as follows:
  227.  
  228.         None        - With this mode, MenuHelper will not remember anything
  229.                       about previous menu sessions.  Whenever a menu session
  230.                       is started, you will ALWAYS be positioned at the top of
  231.                       the leftmost menu.
  232.  
  233.         Last Menu   - MenuHelper will remember where you were positioned in
  234.                       the last menu only.  If you begin another menu session
  235.                       with that same menu, MenuHelper will reposition you in
  236.                       the menu where you were when the previous menu session
  237.                       ended.
  238.  
  239.         All Menus   - MenuHelper remembers all menus.  Whenever you start a
  240.                       subsequent menu session, you will be positioned in the
  241.                       menu where you were when the previous session ended.
  242.                       MenuHelper will remember the menu as long as the screen
  243.                       containing the window and menu remains open.
  244.  
  245.  
  246.     There are four action gadgets placed along the bottom of the
  247. configuration window.  These are used to convey to MenuHelper what action to
  248. take with regard to any modifications that you may have made.  To select an
  249. action you may click on it's associated gadget or press the keyboard
  250. shortcut key that is defined for the action.  The keyboard shortcut key can
  251. be easily identified as it is the only underlined character in the text
  252. description of the action.  MenuHelper also provides a project menu 
  253. containing menu items that correspond exactly to the actions described
  254. below.  All actions cause the configuration window to be removed from view.
  255. The following actions are available:
  256.  
  257.     Save    - This action causes MenuHelper to save the current
  258.               configuration as tooltype settings in it's icon.  If an icon
  259.               does not exist for MenuHelper, one will be created.  Also, any
  260.               modifications that you have made to the configuation will
  261.               take effect immediately.
  262.  
  263.     Use     - With this action, modifications that you have made to the
  264.               configuration are put into effect immediately, however, they
  265.               are not saved in MenuHelper's icon.  If MenuHelper is stopped
  266.               and restarted, your changes will be lost.  This action is
  267.               handy for experimenting with different options and key
  268.               definitions before deciding on any permanent changes that you
  269.               would like to make.
  270.  
  271.     Cancel  - This action causes MenuHelper to ignore any configuration
  272.               changes that have been made and revert back to the
  273.               settings that were in effect before the configuration window
  274.               was activated.
  275.  
  276.     Quit    - Tells MenuHelper to terminate.  As with the 'Cancel' action,
  277.               any configuration changes that have been made are lost.
  278.  
  279.  
  280.  
  281. Key Definition Expressions
  282.  
  283.     Key definitions are a textual way of describing to MenuHelper what
  284. key/key combinations it should use to perform its functions.  MenuHelper
  285. employs facilities provided by release 2.0 to parse the definition and
  286. determine if it is valid.  Actually, release 2.0 allows you to describe all
  287. types of input events, i.e. mouse, timer, keyboard, etc. in this manner, but
  288. MenuHelper restricts you to specifying only keyboard events.  The following
  289. discussion will therefore center on the definition of keyboard events only.
  290. For a complete description of input events in general, refer to the
  291. Commodities documentation provided with release 2.0.  Key definitions take
  292. the form of a regular expression as follows:
  293.  
  294.     [class] ([-](qual|syn))* [[-]upstroke] [highmap|ANSICode]
  295.  
  296.                     the * means zero or more occurrances of ([-](qual|syn))
  297.  
  298.     where:
  299.  
  300.         [class]     is an optional value that specifies the class of input
  301.                     event being defined.  As stated earlier, MenuHelper
  302.                     only allows you to define keyboard events so you may
  303.                     either omit class altogether or use the keyboard class
  304.                     specification of 'rawkey'.
  305.  
  306.         qual        is one of the strings in the table below.  Each string
  307.                     corresponds to a qualifier key.  A dash preceding the
  308.                     qualifier tells MenuHelper not to care if that qualifier
  309.                     is present in the input event.  There can be more than
  310.                     one qualifier, or none at all, in the key definition.
  311.  
  312.                             'lshift'        -   left shift key
  313.                             'rshift'        -   right shift key
  314.                             'capslock'      -   caps lock key
  315.                             'control'       -   control key
  316.                             'lalt'          -   left alt key
  317.                             'ralt'          -   right alt key
  318.                             'lcommand'      -   left Amiga key
  319.                             'rcommand'      -   right Amiga key
  320.                             'numericpad'    -   a key on the numeric pad
  321.                             'repeat'        -   a repeated key
  322.  
  323.         syn         is one of the strings in the table below.  These strings
  324.                     act as synonyms for groups of qualifiers.  A dash
  325.                     preceding the synonym tells MenuHelper not to care if
  326.                     that qualifier is present in the input event.  There can
  327.                     be more than one synonym, or none at all, in the key
  328.                     definition.
  329.  
  330.                             'shift'         -   left shift, right shift keys
  331.                             'caps'          -   left shift, right shift and
  332.                                                 caps lock keys
  333.                             'alt'           -   left alt, right alt keys
  334.  
  335.         upstroke    is the literal string 'upstroke'.  If this string is
  336.                     absent, MenuHelper considers only downstrokes.  If
  337.                     present alone, MenuHelper considers only upstrokes.
  338.                     If preceded by a dash, MenuHelper considers both
  339.                     upstrokes and downstrokes.
  340.  
  341.         highmap     is one of the following strings:
  342.  
  343.                     'space', 'backspace', 'tab', 'enter', 'return', 'esc',
  344.                     'del', 'up', 'down', 'right', 'left', 'f1', 'f2', 'f3',
  345.                     'f4', 'f5', 'f6', 'f7', 'f8', 'f9', 'f10', 'help'
  346.  
  347.                     A note of caution.  You should probably avoid using the
  348.                     help key in any MenuHelper key definitions.  Release 2.0
  349.                     provides what is known as the 'menu help' facility
  350.                     whereby pressing the help key while over a menu item can
  351.                     trigger the application to supply the user with help
  352.                     information about that menu item.  This facility would
  353.                     be disabled if you define the help key to be used by
  354.                     MenuHelper for one of its functions.
  355.  
  356.         ANSICode    is a single character, for example 'a'.
  357.  
  358.  
  359.     The following are some example key definitions:
  360.  
  361.         'rawkey -capslock alt backspace'    The backspace key and either
  362.                                             alt key pressed with or without
  363.                                             the caps lock key.  Only the
  364.                                             downstroke of the key will be
  365.                                             accepted.
  366.  
  367.         '-capslock -repeat alt backspace'   The backspace key and either
  368.                                             alt key pressed with or without
  369.                                             the caps lock key.  The
  370.                                             downstroke of the key as well as
  371.                                             any repeated keys (generated by
  372.                                             holding the keys down) will be
  373.                                             accepted.
  374.  
  375.         '-shift -alt -control x'            The key that produces an 'x'
  376.                                             with or without any shift, alt
  377.                                             or control keys pressed.
  378.  
  379.  
  380. Modifier Key Definition
  381.  
  382.     The Modifier key combination provides a way to alter the action of the
  383. 'Select' and 'Move' keys.  This option can be disabled by removing the
  384. modifier key definition in the configuration window or specifying MODIFIER=
  385. as a tooltype without a corresponding definition.  The modifier key
  386. definition, when specified, must consist of only qualifier keys.  These
  387. qualifiers may then be used in conjunction with the other key definitions
  388. as follows:
  389.  
  390.     Select - causes MenuHelper to do an extended select of the item you are
  391.              currently positioned on.  It is called an extended select
  392.              because the item/subitem is selected without ending the menu
  393.              session.  You are then free to move through the menu and either
  394.              select another menu item or do another extended select.  Not
  395.              all programs support extended selection.  Usually programs that
  396.              don't support extended selection will only honor the
  397.              first selection that was made during the menu session.
  398.  
  399.     Up     - causes MenuHelper to position the pointer at the first
  400.              available item of the current item/subitem list.
  401.  
  402.     Down   - causes MenuHelper to position the pointer on the last
  403.              available item of the current item/subitem list.
  404.  
  405.     Left   - causes MenuHelper to position the pointer on the first
  406.              available item of the leftmost menu.
  407.  
  408.     Right  - causes MenuHelper to position the pointer on the first
  409.              available item of the rightmost menu.
  410.  
  411.  
  412.  
  413. Icon Tooltypes
  414.  
  415.     A tooltype is defined for each of the definitions/options described in
  416. the configuration window.  At startup, MenuHelper reads the tooltypes from
  417. the icon and alters its configuration settings accordingly.  Your favorite
  418. settings may be configured using the WorkBench Icon/Information menu item
  419. or by simply using the 'Save' action gadget/menu item provided in the
  420. configuration window.  The tool types that are recognized by MenuHelper are:
  421.  
  422.    CX_POPUP=YES|NO              Specify whether the configuration window is
  423.                                 to be brought up upon startup.
  424.  
  425.    CX_POPKEY=<expression>       Name of Hot Key to bring up configuration
  426.                                 window.  See the Commodities documentation
  427.                                 for more information.
  428.  
  429.    CX_PRIORITY=<number>         Priority at which to run MenuHelper.  See
  430.                                 the Commodities documentation for more
  431.                                 information.
  432.  
  433.    HIDEPOINTER=YES|NO           Refer to the 'Hide Pointer' option above.
  434.  
  435.    SKIPDISABLED=YES|NO          Refer to the 'Skip Disabled' option above.
  436.  
  437.    USEMENUBAR=YES|NO            Refer to the 'Use Menu Bar' option above.
  438.  
  439.    AUTOWRAP=YES|NO              Refer to the 'Auto Wrap' option above.
  440.  
  441.    REMEMBERSUBITEMS=YES|NO      Refer to the 'Remember SubItems' option
  442.                                 above.
  443.  
  444.    OVERRIDERMBTRAP=YES|NO       Refer to the 'Override RMBTRAP' option
  445.                                 above.
  446.  
  447.    REMEMBERMODE=NONE|LAST|ALL   Refer to the 'Remember Mode' section above.
  448.  
  449.    ACTIVATE=<expression>        Refer to the 'Key Definitions' section
  450.                                 above.
  451.  
  452.    DEACTIVATE=<expression>      Refer to the 'Key Definitions' section
  453.                                 above.
  454.  
  455.    SELECT=<expression>          Refer to the 'Key Definitions' section
  456.                                 above.
  457.  
  458.    UP=<expression>              Refer to the 'Key Definitions' section
  459.                                 above.
  460.  
  461.    DOWN=<expression>            Refer to the 'Key Definitions' section
  462.                                 above.
  463.  
  464.    LEFT=<expression>            Refer to the 'Key Definitions' section
  465.                                 above.
  466.  
  467.    RIGHT=<expression>           Refer to the 'Key Definitions' section
  468.                                 above.
  469.  
  470.    MODIFIER=<expression>        Refer to the 'Key Definitions' section
  471.                                 above.
  472.  
  473.    DONOTWAIT                    This tooltype is actually used by WorkBench.
  474.                                 If this option is present WorkBench will not
  475.                                 wait for the program to finish.  Useful when
  476.                                 MenuHelper is moved to the WBStartup drawer
  477.                                 for automatic activation when WorkBench is
  478.                                 started.
  479.  
  480.  
  481.  
  482. Default Configuration
  483.  
  484.     MenuHelper will use a default configuration if there is no icon
  485. information available for any given tooltype.  The default configuration is
  486. intended to mimic the configuration of MenuHelper's predecessor, KeyMenu,
  487. as close as possible.  The default configuration is as follows:
  488.  
  489.     ACTIVATE=-capslock alt backspace
  490.  
  491.     DEACTIVATE=-capslock esc
  492.  
  493.     SELECT=-capslock return
  494.  
  495.     UP=-capslock -repeat up
  496.  
  497.     DOWN=-capslock -repeat down
  498.  
  499.     LEFT=-capslock -repeat left
  500.  
  501.     RIGHT=-capslock -repeat right
  502.  
  503.     MODIFIER=shift
  504.  
  505.     HIDEPOINTER=NO
  506.  
  507.     SKIPDISABLED=NO
  508.  
  509.     USEMENUBAR=NO
  510.  
  511.     AUTOWRAP=YES
  512.  
  513.     REMEMBERSUBITEMS=NO
  514.  
  515.     OVERRIDERMBTRAP=NO
  516.  
  517.     REMEMBERMODE=LAST
  518.  
  519.     CX_POPKEY=shift help
  520.  
  521.     CX_PRIORITY=0
  522.  
  523.     CX_POPUP=YES
  524.  
  525.  
  526.  
  527. Release Information
  528.  
  529.     Release 37.1        Initial release
  530.  
  531.  
  532.  
  533. Distribution
  534.  
  535.     MenuHelper is ©1991 Ken Lowther.  It is freely distributable as long as
  536. all of it's files are included in their original form without deletions or
  537. modifications of any kind and only a nominal fee is charged for its
  538. distribution.  This software is provided "AS IS" without warranty of any
  539. kind either expressed or implied.  By using MenuHelper you agree to accept
  540. the entire risk as to the quality and performance of the program.
  541.  
  542.  
  543. Ken Lowther
  544.  
  545. klowther on BIX for comments, criticism, enhancements etc.
  546.