mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-23 17:35:00 +00:00
Make enter and tab key work again in crossterm backend (#395)
It looks like new crossterm returns a dedicated enum item for the enter and tab key instead of the `\n` and `\t` character. Fixes #394.
This commit is contained in:
parent
dac0f5a67e
commit
985e4ebf96
@ -90,9 +90,9 @@ impl Backend {
|
|||||||
CKeyEvent::PageDown => Event::Key(Key::PageDown),
|
CKeyEvent::PageDown => Event::Key(Key::PageDown),
|
||||||
CKeyEvent::Delete => Event::Key(Key::Del),
|
CKeyEvent::Delete => Event::Key(Key::Del),
|
||||||
CKeyEvent::Insert => Event::Key(Key::Ins),
|
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::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::Char(c) => Event::Char(c),
|
||||||
CKeyEvent::Ctrl('c') => Event::Exit,
|
CKeyEvent::Ctrl('c') => Event::Exit,
|
||||||
CKeyEvent::Ctrl(c) => Event::CtrlChar(c),
|
CKeyEvent::Ctrl(c) => Event::CtrlChar(c),
|
||||||
|
Loading…
Reference in New Issue
Block a user