Struct uni_app::events::KeyUpEvent
source · 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: ScanCode
scancode : top left letter is ScanCode::Q
even on an azerty keyboard
key: String
virtual key code : top left letter is “KeyQ” on qwerty, “KeyA” on azerty
shift: bool
whether a shift key is pressed
alt: bool
whether an alt key is pressed
ctrl: bool
whether 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 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 more