summaryrefslogtreecommitdiffstats
path: root/native/src/input/keyboard/event.rs
diff options
context:
space:
mode:
Diffstat (limited to 'native/src/input/keyboard/event.rs')
-rw-r--r--native/src/input/keyboard/event.rs15
1 files changed, 10 insertions, 5 deletions
diff --git a/native/src/input/keyboard/event.rs b/native/src/input/keyboard/event.rs
index 862f30c4..bc8437a8 100644
--- a/native/src/input/keyboard/event.rs
+++ b/native/src/input/keyboard/event.rs
@@ -1,5 +1,4 @@
use super::{KeyCode, ModifiersState};
-use crate::input::ButtonState;
/// A keyboard event.
///
@@ -9,11 +8,17 @@ use crate::input::ButtonState;
/// [open an issue]: https://github.com/hecrj/iced/issues
#[derive(Debug, Clone, Copy, PartialEq)]
pub enum Event {
- /// A keyboard key was pressed or released.
- Input {
- /// The state of the key
- state: ButtonState,
+ /// A keyboard key was pressed.
+ KeyPressed {
+ /// The key identifier
+ key_code: KeyCode,
+
+ /// The state of the modifier keys
+ modifiers: ModifiersState,
+ },
+ /// A keyboard key was released.
+ KeyReleased {
/// The key identifier
key_code: KeyCode,