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

@ -117,12 +117,12 @@ impl Example {
}
fn subscription(&self) -> Subscription<Message> {
keyboard::on_key_press(|key_code, modifiers| {
keyboard::on_key_press(|key, _physical_key, modifiers| {
if !modifiers.command() {
return None;
}
handle_hotkey(key_code)
handle_hotkey(key)
})
}