Decouple iced from coffee
This commit is contained in:
parent
eefdcbe06c
commit
2b7ad3d50e
33 changed files with 2907 additions and 8 deletions
21
src/input/keyboard/event.rs
Normal file
21
src/input/keyboard/event.rs
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
use super::KeyCode;
|
||||
use crate::input::ButtonState;
|
||||
|
||||
#[derive(Debug, Clone, Copy, PartialEq)]
|
||||
/// A keyboard event.
|
||||
pub enum Event {
|
||||
/// A keyboard key was pressed or released.
|
||||
Input {
|
||||
/// The state of the key
|
||||
state: ButtonState,
|
||||
|
||||
/// The key identifier
|
||||
key_code: KeyCode,
|
||||
},
|
||||
|
||||
/// Text was entered.
|
||||
TextEntered {
|
||||
/// The character entered
|
||||
character: char,
|
||||
},
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue