Mapping File Example (Windows)
The following is an example of an FRS mapping file:
/* This is an example of a mapping file */
menuitem2 = pf3 (F3)
menuitem3 = controlE (^E)
frskey7 = pf8
previousfield = controlP (Sh‑Tab)
rubout = controlDEL (Backspace)
controlA = off
/* this turns control‑A off */
pf7 = off
The first line of this sample file is a comment. Comments can appear anywhere in a mapping file. Their purpose is to provide information to someone looking at the file; they are ignored by the FRS.
The next five lines are examples of mapping statements. All mapping statements follow the same basic syntax. To the left of the equal sign is a mapping object, which specifies the operation or function to which the key is being mapped. To the right of the equal sign is the internal program function key or control key that maps to, and activates, the mapping object. For instance, the following statement specifies that the second item on each menu line (menuitem2) map to program function key pf3:
menuitem2 = pf3 (F3)
The parentheses to the right of the internal function or control key contain a label. The label tells the user what key to press to activate the menu selection or operation. The label appears on the menu line, if appropriate, or in the Help Keys operation display. If no label is specified in the mapping statement, Ingres displays an appropriate default label. Although you can put any text you want here, you must make sure the label indicates the physical key to which the internal function key is mapped in the termcap file, so that the end user presses the correct key to invoke the operation. In the preceding example, a user invokes the operation specified by the second item on any menu by pressing F3.
The following statement enables the user to move the cursor to the previous field on a form by pressing Sh‑Tab, which is mapped internally to the controlP function:
previousfield = controlP (Sh‑Tab)
The Ingres controlP function has been mapped internally to Sh‑Tab, rather than to the Ctrl+p key combination, because Ctrl+p is trapped by the operating system. For more information, see The Termcap File.
The last two statements in the example are known as disabling statements. A disabling statement is used to disable a control or function key. For example, the following statement turns off the key mapped to the pf7 program function key (which is associated with function key F7 in the termcap file):
pf7 = off
This means that the function key F7 has no effect in a forms program governed by this map file, and merely beeps when pressed.
Last modified date: 01/30/2023