Was this helpful?
Mapping Statements
A mapping statement has the following syntax:
mapping_object = pfN|controlX|uparrow|downarrow|leftarrow|rightarrow [(label)]
mapping_object
Specifies a menu item, FRS command, or FRS key, designated through mapping.
pfN
Designates a function key. N must be in the range 1 to 40. (Note that the maximum number of definable keys set in the termcap file for your terminal can be less than 40. You must raise this limit to set additional keys.)
controlX
Designates a control key. X can be any single letter of the alphabet, or the designations del to indicate the Delete key as in controldel or esc to indicate the Escape key as in controlesc (if the Escape key is not reserved on your terminal). This guide designates control keys in user instructions as Control‑X, where X is the key used in combination with the Control key.
On most keyboards, pressing Control‑I is equivalent to pressing the Tab key, and pressing Control‑M is equivalent to pressing the Enter key in Windows or the Return key in UNIX or VMS.
Uparrow, Downarrow, Leftarrow, Rightarrow
Designates the up arrow, down arrow, left arrow, and right arrow keys.
label
Designates any alphanumeric string. It appears in place of the default label for a menu item. It also appears in the Keys operation of the Help facility.
A single mapping object cannot be mapped to be invoked by pressing either two different function, control, or arrow keys on the same screen. Each function or control key (and each arrow key in UNIX or VMS) can correspond to only a single mapping object at a time. If you map one mapping object to more than one physical key, or multiple mapping objects to the same key, one mapping overrides the others.
If the conflicting mappings occur within the same mapping file, only the first mapping within the file is considered to be valid. If the conflict occurs between different mapping files, the key mapping in the file of higher precedence overrides the other mappings. For a discussion of precedence in key mapping, see the Key Mapping Overview section specific to your environment.
The appearance of an exception to this rule occurs when both of the following conditions exist:
A menu item is mapped to a function or control key (or arrow key in UNIX or VMS) by the menu item's position
A FRS key that has the same function as the menu item is mapped to a different function or control key (or arrow key in UNIX or VMS)
This only appears to be an exception, because the two mapping objects (the menu item and the FRS key) perform the same function although they are actually separate FRS objects that are mapped to two different function, control, or arrow keys.
Example of Mapping Statements (Windows)
frskey8 = pf16 (Sh+F6)
menuitem1 = pf13 (Sh+F3)
menuitem2 = pf3 (F3)
menuitem3 = controlE (^E)
previousfield = controlP (Sh+Tab)
nextfield = controlI (Tab)
menuitem4 = pf9 (F9)
rubout = controlDEL
In this example, Sh+F6 on your PC keyboard maps to the operation associated with frskey8, Sh+F3 activates the first item on the menu line, F3 activates the second, Ctrl+E activates the third menu item, Sh+Tab moves the cursor to the previous field on the form, and Delete deletes the character immediately to the left of the cursor. Any previous mappings that do not conflict with these statements remain in effect. (When mapping menu items, the action to be taken after the key is pressed is determined by the application and can differ between applications.)
Notice the effect of including an explicit label in a mapping statement. Assume a frame's menu includes the following operations:
Help  Add  Editor  End
Assume, also, that the frame containing these menu items also specifies that the Help operation be invoked either by selecting the Help menu item (in this case, menuitem1) or by pressing the key mapped to frskey8. The preceding mapping file example, with its labels, would result in the following key associations:
Help(Sh‑F6)  Add(F3)  Editor(^E)  End(F9)
Note the case of the Help menu item, which the application also allows to be invoked by frskey8. As shown in the mapping file example, two different keys could be used to invoke this item—Sh+F3 (the key associated with the first menu item) and Sh+F6 (the key associated with frskey8). In a case like this, the label for the FRS key always takes precedence over the label for the menu item for key assignments displayed on the menu line or in the Help Keys operation. All other labels in the example are those associated with the menu item's position on the menu line.
Example of Mapping Statements (UNIX and VMS)
frskey8 = pf16 (0)
menuitem1 = pf13 (1)
menuitem2 = pf3 (PF3)
menuitem3 = controlE (^E)
previousfield = controlP
nextfield = rightarrow
menuitem4 = pf9 (4)
rubout = controlDEL
In this example, PF16 (the 0 on a VT100 keypad) maps to the operation associated with frskey8, PF13 (the 1 on a VT100 keypad) activates the first item on the menu line, PF3 activates the second menu item, Control‑E activates the third menu item, Control‑P moves the cursor to the previous field on the form, Right Arrow moves the cursor to the next field, and Delete deletes the character immediately to the left of the cursor. Any previous mappings that do not conflict with these statements remain in effect. (When mapping menu items, the action to be taken after the key is pressed is determined by the application and can differ between applications.)
Notice the effect that including an explicit label has on the appearance of a menu line. Assume a frame's menu includes the following operations:
Help  Add  Editor  End
Assume, also, that the frame containing these menu items also specifies that the Help operation be invoked either by selecting the Help menu item or by pressing the key mapped to frskey8. The previous mapping file example, with its labels, would cause the menu to appear as follows:
Help(0)  Add(PF3)  Editor(^E)  End(4)
Note the case of the Help menu item, which the application also allows to be invoked by frskey8. Two different labels from the map file could be used for this item—1 (the label for the first menu item), or 0 (the label for frskey8). In a case like this, the label for the FRS key always takes precedence over the label for the menu item. All other labels on the menu are those associated with the menu item's position in the menu line.
Last modified date: 08/28/2024