HTBasic Help
×
Menu
Index

SET KEY

Defines one or more softkey macros.
 
 SET KEY key-number, {string-expression | string-array$(*)}
 
Usage:
SET KEY 2,Keytwo$
SET KEY First_key,Several_keys$(*)
Example: SET KEY.BAS
Description:
Softkey macros may be defined with the SET KEY statement. The key-number is a numeric expression which is rounded to an integer and should be in the range zero through twenty-three. If a string expression is specified, then only one key is defined. If a string array is specified, then successive keys, starting with the key-number specified, are defined from the elements of the string array.
Once defined, the key definition is displayed in the softkey menu. Pressing the softkey (when no ON KEY is defined for that key) will type the characters specified in the definition, just as if they had been typed on the keyboard. The definition can include function keys, such as CLEAR SCR.
If the definition begins with a CLR LN key (CHR$(255) & "#"), only the characters after the CLR LN will be displayed. If the definition begins with a CONTINUE key, the two characters (CHR$(255) & "C") will be replaced with the string "CONTINUE". If the definition begins with a RUN key, the two characters (CHR$(255) & "R") will be replaced with the string "RUN".
See Also: