EdenQwQ 2 years ago
parent e638919538
commit d5ba98f2f3

@ -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) {

Loading…
Cancel
Save