add physical_key to key subscriptions

This commit is contained in:
edwloef 2025-12-02 09:58:00 +01:00
parent 3fc85b900d
commit 86083d8ec8
No known key found for this signature in database
8 changed files with 29 additions and 17 deletions

View file

@ -381,14 +381,15 @@ where
program.subscription(&self.state).map(Event::Program);
debug::subscriptions_tracked(subscription.units());
let hotkeys =
futures::keyboard::on_key_press(|key, _modifiers| match key {
let hotkeys = futures::keyboard::on_key_press(
|key, _physical_key, _modifiers| match key {
keyboard::Key::Named(keyboard::key::Named::F12) => {
Some(Message::ToggleComet)
}
_ => None,
})
.map(Event::Message);
},
)
.map(Event::Message);
let commands = debug::commands().map(Event::Command);