Skip to content

Commit

Permalink
Only parse app global shortcuts when ignored by widgets, fixes #120 and
Browse files Browse the repository at this point in the history
  • Loading branch information
jackpot51 committed Mar 25, 2024
1 parent 5410746 commit abfb5d8
Showing 1 changed file with 5 additions and 2 deletions.
7 changes: 5 additions & 2 deletions src/main.rs
Original file line number Diff line number Diff line change
Expand Up @@ -2549,9 +2549,12 @@ impl Application for App {
struct ThemeSubscription;

subscription::Subscription::batch([
event::listen_with(|event, _status| match event {
event::listen_with(|event, status| match event {
event::Event::Keyboard(keyboard::Event::KeyPressed { modifiers, key, .. }) => {
Some(Message::Key(modifiers, key))
match status {
event::Status::Ignored => Some(Message::Key(modifiers, key)),
event::Status::Captured => None,
}
}
event::Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {
Some(Message::Modifiers(modifiers))
Expand Down

0 comments on commit abfb5d8

Please sign in to comment.