pub enum KeyInput {
KeyPress(VirtualKeyCode),
KeyRelease(VirtualKeyCode),
Text(char),
}
Expand description
Represents a key press or a text input event. Text is handled separately due to unicode, multi-key accents etc which you don’t want to simulate manually.
Variants
KeyPress(VirtualKeyCode)
A key was pressed.
KeyRelease(VirtualKeyCode)
A key was released.
Text(char)
Got text input (one unicode character).
Trait Implementations
Auto Trait Implementations
impl RefUnwindSafe for KeyInput
impl Send for KeyInput
impl Sync for KeyInput
impl Unpin for KeyInput
impl UnwindSafe for KeyInput
Blanket Implementations
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more