Fix CSI u support for escape key

This commit is contained in:
Maxime Coste 2021-02-11 20:14:19 +11:00
parent 26cf5cd1dc
commit e6905552cf

View File

@ -620,6 +620,8 @@ Optional<Key> NCursesUI::get_next_key()
return Key::Backspace;
if (c == 127) // when it's not backspace
return Key::Delete;
if (c == 27)
return Key::Escape;
return c;
};
auto parse_key = [&convert](unsigned char c) -> Key {