key_canonicalization now only matches chars

imgbot
Jan Hrastnik 4 years ago committed by Blaž Hrastnik
parent 68abc67ec6
commit daad8ebe12

@ -692,8 +692,12 @@ impl Component for EditorView {
}
fn canonicalize_key(key: &mut KeyEvent) -> KeyEvent {
if let KeyEvent { code: KeyCode::Char(_), modifiers: KeyModifiers::SHIFT } = key {
key.modifiers = KeyModifiers::NONE;
if let KeyEvent {
code: KeyCode::Char(_),
modifiers: _,
} = key
{
key.modifiers.remove(KeyModifiers::SHIFT)
}
*key
}
}

Loading…
Cancel
Save