Make enter and tab key work again in crossterm backend
It looks like new crossterm returns a dedicated enum item for the enter
and tab key instead of the `\n` and `\t` character.
Fixes
@@ -90,9 +90,9 @@ impl Backend {
CKeyEvent::PageDown => Event::Key(Key::PageDown),
CKeyEvent::Delete => Event::Key(Key::Del),
CKeyEvent::Insert => Event::Key(Key::Ins),
+ CKeyEvent::Enter => Event::Key(Key::Enter),
+ CKeyEvent::Tab => Event::Key(Key::Tab),
CKeyEvent::F(n) => Event::Key(Key::from_f(n)),
- CKeyEvent::Char('\n') => Event::Key(Key::Enter),
- CKeyEvent::Char('\t') => Event::Key(Key::Tab),
CKeyEvent::Char(c) => Event::Char(c),
CKeyEvent::Ctrl('c') => Event::Exit,
CKeyEvent::Ctrl(c) => Event::CtrlChar(c),
