diff --git a/src/event/mod.rs b/src/event/mod.rs index aeb50da..bc9828a 100644 --- a/src/event/mod.rs +++ b/src/event/mod.rs @@ -63,6 +63,7 @@ pub enum KeyModifier { ALT, META, BACKSPACE, + OFF, } impl Default for KeyModifier { diff --git a/src/matcher/scrolling.rs b/src/matcher/scrolling.rs index 83db187..2d59b19 100644 --- a/src/matcher/scrolling.rs +++ b/src/matcher/scrolling.rs @@ -194,6 +194,7 @@ impl <'a, R: MatchReceiver, M: ConfigManager<'a>> super::Matcher for ScrollingMa let config = self.config_manager.default_config(); if m == config.toggle_key { + if m == KeyModifier::OFF { return } let mut toggle_press_time = self.toggle_press_time.borrow_mut(); if let Ok(elapsed) = toggle_press_time.elapsed() { if elapsed.as_millis() < u128::from(config.toggle_interval) {