mirror of
https://github.com/FliegendeWurst/cursive.git
synced 2024-11-10 03:10:41 +00:00
Add Tab key to events
This commit is contained in:
parent
3d1507c3cf
commit
0bdb86181b
@ -23,6 +23,7 @@ pub enum EventResult {
|
||||
#[derive(PartialEq,Eq,Clone,Copy,Hash)]
|
||||
pub enum Key {
|
||||
Enter,
|
||||
Tab,
|
||||
ArrowLeft,
|
||||
ArrowRight,
|
||||
ArrowUp,
|
||||
@ -39,6 +40,7 @@ pub enum Key {
|
||||
impl Key {
|
||||
pub fn from_ncurses(ch: i32) -> Self {
|
||||
match ch {
|
||||
9 => Key::Tab,
|
||||
10 => Key::Enter,
|
||||
127 => Key::Backspace,
|
||||
330 => Key::Del,
|
||||
@ -70,6 +72,8 @@ impl fmt::Display for Key {
|
||||
Key::End => "End",
|
||||
Key::Backspace => "Backspace",
|
||||
Key::Del => "Del",
|
||||
Key::Enter => "Enter",
|
||||
Key::Tab => "Tab",
|
||||
_ => "",
|
||||
}),
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user