Was this helpful?
Levels of Mapping (UNIX and VMS)
The FRS allows you to define key mappings for function, control, and arrow keys on four separate levels:
Installation
Terminal type
User (environment)
Application
This allows you to tailor key definitions to the specific requirements of the environment, the terminal type, the user, and the application. The installation‑level mapping has the lowest precedence, and is overridden by all other mappings. Through terminal type‑level mapping, a default can exist for all terminals of a given type, such as VT100s or VT220s. This default is overridden by any conflicting user or application mappings. The user‑level mapping is next in precedence, allowing each individual user a good degree of latitude in the use of function, control, and arrow keys. Application‑specific mappings have the highest precedence to provide the same environment to all users of an application and to ensure data integrity both in the form and the database.
When the FRS starts up, the four levels of mapping are merged and conflicts are resolved based on the precedence outlined previously. Any additional mapping specified by the program during the running of an application is merged in the same manner and takes precedence over conflicting mappings. While the four levels of mappings can coexist, any of the levels can be omitted. Because it is possible that a function, control, or arrow key is defined at more than one of the four levels, the FRS always honors the most recent reference to any mappable key from a file of higher-level precedence.
The following sections discuss each of the various levels at which mapping occurs and how to specify the mapping file for each level.
Installation Level Mapping (UNIX and VMS)
As mentioned previously, installation‑level mapping has the lowest precedence. It provides an underlying default, common to all terminal types, which can be overlaid with mappings for specific terminal types, as well as individual users and applications.
A default installation-level mapping file is shipped with Ingres. Because this default file references only control keys and not function keys, it must be usable for all Ingres terminal types.
The complete file specification for this mapping file is:
UNIX:
$II_SYSTEM/ingres/files/frs.map
VMS:
II_SYSTEM:[ingres.files]frs.maps
It contains the following statements:
/* Move cursor to next field */
  nextfield = controlI (Tab)
/* Move cursor to previous field */
  previousfield = controlP (^P)
/* Move up one word within field */
  nextword = controlB (^B)
/* Move back one word within field */
  previousword = controlR (^R)
/* Switch between insert and */
/* overstrike mode*/
  mode = controlE (^E)
/* Redraw the screen */
  redraw = controlW (^W)
/* Delete character under the cursor */
  deletechar = controlD (^D)
/* Delete character to left of cursor */
  rubout = controlDEL (Delete)
/* Start default text editor on field */
  editor = controlV (^V)
/* Move left one space within a field */
  leftchar = controlH (^H)
/* Move right one space within a field */
  rightchar = controlL (^L)
/* Move down one line */
  downline = controlJ (^J)
/* Move up one line */
  upline = controlK (^K)
/* Move to first column of next row */
/* in table field */ 
  newrow = controlN (^N)
/* Clear the field */
  clear = controlX (^X)
/* Clear out rest of field */
/* and move to next field */
  clearrest = controlM (Return)
/* Scroll up on the form */
  scrollup = controlF (^F)
/* Scroll down on the form */
  scrolldown = controlG (^G)
/* Scroll left on a form */
  scrollleft = controlO (^O)
/* Scroll right on a form */
  scrollright = controlU (^U)
/* Auto‑duplicate value while in fill mode*/
  duplicate = controlA (^A)
While you can edit this file to customize your installation's default mappings, you must not change the name of this file. The FRS automatically looks for the file when starting up. If you do modify this file, be sure to map only those keys that are available for all terminal types at your installation.
Notice that the file does not specify a menu key. This is because the FRS command menu automatically defaults to Escape.
Terminal Type Level Mapping
The next higher level of mapping is terminal type. Each terminal type used at your installation needs its own mapping file, because function key support varies from terminal to terminal. Combined with the installation mapping, this file provides a common terminal default for the function and control keys, which can be altered by mappings at higher levels to fit the needs of an application or an individual user. Arrow keys are defined by default in the termcap file.
The terminal-type mapping file must be placed in the following directory:
UNIX:
$II_SYSTEM/ingres/files/
VMS:
II_SYSTEM:[ingres.files]
You can specify the terminal-type mapping file name with the mf capability in the termcap file description for each terminal type in use at an installation. You can also point to a termcap file by using the II_TERMCAP_FILE environment variable/logical.
Default mapping files for VT100 and VT220 terminals are shipped with Ingres. You can edit these files if desired. (The termcap file descriptions for the vt100i and vt220i terminal definitions already have the names of their mapping files specified; therefore, there is no need to edit those termcap descriptions.)
Terminal Type vt100i Map File
For VT100 terminals defined as the vt100i terminal type, the mapping file location is:
UNIX:
$II_SYSTEM/ingres/files/vt100i.map
VMS:
II_SYSTEM:[ingres.files]vt100i.map
It contains the following statements:
/* Menu Key */
  menu = pf1 (PF1)
/* Help facility */
  frskey1 = pf2 (PF2)
/* Quit from program */
  frskey2 = pf4 (PF4)
/* End current screen and return */
/* to previous screen */ 
  frskey3 = pf3 (PF3)
/* Go or execute function */
  frskey4 = pf18 (Enter)
/* Put cursor on top of form or */
/* table field*/
  frskey5 = controlK (^K)
/* Put cursor on bottom of form or */
/* table field*/
  frskey6 = controlJ (^J)
/* Find next occurrence of string*/
/* in this column of table field  */ 
  frskey7 = controlF (^F)
/* Save object in database */
  frskey8 = pf16 (0)
/* Cancel and undo */
  frskey9 = pf17 (.)
/* ListChoices */
  frskey10 = pf7 (9)
/* Scroll page or form left */
  scrollleft = controlL (^L)
/* Scroll page or form right */
  scrollright = controlH (^H)
/* Previous screen or set of rows */
/* in table field */
  scrolldown = pf8 (‑)
/* Next screen or set of rows in */
/* table field */
  scrollup = pf12 (,)
/* Print contents of current screen */
/* to file or printer */ 
  printscreen = controlG (^G)
/* Select first menu item */
  menuitem1 = pf13 (1)
/* Select second menu item */
  menuitem2 = pf14 (2)
/* Select third menu item */
  menuitem3 = pf15 (3)
/* Select fourth menu item */
  menuitem4 = pf9 (4)
/* Select fifth menu item */
  menuitem5 = pf10 (5)
/* Select sixth menu item */
  menuitem6 = pf11 (6)
/* Select seventh menu item */
  menuitem7 = pf5 (7)
/* Select eighth menu item */
  menuitem8 = pf6 (8)
/* Move cursor to next field */
/* defined to controlI in frs.map */
/* Move cursor to previous field */
/* defined to controlP in frs.map */
/* Move up one word within field */
  nextword = controlU (^U)
/* Move back one word within field */
/* defined to controlR in frs.map */
/* Switch between insert and overstrike */
/* mode defined to controlE in frs.map */
/* Redraw the screen defined to controlW */ /* in   frs.map */
/* Delete the character under the cursor */
/* defined to controlD in frs.map */
/* Delete character immediately to left */
/* of cursor‑‑defined to controlDEL */
/* in frs.map */
/* Start default text editor on field */
/* defined to controlV in frs.map */
/* Move to first column of next row */
/* in table field defined to controlN */
/* in frs.map */
UNIX:
/* Clear the field */
 clear = controlX (^X)
VMS:
/* Clear the field */
 clear = controlB (^B)  
/* Move to nextitem in form. If on */
/* regular field, move to next field. */
/* If in table field, move to next column */
/* if NOT in last accessible column.*/
/* Move to next row if in last accessible */
/* column of table field. */
  nextitem = controlM (Return)
/* Auto‑duplicate value while in */
/* fill mode defined to controlA */
/* in frs.map */
Terminal Type vt220i Map File
The default file for VT220 terminals is located in:
UNIX:
$II_SYSTEM/ingres/files/vt220i.map
VMS:
II_SYSTEM:[ingres.files]vt220i.map
The VT220 mapping file contains these statements:
/* Menu Key */
  menu = pf1 (PF1)
/* Help facility */
  frskey1 = pf15 (Help)
/* Quit from program */
  frskey2 = pf4 (PF4)
/* End current screen and */
/* return to previous screen */ 
  frskey3 = pf3 (PF3)
/* Go or execute function */
  frskey4 = pf16 (Do)
/* Put cursor on top of form or */
/* table field */
  frskey5 = controlK (^K)
/* Put cursor on bottom of form or */
/* table field */
  frskey6 = controlJ (^J)
/* Find next occurrence of string */
/* in this column of table field */
  frskey7 = pf21 (Find)
/* Save function */
  frskey8 = pf10 (PF10)
/* Undo and cancel */
  frskey9 = pf2 (PF2)
/* Bring Up ListChoices */
  frskey10 = pf20 (PF20)
/* Scroll page or form left */
  scrollleft = controlL (^L)
/* Scroll page or form right */
  scrollright = controlH (^H)
/* Previous screen or set of rows */
/* in table field */
  scrolldown = pf25 (Prev Screen)
/* Next screen or set of rows */
/* in table field */
  scrollup = pf26 (Next Screen)
/* Print contents of current screen */
/* to file or printer */
  printscreen = pf8 (PF8)
/* Select first menu item */
  menuitem1 = pf11 (PF11)
/* Select second menu item */
  menuitem2 = pf12 (PF12)
/* Select third menu item */
  menuitem3 = pf13 (PF13)
/* Select fourth menu item */
  menuitem4 = pf14 (PF14)
/* Select fifth menu item */
  menuitem5 = pf17 (PF17)
/* Select sixth menu item */
  menuitem6 = pf18 (PF18)
/* Select seventh menu item */
  menuitem7 = pf19 (PF19)
/* Remove character under cursor */
  deletechar = pf23 (Remove)
/* Switch between insert and overstrike */
  mode = pf22 (Insert Here)
/* Move cursor to next field defined */
/* to controlI in frs.map */
/* Move cursor to previous field */
/* defined to controlP in frs.map */
/* Move up one word within field */
  nextword = controlU (^U)
/* Move back one word within field */
/* defined to controlR in frs.map */
/* Redraw the screen defined to */
/* controlW in frs.map */
/* Delete character immediately to left */
/* of cursor defined to controlDEL */
/* in frs.map */
/* Start default text editor on field */
/* defined to controlV in frs.map */
/* Move to first column of next row in */
/* table field defined to controlN */
/* in frs.map */
UNIX:
/* Clear the field */
 clear = controlX (^X)
VMS:
/* Clear the field */
 clear = controlB (^B)
/* Move to nextitem in form. If on */
/* regular field, move to next field. */
/* If in table field, move to next column */
/* if NOT in last accessible column.*/
/* Move to next row if in last accessible */
/* column of table field. */
  nextitem = controlM (Return)
/* Auto‑duplicate value while in fill */
/* mode defined to controlA in frs.map */
User Level Mapping (UNIX and VMS)
Next higher in precedence are the individual user's mappings. Of the four levels, user-level mapping is probably the least frequently used; the combination of mappings at the other three levels suffices for most users.
To make the user-level mapping file known to the FRS, the user must execute the following command at the operating system level:
UNIX:
For the C shell:
setenv INGRES_KEYS full_pathname/file_name
For the Bourne shell:
INGRES_KEYS=full_pathname/file_name
export INGRES_KEYS
The parameter full‑pathname/file_name is the full pathname and file name for the mapping file. To eliminate the need to invoke this command for each terminal session, you can include this command in the file .login (C shell) or .profile (Bourne shell).
VMS:
define INGRES_KEYS file_specification
The file_specification parameter is the full specification for the mapping file. To eliminate the need to invoke this command for each terminal session, you can include this command in the login.com file.
Application Level Mapping (UNIX and VMS)
An application created with 4GL or one of the embedded query languages can use its own set of mappings, invoked by the set_frs frs or set_forms frs (for 4GL) statements. Applications developers can use these statements in an application to read in a key‑mapping file that is specific to that application or to map an FRS key to a function, control, or arrow key explicitly in the application code.
Application‑level mappings take precedence over all other mappings. For more information on application key mapping, see the Forms-based Application Development Tools User Guide.
Last modified date: 08/28/2024