summaryrefslogtreecommitdiffstats
path: root/core/src/keyboard
diff options
context:
space:
mode:
Diffstat (limited to 'core/src/keyboard')
-rw-r--r--core/src/keyboard/event.rs8
1 files changed, 4 insertions, 4 deletions
diff --git a/core/src/keyboard/event.rs b/core/src/keyboard/event.rs
index 016761af..884fc502 100644
--- a/core/src/keyboard/event.rs
+++ b/core/src/keyboard/event.rs
@@ -6,7 +6,7 @@ use super::{KeyCode, Modifiers};
/// additional events, feel free to [open an issue] and share your use case!_
///
/// [open an issue]: https://github.com/iced-rs/iced/issues
-#[derive(Debug, Clone, Copy, PartialEq, Eq)]
+#[derive(Debug, Clone, PartialEq, Eq)]
pub enum Event {
/// A keyboard key was pressed.
KeyPressed {
@@ -15,6 +15,9 @@ pub enum Event {
/// The state of the modifier keys
modifiers: Modifiers,
+
+ /// The text produced by the key press, if any.
+ text: Option<String>,
},
/// A keyboard key was released.
@@ -26,9 +29,6 @@ pub enum Event {
modifiers: Modifiers,
},
- /// A unicode character was received.
- CharacterReceived(char),
-
/// The keyboard modifiers have changed.
ModifiersChanged(Modifiers),
}