Edit Control Keys

With the exception of the UP and DOWN arrow keys, which return CTLVALs, the cursor movement and field editing commands take place directly within the field. These functions are used as internal field controls and never return a CTLVAL to an application.

Internal Input Functions

Special functions, such as <HELP> (default F1) and <HOTKEY> (default F6), are called from within the input routine and return directly to the field being edited. These special functions never return a CTLVAL to an application.

Application Defined Functions

Users can define up to eight special function keys. Depending on the configuration of the function keys, they are processed by the input routine or terminate input and pass a CTLVAL back to the application.

Standard Application Control Keys

The remainder of the function keys simply set the CTLVAL as specified in the configuration map. The application utility must then process this value.

Specifying Keymap Files

The keymap file may be specified by global values or environmental variables.

Global Value Method

Specify an entry in the global data space with a keyword of (KEYMAP). The Toolkit uses this value as the name of the keymap to use. This global value may be set in the config.EUS file, the config.bbx file, or by the STBL() function, as follows:

config.EUS

KEYMAP=(PROJECT)mykeys

config.bbx

SET KEYMAP=(PROJECT)mykeys

STBL()

TRASH$=STBL("KEYMAP","(PROJECT)mykeys")

Environment Variable Method

Set an environment variable named KEYMAP to a value for the keymap location. This is operating-system dependent and must be done prior to entering PRO/5:

Operating System

Environment Variable

UNIX (Bourne or Korn shell)

$ KEYMAP=/basis/pro5/mykeys; export KEYMAP

UNIX (C shell)

% setenv KEYMAP /basis/pro5/mykeys

In MS-DOS (COMMAND.COM or equivalent)

C:\> set KEYMAP=c:\basis\pro5\mykeys

In there is no value for KEYMAP or no file named BBKMAP, the Input Subsystem will create a default keymap in the current directory.

Keymap Records

A keymap file may contain multiple keymap records. Each record is a complete keymap in itself. This allows each user to have a unique keymap. User keymap records are keyed by user ID (INFO(3,2)). Any user ID that does not have a corresponding user record will use the default keymap record.

Customizing Keymaps

_ekeymap.utl allows the developer and/or user to customize the keyboard mapping to accommodate application requirements or individual preferences. This utility allows the developer to customize standard keystrokes and/or define application-specific function keys.

When _ekeymap.utl is invoked, it follows the standard rules for locating the keyboard file and keymap record to be modified as described in Specifying Keymap Files above.