onKey

Produce a (possibly) new World when a key is
pressed. The given event is a String that
describes what key was pressed.

Special Keys

"up" :

The user presses the up-arrow key

"down" :

The user presses the down-arrow key

"left" :

The user presses the left-arrow key

"right" :

The user presses the right-arrow key

Other keys generate a single character String that
represents the key pressed. For example, Pressing the B
key on the keyboard generates "b" as an
event. If the shift key is held while pressing B then
"B" is generated.