Fix Enter being Character('\n') in pancurses backend

Closes #73
This commit is contained in:
nabijaczleweli 2016-10-11 20:59:28 +02:00
parent 9dd82117f4
commit 8a6a49fbc3
No known key found for this signature in database
GPG Key ID: BCFD0B018D2658F1

View File

@ -85,6 +85,7 @@ impl backend::Backend for Concrete {
// of Ctrl/Alt/Shift in these :v // of Ctrl/Alt/Shift in these :v
if let Some(ev) = self.window.getch() { if let Some(ev) = self.window.getch() {
match ev { match ev {
pancurses::Input::Character('\n') => Event::Key(Key::Enter),
pancurses::Input::Character(c) => Event::Char(c), pancurses::Input::Character(c) => Event::Char(c),
pancurses::Input::Unknown(i) => Event::Unknown(i), pancurses::Input::Unknown(i) => Event::Unknown(i),
// TODO: I honestly have no fucking idea what KeyCodeYes is // TODO: I honestly have no fucking idea what KeyCodeYes is