add physical_key to key subscriptions
This commit is contained in:
parent
3fc85b900d
commit
86083d8ec8
8 changed files with 29 additions and 17 deletions
|
|
@ -227,7 +227,7 @@ impl Example {
|
|||
fn subscription(&self) -> Subscription<Message> {
|
||||
use keyboard::key;
|
||||
|
||||
keyboard::on_key_press(|key, _modifiers| {
|
||||
keyboard::on_key_press(|key, _physical_key, _modifiers| {
|
||||
if let keyboard::Key::Named(key::Named::F5) = key {
|
||||
Some(Message::Screenshot)
|
||||
} else {
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue