ON KEY defines a softkey event branch and optionally a label to be displayed in the softkey menu. When the softkey is pressed, the event occurs. The key number must be in the range of zero through twenty-three. Only as many characters as will fit in the menu area softkey label are displayed from the label.
If the label begins with a CLR LN key (CHR$(255) & "#"), only the characters after the CLR LN will be displayed. If the label begins with a CONTINUE key, the two characters (CHR$(255) & "C") will be replaced with the string "CONTINUE". If the label begins with a RUN key, the two characters (CHR$(255) & "R") will be replaced with the string "RUN".
Executing a new ON KEY while another ON KEY for the same softkey is still in effect will override the previous LABEL and definition. If the ON KEY is executed in a different program context, the original ON KEY definition is restored when control returns to the calling context.