From c4ec1a9122f9224b117dcaabb6bbbc822e1dfb6f Mon Sep 17 00:00:00 2001 From: Moshe Sherman Date: Tue, 15 Sep 2020 23:37:11 +0300 Subject: [PATCH] give proper name to the space key fixes #266 --- src/commands.rs | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/src/commands.rs b/src/commands.rs index fd5f7d5..1575227 100644 --- a/src/commands.rs +++ b/src/commands.rs @@ -268,7 +268,7 @@ impl CommandManager { kb.insert("<".into(), Command::Previous); kb.insert(">".into(), Command::Next); kb.insert("c".into(), Command::Clear); - kb.insert(" ".into(), Command::Queue); + kb.insert("Space".into(), Command::Queue); kb.insert("Enter".into(), Command::Play); kb.insert("s".into(), Command::Save); kb.insert("Ctrl+s".into(), Command::SaveQueue); @@ -375,6 +375,7 @@ impl CommandManager { fn parse_key(key: &str) -> Event { match key { "Enter" => Event::Key(Key::Enter), + "Space" => Event::Char(" ".chars().next().unwrap()), "Tab" => Event::Key(Key::Tab), "Backspace" => Event::Key(Key::Backspace), "Esc" => Event::Key(Key::Esc),