
; this script can help you to learn what sequence of codes various
; keys will produce.  In particular, try the function or arrow keys.

	NEW 640,200,2
	DIM seq[40]
    /top:
	MOVE 20,20
	TEXT "Hit a key"
	i=2
	GETKEY key
	seq[1]=key	
	c=10
	WHILE c
	    IFKEY key
	    IF key<>-1 THEN seq[i]=key:i=i+1
	    PAUSE 1
	    c=c-1
	WEND
	MOVE 20,50
	IF i=2
		TEXT "There was one code:"
	ELSE
		TEXT "There were ";i-1;" codes:"
	ENDIF
	MOVE 30,70
	FOR c=1 to i-1
	     TEXT seq[c];"  ";
	NEXT
	MOVE 20,100
	TEXT "Hit space bar to restart, mouse to exit"
	key=0
	WHILE key<>' '
	    GETKEY key
	WEND
	CLEAR
	GOTO top
