Code Example: Key Events
This application relays the last ten keys the user has pushed/released.
The keypressListenerDown function is called whenever a key is pressed. The updateArray command appends the new keypress to an array of already pressed and formatted keys, which is known as downPresses or upPresses depending upon the column. These arrays are then appended to the correct positional element in the DOM, and are displayed on screen.