pub struct InputEvent {
pub time: SystemTime,
pub code: EventCode,
pub state: KeyState,
}Expand description
InputEvent is a qsk-specific struct modeled in large part after evdev_rs::InputEvent. Although evdev_rs::InputEvent actually supports a large range of Linux-specific input events, we focus here on keyboard and synchronization events specifically since keyboard events are the primary concern of qsk initially and synchronization needs to be represented. Abstracting away from Linux-specific event handling in this way will enable us to support input event systems for other OSes in the future.
Fields§
§time: SystemTime§code: EventCode§state: KeyStateTrait Implementations§
Source§impl Clone for InputEvent
impl Clone for InputEvent
Source§fn clone(&self) -> InputEvent
fn clone(&self) -> InputEvent
Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreimpl Copy for InputEvent
Source§impl Debug for InputEvent
impl Debug for InputEvent
Source§impl<'de> Deserialize<'de> for InputEvent
impl<'de> Deserialize<'de> for InputEvent
Source§fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
fn deserialize<__D>(__deserializer: __D) -> Result<Self, __D::Error>where
__D: Deserializer<'de>,
Deserialize this value from the given Serde deserializer. Read more
impl Eq for InputEvent
Source§impl Hash for InputEvent
impl Hash for InputEvent
Source§impl PartialEq for InputEvent
impl PartialEq for InputEvent
Source§impl Serialize for InputEvent
impl Serialize for InputEvent
impl StructuralPartialEq for InputEvent
Auto Trait Implementations§
impl Freeze for InputEvent
impl RefUnwindSafe for InputEvent
impl Send for InputEvent
impl Sync for InputEvent
impl Unpin for InputEvent
impl UnsafeUnpin for InputEvent
impl UnwindSafe for InputEvent
Blanket Implementations§
Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more