pub enum InputDeviceEvent {
Keyboard(KeyboardEvent),
LightSensor(LightSensorEvent),
ConsumerControls(ConsumerControlsEvent),
Mouse(MouseEvent),
TouchScreen(TouchScreenEvent),
Touchpad(TouchpadEvent),
}
Expand description
An InputDeviceEvent
represents an input event from an input device.
InputDeviceEvent
s contain more context than the raw InputReport
they are parsed from.
For example, [KeyboardEvent
] contains all the pressed keys, as well as the key’s
phase (pressed, released, etc.).
Each InputDeviceBinding
generates the type of InputDeviceEvent
s that are appropriate
for their device.
Variants§
Keyboard(KeyboardEvent)
LightSensor(LightSensorEvent)
ConsumerControls(ConsumerControlsEvent)
Mouse(MouseEvent)
TouchScreen(TouchScreenEvent)
Touchpad(TouchpadEvent)
Trait Implementations§
Source§impl Clone for InputDeviceEvent
impl Clone for InputDeviceEvent
Source§fn clone(&self) -> InputDeviceEvent
fn clone(&self) -> InputDeviceEvent
Returns a copy of the value. Read more
1.0.0 · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source
. Read moreSource§impl Debug for InputDeviceEvent
impl Debug for InputDeviceEvent
Source§impl PartialEq for InputDeviceEvent
impl PartialEq for InputDeviceEvent
impl StructuralPartialEq for InputDeviceEvent
Auto Trait Implementations§
impl Freeze for InputDeviceEvent
impl !RefUnwindSafe for InputDeviceEvent
impl Send for InputDeviceEvent
impl Sync for InputDeviceEvent
impl Unpin for InputDeviceEvent
impl !UnwindSafe for InputDeviceEvent
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,
Source§unsafe fn clone_to_uninit(&self, dst: *mut T)
unsafe fn clone_to_uninit(&self, dst: *mut T)
🔬This is a nightly-only experimental API. (
clone_to_uninit
)