santilize modifiers

This commit is contained in:
Dongdong Zhou 2022-05-22 21:05:09 +01:00
parent 1133f867f8
commit 8922087625
1 changed files with 7 additions and 0 deletions

View File

@ -638,6 +638,13 @@ pub fn toggle_selection(
}
pub fn resolve_key_event(key: &KeyEvent) -> Option<&str> {
let mut key = key.clone();
key.mods = (Modifiers::ALT
| Modifiers::CONTROL
| Modifiers::SHIFT
| Modifiers::META)
& key.mods;
// Generates a `Modifiers` value to check against.
macro_rules! modifiers {
(ctrl) => {