Pressed keys are now tracked via the mouse/keyboard callback.
Formatted main for easier reading.