Key assignment

OPTIONS statement is also used to specify the physical keys for some standard 4GL actions. To change the default keys for the standard actions, you must specify the logical key for such action (e.g. ACCEPT KEY).

These logical keys which can be used in the OPTIONS statement:

The logical key must be followed by the key name:

For example,

OPTIONS

      ACCEPT KEY ENTER,

      HELP KEY F1

 

Some keys require special consideration when used in the OPTIONS statement:

ESC/ESCAPE

If you assign the ESC/ESCAPE to a 4GL action other that ACCEPT, you must specify other key for the ACCEPT action, because the ESC/ESCAPE key is the default key for the ACCEPT action.

INTERRUPT

The DEFER INTERRUPT statement must be executed in order that this key could be used in the ON KEY block. On pressing the Interrupt key the corresponding ON KEY block is executed, int_flag is set to non-zero.

QUIT

The DEFER QUIT statement must be executed in order that this key could be used in the ON KEY block. On pressing the Quit key the corresponding ON KEY block is executed and quit_flag is set to non-zero.

CTRL-char

(A, D, H, K, L, R, X)

4GL reserves these keys for field editing.

CTRL-char

(I, J, M)

These key combinations by default mean TAB, NEWLINE and RETURN. If they are used in the OPTIONS statement, they cannot perform their default functions. Thus, if you use these keys in the OPTIONS statement to assign other functions to them, the scope of reference of such OPTIONS statement should not be large.

Some other keys may have special meanings in your operating system and you may not be able to use them in the OPTIONS statement. E.g. keys CONTROL-C, CONTROL-Q, and CONTROL-S are often used to specify the Interrupt, XON, and XOFF signals.

 

You can disable a 4GL action by assigning it to a sequence of keys that are recognized not as the action key but as the editing keys. E.g. If you assign an action to the CTRL-char (where char is A, D, H, K, L, R, or X), the action will never be executed and the keys will be used as the editing keys. The example below disables the INSERT key:

OPTIONS INSERT KEY CONTROL-D

 

The user is not able to insert screen records during the INPUT ARRAY statement, if this OPTIONS statement precedes the INPUT ARRAY statement.

 

Contact Us

Privacy Policy

Copyright © 2024 Querix, (UK) Ltd.