Close window when escape is pressed.