handle ESC key to close overlaid view