When the 'ESC' key is pressed, the demo is closed.