summaryrefslogtreecommitdiffstats
path: root/core/src/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/keyboard')
-rw-r--r--core/src/keyboard/key.rs6
1 files changed, 6 insertions, 0 deletions
diff --git a/core/src/keyboard/key.rs b/core/src/keyboard/key.rs
index 69a91902..47169d9a 100644
--- a/core/src/keyboard/key.rs
+++ b/core/src/keyboard/key.rs
@@ -32,6 +32,12 @@ impl Key {
}
}
+impl From<Named> for Key {
+ fn from(named: Named) -> Self {
+ Self::Named(named)
+ }
+}
+
/// A named key.
///
/// This is mostly the `NamedKey` type found in [`winit`].