Defining control keys

The OPTIONS action KEY instruction defines physical keys for common dialog actions.

Syntax

OPTIONS
{ INSERT KEY key-name
| DELETE KEY key-name
| NEXT KEY key-name
| PREVIOUS KEY key-name
| ACCEPT KEY key-name
| HELP KEY key-name
} 

Usage

This OPTIONS clause can specify physical keys to support logical key functions in the interactive instructions.

The physical key definition options are only provided for backward compatibility with the TUI mode. Use the action defaults configuration to define accelerator keys for actions.

Description of the keys:

  • The ACCEPT KEY specifies the key that validates a CONSTRUCT, INPUT, DIALOG, INPUT ARRAY, or DISPLAY ARRAY statement.

    The default ACCEPT KEY is ESCAPE.

  • The DELETE KEY specifies the key in INPUT ARRAY statements that deletes a screen record.

    The default DELETE KEY is F2.

  • The INSERT KEY specifies the key that opens a screen record for data entry in INPUT ARRAY.

    The default INSERT KEY is F1.

  • The NEXT KEY specifies the key that scrolls to the next page of a program array of records in an INPUT ARRAY or DISPLAY ARRAY statement.

    The default NEXT KEY is F3.

  • The PREVIOUS KEY specifies the key that scrolls to the previous page of program records in an INPUT ARRAY or DISPLAY ARRAY statement.

    The default PREVIOUS KEY is F4.

  • The HELP KEY specifies the key to display help messages.

    The default HELP KEY is CONTROL-W.

You can specify the following keywords for the physical key names:

Table 1. Keywords for physical key names
Key Name Description
ESC or ESCAPE The ESC key (not recommended, use ACCEPT instead).
INTERRUPT The interruption key (on UNIX™, interruption signal).
TAB The TAB key (not recommended).
CONTROL-char A control key where char can be any character except A, D, H, I, J, K, L, M, R, or X
F1 through F255 A function key.
LEFT The left arrow key.
RETURN or ENTER The return key.
RIGHT The right arrow key.
DOWN The down arrow key.
UP The up arrow key.
PREVIOUS or PREVPAGE The previous page key.
NEXT or NEXTPAGE The next page key.

You might not be able to use other keys that have special meaning to your version of the operating system. For example, CONTROL-C, CONTROL-Q, and CONTROL-S specify the Interrupt, XON, and XOFF signals on many UNIX systems.