ON KEY (n)
Jump to navigation Jump to search
ON KEY (n) defines a line number or label to go to when that key is struck, the keys apply to the list of keys shown below, where n is the number that represents that key.
- Syntax: ON KEY (n) GOSUB linelabel/number
- n can be any of the following:
- 1-10 for F1-F10.
- 11, 12, 13 and 14 for UP, LEFT, RIGHT and DOWN arrows respectively.
- 15-25 for user-defined keys.
- 30 and 31 for F11 and F12.
- KEY(1) ON
- ON KEY (1) GOSUB trap
- PRINT "Press F1 to quit!"
- PRINT "You pressed F1 like I told you to :)"