Expand description
The event_variants module contains new-type wrappers around InputEvent
for each known EventType.
These event variants guarantee that the underlying InputEvent has the
corresponding type. They may also contain additional methods for the
specific type and convenient shortcut methods for event creation.
An InputEvent can be converted to the corresponding event variant with
the InputEvent::destructure() method. Each event variant implements
Into<InputEvent> and Deref<Target=InputEvent> for easy back conversion.
Structsยง
- Absolute
Axis Event EventType::ABSOLUTE- FFEvent
EventType::FORCEFEEDBACK- FFStatus
Event EventType::FORCEFEEDBACKSTATUS- KeyEvent
EventType::KEY- LedEvent
EventType::LED- Misc
Event EventType::MISC- Other
Event - An event not covered by any other variant.
- Power
Event EventType::POWER- Relative
Axis Event EventType::RELATIVE- Repeat
Event EventType::REPEAT- Sound
Event EventType::SOUND- Switch
Event EventType::SWITCH- Synchronization
Event - A bookkeeping event. Usually not important to applications.
EventType::SYNCHRONIZATION - UInput
Event EventType::UINPUT