Skip to content

Commit

Permalink
Merge pull request #2608 from ibaryshnikov/haskell
Browse files Browse the repository at this point in the history
added physical_key to KeyReleased event
  • Loading branch information
hecrj authored Oct 2, 2024
2 parents 40abed6 + 32cdc99 commit 5ee82b2
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 0 deletions.
6 changes: 6 additions & 0 deletions core/src/keyboard/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,12 @@ pub enum Event {
/// The key released.
key: Key,

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

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

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

Expand Down
2 changes: 2 additions & 0 deletions winit/src/conversion.rs
Original file line number Diff line number Diff line change
Expand Up @@ -262,6 +262,8 @@ pub fn window_event(
winit::event::ElementState::Released => {
keyboard::Event::KeyReleased {
key,
modified_key,
physical_key,
modifiers,
location,
}
Expand Down

0 comments on commit 5ee82b2

Please sign in to comment.