Hot Key Selection

Hot keys work in the same way as function keys, except that when they have been set up, they can be used to execute the corresponding procedure from any point in your program. At the end of the procedure, control returns to the point at which the hot key was pressed.

Hot keys differ from function keys defined in combined menu/entry procedures in the following ways:

Hot Keys Function Keys with Data Entry
No map Has a map for data entry screen
Cannot be selected in the procedure in which they are set up Can be selected in the Combined Menu/Entry procedure which sets them up
Can be selected in subsequent Interactive, Combined Menu/Entry and in procedures where the access mode on the table is Window Can only be selected in the Combined Menu/Entry procedure in which they are set up
Can be switched off by defining a Hot key set up procedure with no subsidiaries Function keys are not available outside the Combined Menu/Entry procedure
Selecting a function key causes the hot key procedure to be called, with a subsequent return to the point in the calling procedure where it was selected Selection of the function key terminates the procedure in which it is selected, followed by the execution of the function key procedure

The following guidelines should be observed when using Hot keys:

  1. Hot keys are not available in called or chained QA Build programs
  2. You must save and restore variables that are used in your program where hot keys can be used
  3. You must also ensure that the appearance of the screen is restored. For this reason, the best policy is to use pop-up maps which are cleared for your hot key options
  4. Hot keys are available on entry fields and window access procedures, and not from menus, multiple choice lists or error messages
  5. You should not set the force_option variable before a Hot key set up procedure
  6. Make sure you do not introduce recursion to your program

To use hot keys in your program:

  1. Set up a procedure of type Hot key setup
  2. Add the subsidiary procedures corresponding to each of the options:
    Use pop-up maps for screen display for the subsidiary procedures to ensure the original state of the screen is restored

  1. In subsequent procedures in your program in which you want the hot keys to be available, set the Translate func keys flag to Yes for the Map Properties of the procedure's main map