pub struct KeyEvent {
pub timestamp: Option<i64>,
pub type_: Option<KeyEventType>,
pub key: Option<Key>,
pub modifiers: Option<Modifiers>,
pub key_meaning: Option<KeyMeaning>,
pub repeat_sequence: Option<u32>,
pub lock_state: Option<LockState>,
pub device_id: Option<u32>,
}Expand description
A Keyboard event generated to reflect key input. timestamp and type are required.
At least one of key and key_meaning must be set for a valid event.
Fields§
§timestamp: Option<i64>§type_: Option<KeyEventType>§key: Option<Key>§modifiers: Option<Modifiers>§key_meaning: Option<KeyMeaning>§repeat_sequence: Option<u32>§lock_state: Option<LockState>§device_id: Option<u32>Trait Implementations§
impl Copy for KeyEvent
Source§impl<___E> Encode<KeyEvent<'static>, ___E> for KeyEventwhere
___E: Encoder + ?Sized,
impl<___E> Encode<KeyEvent<'static>, ___E> for KeyEventwhere
___E: Encoder + ?Sized,
Source§impl<'a, ___E> Encode<KeyEvent<'static>, ___E> for &'a KeyEventwhere
___E: Encoder + ?Sized,
impl<'a, ___E> Encode<KeyEvent<'static>, ___E> for &'a KeyEventwhere
___E: Encoder + ?Sized,
impl Eq for KeyEvent
Source§impl<'de> FromWireRef<KeyEvent<'de>> for KeyEvent
impl<'de> FromWireRef<KeyEvent<'de>> for KeyEvent
Source§fn from_wire_ref(wire: &KeyEvent<'de>) -> KeyEvent
fn from_wire_ref(wire: &KeyEvent<'de>) -> KeyEvent
Converts the given reference to this type.
Source§impl Ord for KeyEvent
impl Ord for KeyEvent
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the maximum of two values. Read more
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Compares and returns the minimum of two values. Read more
Source§impl PartialOrd for KeyEvent
impl PartialOrd for KeyEvent
impl StructuralPartialEq for KeyEvent
Auto Trait Implementations§
impl Freeze for KeyEvent
impl RefUnwindSafe for KeyEvent
impl Send for KeyEvent
impl Sync for KeyEvent
impl Unpin for KeyEvent
impl UnsafeUnpin for KeyEvent
impl UnwindSafe for KeyEvent
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
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
Converts the given owned value to an option of this type.
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
Converts the given reference to an option of this type.
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
Converts the given service transport handle of type
T to [Self]