Allowing user to close window by pressing ESC