Was this helpful?
Menu Items
You can also map a function or control key (or arrow key in Linux) to any of the items appearing on a menu line. This mapping occurs by position within the menu line.
The syntax for specifying a menu item is:
menuitemN = internal_key_name (key _label)
The N indicates the position of the menu item in the line and is in the range 1 to 25. Alternatively, you can also designate menuitemN as menuN in a mapping statement.
For example, the following statement maps the second item on the menu line to function key 3:
Windows:
menuitem2 = F3
Linux:
menuitem2 = pf3
This statement causes F3 (Windows) or PF3 (Linux) to perform the operation indicated by the second menu item. As the end user moves to a new frame and the menu changes, F3 or PF3 continues to correspond to the item in the second position on the new menu line.
By default, the menu line or Help Keys operation automatically displays the current mappings between the menu items and their associated function and control keys (and arrow keys in Linux). It uses either the label provided in the mapping file, or a default label if none has been specified in the mapping file.
For example, assuming such mappings have been specified, a menu can appear like this:
Help(PF2) Add(PF3) Editor(control‑E) End(PF4)
or
Help(F1) Add(F3) Editor(Ctrl‑e) End(F4)
The button bar menu does not display associated function or control keys. Use the Help Keys operation to see these key mappings.
In this example, pressing PF2 or F1 is equivalent to moving to the menu line and typing Help. Similarly, PF3 or F3 substitutes for Add; Ctrl-E substitutes for Editor; and PF4 or F4 substitutes for End.
The text in parentheses in the mapping statement and on the menu line shows the corresponding function or arrow or control key and is known as a label. The label is specified in the mapping file. For more information, see Mapping File Syntax. An application can specify that the entire menu map, as the collective set of labels is known, be turned off so that no labels appear. For example, if the menu map for the preceding example were turned off, the menu line appears like this:
Help Add Editor End
However, the function and control keys still retain their correspondence with the menu items, even though that correspondence is no longer displayed.
For more information on how to turn off the menu map, see the Forms-based Application Development Tools User Guide. The relevant statements are set_forms in 4GL and set_frs in the embedded query languages.
Last modified date: 04/03/2024