B. Defining Function and Control Keys : Mapping File Syntax : Mapping Statements : Example of Mapping Statements (Windows)
Share this page                  
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.