variable <- Get_Key
Get_Key is a function that returns the ASCII code of the last key pressed by the user. If no key has been pressed, it will wait until a key is pressed before returning.
In addition to ASCII codes, Get_Key returns extended ASCII codes for special keys. In particular, these might be helpful to you:
Left Arrow | 165 |
Right Arrow | 167 |
Up Arrow | 166 |
Down Arrow | 168 |
Notes: A graphics window must be open when Get_Key is called or a run-time error will occur. If the RaptorGraph window is not on top, the user may have to click on it once before it will respond to user keystrokes.
Example: