Hero image

Keyboard Square

What the code does

Shows how the position of a square can be interactively moved around the screen buy pressing keys on the keyboard (in this case the arrow keys). For this simple demo we limit the square to move up, down, left or right i.e. not diagonally.

Visualisation

The code

Instagram image Instagram image Instagram image Instagram image Instagram image Instagram image