Fixed an issue with Escape characters for key events.