Skip to content

Commit

Permalink
fix: Separate the FlagsChanged and the rest of the events
Browse files Browse the repository at this point in the history
  • Loading branch information
huytd committed Oct 2, 2023
1 parent 0d57245 commit 20b4c1a
Showing 1 changed file with 4 additions and 3 deletions.
7 changes: 4 additions & 3 deletions src/platform/macos.rs
Original file line number Diff line number Diff line change
Expand Up @@ -225,13 +225,14 @@ pub fn run_event_listener(callback: &CallbackFn) {
}
}
}
_ => {
// A callback with None char for dismissing the tracking buffer
// but it's up to the implementor on the behavior
CGEventType::FlagsChanged => {
if !modifiers.is_empty() {
callback(proxy, None, modifiers);
}
}
_ => {
callback(proxy, None, KeyModifier::new());
}
}
Some(event.to_owned())
},
Expand Down

0 comments on commit 20b4c1a

Please sign in to comment.