Was this helpful?
Setting Control, Function, and Arrow Key Mappings
The map constant provides the means to dynamically map menu items, FRS keys, and FRS commands to function, control, and arrow keys during the running of the application. Key mapping at the application level takes precedence over installation and user mapping files. Function and control key mapping is discussed in detail in the Character-based Querying and Reporting Tools User Guide.
The syntax for this particular variant of the set_frs statement is:
set_frs frs
    (map(menuN|frskeyN|frs_command) = pfN|controlX|arrow_key
    {, map(menuN|frskeyN|frs_command) =
    pfN|controlX|arrow_key})
where arrow_key can be any of:
uparrow
downarrow
leftarrow
rightarrow
The object name for this statement can be menuN, frskeyN or frs_command. The menuN object designates the Nth menu item on the menu line. N must be in the range of 1 to 25. Frs_commands are built-in FRS functions that can be mapped to control, function, or arrow keys. They are described in detail in the Character-based Querying and Reporting Tools User Guide. The frskeyN object represents any of the FRS keys in use during the application. Here, N must be in the range of 1 to 40.
Any of the objects described above can be mapped to a function, control, or arrow key, which must be specified on the right of the equal sign. A function key is designated by pfN, where N is in the range of 1 to 40. ControlX designates a control key. X can be any single letter of the alphabet, or the designations del (indicating the delete key) or esc (indicating the escape key). Arrow keys are specified using the key words listed above.
For example, the statement
exec frs set_frs frs (map(frskey5) = pf3);
equates FRS key 5 with function key 3. Therefore, the block of code associated with an activate frskey statement utilizing FRS key 5 is activated when the user selects function key 3.
Similarly, the statement
exec frs set_frs frs (map(menu3) = controlh);
allows the code activated by the third item on the menu line to be alternatively activated by pressing the control key and the letter H on the keyboard.
You can map each FRS key, FRS command, and menu item to only a single control, function, or arrow key. Conversely, each control, function, and arrow key can be mapped to only one FRS key, FRS command, or menu item at each display level. This means that a key that is mapped to an FRS key, FRS command, or menu item for the top level display block can be mapped differently for a submenu within that display block.
Last modified date: 01/30/2023