diff --git a/src/daemon.rs b/src/daemon.rs index ab79c1c..1171da5 100644 --- a/src/daemon.rs +++ b/src/daemon.rs @@ -121,7 +121,8 @@ pub fn main() { log::debug!("state_keysyms: {:#?}", state_keysyms); log::debug!("hotkey: {:#?}", possible_hotkeys); for hotkey in &possible_hotkeys { - if state_modifiers == hotkey.modifiers && state_keysyms.contains(&hotkey.keysym) + // this should check if state_modifiers and hotkey.modifiers have the same elements + if state_modifiers.iter().all(|x| hotkey.modifiers.contains(x)) && state_keysyms.contains(&hotkey.keysym) { log::info!("Hotkey pressed: {:#?}", hotkey); if let Err(e) = sock_send(&hotkey.command) {