This commit is contained in:
parent
5410746e1d
commit
abfb5d845f
1 changed files with 5 additions and 2 deletions
|
|
@ -2549,9 +2549,12 @@ impl Application for App {
|
||||||
struct ThemeSubscription;
|
struct ThemeSubscription;
|
||||||
|
|
||||||
subscription::Subscription::batch([
|
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, .. }) => {
|
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)) => {
|
event::Event::Keyboard(keyboard::Event::ModifiersChanged(modifiers)) => {
|
||||||
Some(Message::Modifiers(modifiers))
|
Some(Message::Modifiers(modifiers))
|
||||||
|
|
|
||||||
Loading…
Add table
Add a link
Reference in a new issue