summaryrefslogblamecommitdiffstats
path: root/src/input/keyboard/event.rs
blob: 5acd46c02d3e13c845ed06a871190f8ee7e4d975 (plain) (tree)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15














                                               
                                         
                            
 
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,
    },

    /// A unicode character was received.
    CharacterReceived(char),
}