Merge pull request #75 from nabijaczleweli/fix/73-enter-newline-pancurses

Fix Enter being Character('\n') in pancurses backend
This commit is contained in:
Alexandre Bury 2016-10-11 12:07:10 -07:00 committed by GitHub
commit 3e766d3a28

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