FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    KeyEventArgs

    struct · ferroui-base · v0.5.0

    struct KeyEventArgs
    

    Provides information specific to a keyboard event.

    View source

    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::Z for an English (QWERTY) layout
    • Key::W for a French (AZERTY) layout
    • Key::Y for a German (QWERTZ) layout
    • Key::Z for a Russian (JCUKEN) layout

    Source

    key_modifiers

    key_modifiers: super::KeyModifiers
    

    The key modifiers for the associated event.

    Source

    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.

    Source

    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:

    • z for an English (QWERTY) layout
    • w for a French (AZERTY) layout
    • y for a German (QWERTZ) layout
    • я for a Russian (JCUKEN) layout

    Source

    key_device_type

    key_device_type: super::KeyDeviceType
    

    The type of key device that sent this event.

    Source

    new

    fn new() -> Self
    

    Creates args with default values and no routed event.

    Source

    Trait implementations

    Availability

    Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.