From f33d80e108c481b91f23dd2b0c319ce83e0fe37c Mon Sep 17 00:00:00 2001 From: Tim Oram Date: Fri, 11 Jun 2021 09:19:51 -0230 Subject: Remove key binding shift addition The addition of a shift modifier in the event handler means that the keybindings should not have shift added to keybindings. --- src/input/key_bindings.rs | 11 ----------- 1 file changed, 11 deletions(-) diff --git a/src/input/key_bindings.rs b/src/input/key_bindings.rs index be8d68d..9bc5274 100644 --- a/src/input/key_bindings.rs +++ b/src/input/key_bindings.rs @@ -79,9 +79,6 @@ fn map_keybindings(bindings: &[String]) -> Vec { }, k => { let c = k.chars().next().unwrap(); - if c.is_ascii_uppercase() { - modifiers.insert(KeyModifiers::SHIFT); - } KeyCode::Char(c) }, }; @@ -176,12 +173,4 @@ mod tests { fn map_keybindings_key_code(binding: &str, key_code: KeyCode) { assert_eq!(map_keybindings(&[String::from(binding)]), vec![Event::from(key_code)]); } - - #[test] - fn map_keybindings_upper_case_char() { - assert_eq!(map_keybindings(&[String::from('A')]), vec![Event::Key(KeyEvent { - code: KeyCode::Char('A'), - modifiers: KeyModifiers::SHIFT - })]); - } } -- cgit v1.2.3