give proper name to the space key

fixes #266
This commit is contained in:
Moshe Sherman
2020-09-15 23:37:11 +03:00
committed by Henrik Friedrichsen
parent 3893a6f5a0
commit c4ec1a9122

View File

@@ -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),