#[non_exhaustive]pub enum EventKind {
Syn(SynEvent),
Key(KeyEvent),
Rel(RelEvent),
Abs(AbsEvent),
Switch(SwitchEvent),
Misc(MiscEvent),
Led(LedEvent),
Repeat(RepeatEvent),
Sound(SoundEvent),
Uinput(UinputEvent),
ForceFeedback(ForceFeedbackEvent),
}Expand description
Enumeration of event types.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
Non-exhaustive enums could have additional variants added in future. Therefore, when matching against variants of non-exhaustive enums, an extra wildcard arm must be added to account for any future variants.
Syn(SynEvent)
A synchronization event.
Key(KeyEvent)
A key press/release/repeat event.
Rel(RelEvent)
A relative axis change.
Abs(AbsEvent)
An absolute axis change.
Switch(SwitchEvent)
A switch state change.
Misc(MiscEvent)
Miscellaneous management events.
Led(LedEvent)
Reports or changes the state of device LEDs.
Repeat(RepeatEvent)
The key repeat settings have been changed.
Note: This event is not used to signal key repeats.
Key repeat events are sent as KeyEvents with a value of 2 (KeyState::REPEAT).
Sound(SoundEvent)
Plays simple sounds on the device.
Uinput(UinputEvent)
Internal events sent to UinputDevices.
ForceFeedback(ForceFeedbackEvent)
Starts or stops previously uploaded force-feedback effects.
Trait Implementations§
Source§impl From<EventKind> for InputEvent
impl From<EventKind> for InputEvent
Source§fn from(kind: EventKind) -> InputEvent
fn from(kind: EventKind) -> InputEvent
Converts to this type from the input type.
Source§impl From<ForceFeedbackEvent> for EventKind
impl From<ForceFeedbackEvent> for EventKind
Source§fn from(value: ForceFeedbackEvent) -> Self
fn from(value: ForceFeedbackEvent) -> Self
Converts to this type from the input type.
Source§impl From<RepeatEvent> for EventKind
impl From<RepeatEvent> for EventKind
Source§fn from(value: RepeatEvent) -> Self
fn from(value: RepeatEvent) -> Self
Converts to this type from the input type.
Source§impl From<SoundEvent> for EventKind
impl From<SoundEvent> for EventKind
Source§fn from(value: SoundEvent) -> Self
fn from(value: SoundEvent) -> Self
Converts to this type from the input type.
Source§impl From<SwitchEvent> for EventKind
impl From<SwitchEvent> for EventKind
Source§fn from(value: SwitchEvent) -> Self
fn from(value: SwitchEvent) -> Self
Converts to this type from the input type.
Source§impl From<UinputEvent> for EventKind
impl From<UinputEvent> for EventKind
Source§fn from(value: UinputEvent) -> Self
fn from(value: UinputEvent) -> Self
Converts to this type from the input type.
impl Copy for EventKind
impl Eq for EventKind
impl StructuralPartialEq for EventKind
Auto Trait Implementations§
impl Freeze for EventKind
impl RefUnwindSafe for EventKind
impl Send for EventKind
impl Sync for EventKind
impl Unpin for EventKind
impl UnwindSafe for EventKind
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