

Determine if a key has been pressed and store this in a variable.

If no key has been pressed, the program should continue without waiting.




To run:
Start up.
Handle any events.
Shut down.
 
To handle any events:
Deque an event.
If the event is nil, exit.
Handle the event.
Repeat.
 
To handle an event:
If the event's kind is "key down", handle the event (key down).
 
To handle an event (key down):
Put the event's key into a key.
Write "" then the key to the console.
If the key is the escape key, relinquish control.