rename to keyEscapeEvent. proper handling of exit and halt command