summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorTim Oram <dev@mitmaro.ca>2021-06-11 09:19:51 -0230
committerTim Oram <dev@mitmaro.ca>2021-06-12 11:06:54 -0230
commitf33d80e108c481b91f23dd2b0c319ce83e0fe37c (patch)
tree6269fb04aca8118c0cf15d7e2747bb6cd283234c
parent65a3f1506a626c1e7fc59f4ff1b9b444bbc39f2b (diff)
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.
-rw-r--r--src/input/key_bindings.rs11
1 files changed, 0 insertions, 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<Event> {
},
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
- })]);
- }
}