add support for enter key and esc