pub struct KeyUpEvent {
pub code: ScanCode,
pub key: String,
pub shift: bool,
pub alt: bool,
pub ctrl: bool,
}Expand description
data associated with a key release event
Possible values for the virtual key code can be found in unrust/uni-app’s translate_scan_code
function.
Warning, there are some slight variations from one OS to another, for example the Command, F13, F14, F15 keys
only exist on Mac.
Fields§
§code: ScanCodescancode : top left letter is ScanCode::Q even on an azerty keyboard
key: Stringvirtual key code : top left letter is “KeyQ” on qwerty, “KeyA” on azerty
shift: boolwhether a shift key is pressed
alt: boolwhether an alt key is pressed
ctrl: boolwhether a control key is pressed
Trait Implementations§
Source§impl Clone for KeyUpEvent
impl Clone for KeyUpEvent
Source§fn clone(&self) -> KeyUpEvent
fn clone(&self) -> KeyUpEvent
Returns a duplicate 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 moreAuto Trait Implementations§
impl Freeze for KeyUpEvent
impl RefUnwindSafe for KeyUpEvent
impl Send for KeyUpEvent
impl Sync for KeyUpEvent
impl Unpin for KeyUpEvent
impl UnwindSafe for KeyUpEvent
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