pub enum LinuxInputEvent {
Keyboard {
event_type: KeyboardEventType,
keycode: u32,
scancode: u16,
modifiers: KeyModifiers,
timestamp: Instant,
},
MouseMove {
x: f64,
y: f64,
timestamp: Instant,
},
MouseButton {
button_code: u32,
button: MouseButton,
pressed: bool,
timestamp: Instant,
},
MouseWheel {
delta_x: i32,
delta_y: i32,
timestamp: Instant,
},
}Expand description
Translated Linux input event
Variants§
Keyboard
Keyboard key event
Fields
§
event_type: KeyboardEventTypeEvent type (KeyDown, KeyUp, or KeyRepeat)
§
modifiers: KeyModifiersActive modifiers
MouseMove
Mouse movement event
MouseButton
Mouse button event
Fields
Linux button code
Button name
MouseWheel
Mouse wheel scroll event
Trait Implementations§
Source§impl Clone for LinuxInputEvent
impl Clone for LinuxInputEvent
Source§fn clone(&self) -> LinuxInputEvent
fn clone(&self) -> LinuxInputEvent
Returns a duplicate of the value. Read more
1.0.0§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations§
impl Freeze for LinuxInputEvent
impl RefUnwindSafe for LinuxInputEvent
impl Send for LinuxInputEvent
impl Sync for LinuxInputEvent
impl Unpin for LinuxInputEvent
impl UnwindSafe for LinuxInputEvent
Blanket Implementations§
§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
§unsafe fn clone_to_uninit(&self, dest: *mut u8)
unsafe fn clone_to_uninit(&self, dest: *mut u8)
🔬This is a nightly-only experimental API. (
clone_to_uninit)