Disabling programmed function keys

clearkey

Disable programmed function keys


SYNTAX

clearkey key_no [, key_no]…

The clearkey command disables a function key or keys which have been configured by means of an on, on global or on local statement.

key_no

The key number is the sequence number of the key in Section 5 (“Sent by” sequences) of the terminal parameter file. The keys which are available for use have mnemonic definitions in $SCULPTOR/include/sculptor.h, as follows:

Key no

Definition

1 - 32

F1 - 32

38

HOME

39

ENDKEY

41

TAB

42

BACKTAB

49

INS_LINE

50

DEL_LINE

53

SCRL_UP

54

SCRL_DN

55

PGUP

56

PGDN

Either the key number (which may be an expression) or the mnemonic may be used.

If the key has not been configured then the clearkey command is ignored.

The F1 key is normally used as the help key in Sculptor. It may nonetheless be reconfigured for another purpose by an on type command, but as soon as it is cleared it reverts to its usual function.


Avoiding recursion

The clearkey command should be used to temporarily disable a function key while statements called by that key are being processed. This is because of the danger of recursion, should the key be left active in code containing an input statement. The key may be reconfigured when the statements it called have been executed.


NOTES

  • An end statement automatically clears any keys that have been configured by the on local command.


EXAMPLE

clearkey F1, F2, 41, BACKTAB

RELATED TOPICS

on

on global

on local