summaryrefslogtreecommitdiffstats
diff options
context:
space:
mode:
authorLibravatar ibaryshnikov <baryshnikov.il@gmail.com>2024-09-26 17:13:32 +0300
committerLibravatar ibaryshnikov <baryshnikov.il@gmail.com>2024-09-26 17:13:32 +0300
commit8b34f99b02858a8a0986fd106236f322b35f34a0 (patch)
tree895933ce2bb4efcbf3d765d500677415e521e5a4
parent75548373a761d66df364494267c89697dda91fbe (diff)
downloadiced-8b34f99b02858a8a0986fd106236f322b35f34a0.tar.gz
iced-8b34f99b02858a8a0986fd106236f322b35f34a0.tar.bz2
iced-8b34f99b02858a8a0986fd106236f322b35f34a0.zip
added physical_key to KeyReleased event
-rw-r--r--core/src/keyboard/event.rs3
-rw-r--r--winit/src/conversion.rs1
2 files changed, 4 insertions, 0 deletions
diff --git a/core/src/keyboard/event.rs b/core/src/keyboard/event.rs
index 26c45717..0c97d26f 100644
--- a/core/src/keyboard/event.rs
+++ b/core/src/keyboard/event.rs
@@ -36,6 +36,9 @@ pub enum Event {
/// The key released.
key: Key,
+ /// The physical key released.
+ physical_key: key::Physical,
+
/// The location of the key.
location: Location,
diff --git a/winit/src/conversion.rs b/winit/src/conversion.rs
index 43e1848b..04cbb982 100644
--- a/winit/src/conversion.rs
+++ b/winit/src/conversion.rs
@@ -262,6 +262,7 @@ pub fn window_event(
winit::event::ElementState::Released => {
keyboard::Event::KeyReleased {
key,
+ physical_key,
modifiers,
location,
}