Merge pull request #129 from NickSeagull/master
Allow turning the toggle key off
This commit is contained in:
commit
4c32a37854
src
|
@ -63,6 +63,7 @@ pub enum KeyModifier {
|
|||
ALT,
|
||||
META,
|
||||
BACKSPACE,
|
||||
OFF,
|
||||
}
|
||||
|
||||
impl Default for KeyModifier {
|
||||
|
|
|
@ -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) {
|
||||
|
|
Loading…
Reference in New Issue
Block a user