Previous Up Next

10.2.3  Reading a single keystroke

If you want the user to enter a single key, you can use the getKey command, which doesn’t take any arguments, to get the ASCII code of the next keystroke. For example, if you enter

asciicode := getKey()

and then hit the A key, then the variable asciicode will have the value 65, which is the ASCII code of capital A.


Previous Up Next