KEY

Function

KEY enables/disables display of, and redefines soft key values.

Syntax

KEY ON
KEY OFF
KEY LIST
KEYn, string 0<=n<=8

Example

KEY ON

Allows the soft key display to be displayed on the bottom line of the display. This line is then not scrolled.

KEY OFF

Erases the soft key display from the bottom line of the screen, allowing this line to be used by the user. It does not inhibit the use of soft keys.

KEY LIST

This displays the entire string assignments of the eight soft keys on the screen.

KEYn,string

The keys are programmed by writing a string, of which the first four characters are displayed on the bottom line of the screen if the soft key display has been enabled.

KEY1,"?X,Y"

will set key 1 to print the values of the variables x and y when struck. Using the soft keys is equivalent to using the keyboard - but faster.

KEY 1, "?TIME$"+CHR$(13)

will display the time when pressing soft key 1.

Remarks

On entering Basic, the soft keys default to:

Key

Function

1

File(s)

2

Run

3

Edit

4

List

5

Save(“)

6

Load(“)

7

Kill(“)

8

Syst(em)

However, if the auto-run mode on power up has been selected, the soft keys are left as they were last programmed.

When using the KEY n, string command, if KEY 0 is typed the soft keys revert to their power up default values. If n is not in the required range then a ‘Magnitude Error’ occurs.

If it is required to terminate the string with a carriage return or Enter, then it is necessary to terminate with "string"+CHR$(13) as control characters are not accepted in command lines.