Struct uni_app::events::KeyUpEvent
source · [−]pub struct KeyUpEvent {
pub code: String,
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 scancode/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: Stringscancode : top left letter is “KeyQ” 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
sourceimpl Clone for KeyUpEvent
impl Clone for KeyUpEvent
sourcefn clone(&self) -> KeyUpEvent
fn clone(&self) -> KeyUpEvent
Returns a copy of the value. Read more
1.0.0 · sourcefn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
Performs copy-assignment from
source. Read moreAuto Trait Implementations
impl RefUnwindSafe for KeyUpEvent
impl Send for KeyUpEvent
impl Sync for KeyUpEvent
impl Unpin for KeyUpEvent
impl UnwindSafe for KeyUpEvent
Blanket Implementations
sourceimpl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
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