Skip to content

Commit

Permalink
Merge pull request #2576 from iced-rs/physical-keys
Browse files Browse the repository at this point in the history
Add `physical_key` and `modified_key` to `keyboard::Event`
  • Loading branch information
hecrj authored Sep 13, 2024
2 parents 62b4da8 + 4e9428b commit 2e3082d
Show file tree
Hide file tree
Showing 3 changed files with 805 additions and 5 deletions.
7 changes: 7 additions & 0 deletions core/src/keyboard/event.rs
Original file line number Diff line number Diff line change
@@ -1,3 +1,4 @@
use crate::keyboard::key;
use crate::keyboard::{Key, Location, Modifiers};
use crate::SmolStr;

Expand All @@ -14,6 +15,12 @@ pub enum Event {
/// The key pressed.
key: Key,

/// The key pressed with all keyboard modifiers applied, except Ctrl.
modified_key: Key,

/// The physical key pressed.
physical_key: key::Physical,

/// The location of the key.
location: Location,

Expand Down
Loading

0 comments on commit 2e3082d

Please sign in to comment.