'on key' statement makes possible to branch in a sucro according to
the key pressed by the user as shown in this example:
11 *Continue (Y/N) ?
12 - on key
13 - key N: goto End
14 - key n: goto End
15 - key Y: continue
16 - key y: continue
17 - wait 300
18 *{home}{erase}Thus we are continuing...
Here the sucro prompts the user to press one key by displaying
Continue (Y/N) ?_
If the user presses N or n, the sucro goes to label 'End'. If the
user presses Y or y, the process continues from the first line (18)
without a '-' in the control column.
The 'wait' line (17) indicates the maximum waiting time for the answer.
If any other key is pressed or no answer is given, the first case (N)
is selected.
In the 'on key' statement, also the following special keys may be tested:
ENTER, RIGHT, LEFT, UP, DOWN, HOME, HELP, ESC,
SP, COLON, INSERT, INS_LINE, DELETE, DEL_LINE, ERASE, NEXT, PREV, DISK,
BACKSP, REF, MERGE, COPY, TAB, HELP, SRCH, ACTIV, MOVE, END, WORDS.
Also calling other sucros by 'load <sucro>' is permitted:
11 * A=Continuation{R}
12 * B=Alternative B{R}
13 * C=Alternative C{R}
14 *Select one of the alternatives A,B,C:
15 - on key
16 - key ENTER: continue
17 - key A: continue
18 - key B: goto B1
19 - key C: load CSUCRO
20 - wait 300
21 *{R}{erase}...
U = More information on user interaction
C = Code words and statements in sucros