working perfectly well
This commit is contained in:
@@ -48,6 +48,12 @@ impl KeySequenceTracker {
|
||||
pub fn sequence_to_string(&self) -> String {
|
||||
self.current_sequence.iter().map(|k| match k {
|
||||
KeyCode::Char(c) => c.to_string(),
|
||||
KeyCode::Left => "Left".into(),
|
||||
KeyCode::Right => "Right".into(),
|
||||
KeyCode::Up => "Up".into(),
|
||||
KeyCode::Down => "Down".into(),
|
||||
KeyCode::Esc => "Esc".into(),
|
||||
KeyCode::Enter => "Enter".into(),
|
||||
_ => String::new(),
|
||||
}).collect()
|
||||
}
|
||||
@@ -95,10 +101,10 @@ fn parse_key_part(part: &str) -> Option<ParsedKey> {
|
||||
"shift" => modifiers |= KeyModifiers::SHIFT,
|
||||
"alt" => modifiers |= KeyModifiers::ALT,
|
||||
"esc" => code = Some(KeyCode::Esc),
|
||||
"up" => code = Some(KeyCode::Up),
|
||||
"down" => code = Some(KeyCode::Down),
|
||||
"left" => code = Some(KeyCode::Left),
|
||||
"right" => code = Some(KeyCode::Right),
|
||||
"up" => code = Some(KeyCode::Up),
|
||||
"down" => code = Some(KeyCode::Down),
|
||||
"enter" => code = Some(KeyCode::Enter),
|
||||
"backspace" => code = Some(KeyCode::Backspace),
|
||||
"delete" => code = Some(KeyCode::Delete),
|
||||
|
||||
Reference in New Issue
Block a user