Skip to content

Commit

Permalink
Add modified_key to keyboard::Event::KeyReleased
Browse files Browse the repository at this point in the history
  • Loading branch information
hecrj committed Oct 2, 2024
1 parent 8b34f99 commit 32cdc99
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 0 deletions.
3 changes: 3 additions & 0 deletions core/src/keyboard/event.rs
Original file line number Diff line number Diff line change
Expand Up @@ -36,6 +36,9 @@ 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,

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

0 comments on commit 32cdc99

Please sign in to comment.