KeyEventArgs
struct · ferroui-base · v0.5.0
struct KeyEventArgs
Provides information specific to a keyboard event.
Members
key
key: super::Key
The virtual-key for the associated event.
A given physical key can result in different virtual keys depending
on the current keyboard layout. This is the key that is generally
referred to when creating keyboard shortcuts. For example, when
pressing the key located at the Z position on standard US English
QWERTY keyboard, this property returns:
Key::Zfor an English (QWERTY) layoutKey::Wfor a French (AZERTY) layoutKey::Yfor a German (QWERTZ) layoutKey::Zfor a Russian (JCUKEN) layout
key_modifiers
key_modifiers: super::KeyModifiers
The key modifiers for the associated event.
physical_key
physical_key: super::PhysicalKey
The physical key for the associated event.
This value is independent of the current keyboard layout and usually corresponds to the key printed on a standard US English QWERTY keyboard. This is the key to use for position-dependent bindings such as WASD movement in games.
key_symbol
key_symbol: Option<String>
The unicode symbol of the key, or None if none is applicable.
For example, when pressing the key located at the Z position on
standard US English QWERTY keyboard, this property returns:
zfor an English (QWERTY) layoutwfor a French (AZERTY) layoutyfor a German (QWERTZ) layoutяfor a Russian (JCUKEN) layout
key_device_type
key_device_type: super::KeyDeviceType
The type of key device that sent this event.
new
fn new() -> Self
Creates args with default values and no routed event.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>ReceiverAnyToOwnedErasedDestructorIntoEitherCloneDefaultDerefIRoutedEventArgsIKeyModifiersEventArgsMarkupTyped
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.