Added escape button support for closing windows.