Added check for Escape key to quit.