FerroUI/ docs

Search guides, controls, Rust APIs, and XAML.

    GitHub ↗

    PhysicalKey

    enum · ferroui-base · v0.5.0

    enum PhysicalKey
    

    Represents a keyboard physical key.

    The names follow the W3C codes, see https://www.w3.org/TR/uievents-code/.

    View source

    Members

    None

    None = 0
    

    Represents no key.

    Source

    Backquote

    Backquote = 1
    

    ``~on a US keyboard. This is the半角/全角/漢字` (hankaku/zenkaku/kanji) key on Japanese keyboards.

    Source

    Backslash

    Backslash = 2
    

    Used for both the US \| (on the 101-key layout) and also for the key located between the " and Enter keys on row C of the 102-, 104- and 106-key layouts. #~ on a UK (102) keyboard.

    Source

    BracketLeft

    BracketLeft = 3
    

    [{ on a US keyboard.

    Source

    BracketRight

    BracketRight = 4
    

    ]} on a US keyboard.

    Source

    Comma

    Comma = 5
    

    ,< on a US keyboard.

    Source

    Digit0

    Digit0 = 6
    

    0) on a US keyboard.

    Source

    Digit1

    Digit1 = 7
    

    1! on a US keyboard.

    Source

    Digit2

    Digit2 = 8
    

    2@ on a US keyboard.

    Source

    Digit3

    Digit3 = 9
    

    3# on a US keyboard.

    Source

    Digit4

    Digit4 = 10
    

    4$ on a US keyboard.

    Source

    Digit5

    Digit5 = 11
    

    5% on a US keyboard.

    Source

    Digit6

    Digit6 = 12
    

    6^ on a US keyboard.

    Source

    Digit7

    Digit7 = 13
    

    7& on a US keyboard.

    Source

    Digit8

    Digit8 = 14
    

    8* on a US keyboard.

    Source

    Digit9

    Digit9 = 15
    

    9( on a US keyboard.

    Source

    Equal

    Equal = 16
    

    =+ on a US keyboard.

    Source

    IntlBackslash

    IntlBackslash = 17
    

    Located between the left Shift and Z keys. \| on a UK keyboard.

    Source

    IntlRo

    IntlRo = 18
    

    Located between the / and right Shift keys. \ろ (ro) on a Japanese keyboard.

    Source

    IntlYen

    IntlYen = 19
    

    Located between the = and Backspace keys. ¥ (yen) on a Japanese keyboard. \/ on a Russian keyboard.

    Source

    A

    A = 20
    

    a on a US keyboard. q on an AZERTY (e.g., French) keyboard.

    Source

    B

    B = 21
    

    b on a US keyboard.

    Source

    C

    C = 22
    

    c on a US keyboard.

    Source

    D

    D = 23
    

    d on a US keyboard.

    Source

    E

    E = 24
    

    e on a US keyboard.

    Source

    F

    F = 25
    

    f on a US keyboard.

    Source

    G

    G = 26
    

    g on a US keyboard.

    Source

    H

    H = 27
    

    h on a US keyboard.

    Source

    I

    I = 28
    

    i on a US keyboard.

    Source

    J

    J = 29
    

    j on a US keyboard.

    Source

    K

    K = 30
    

    k on a US keyboard.

    Source

    L

    L = 31
    

    l on a US keyboard.

    Source

    M

    M = 32
    

    m on a US keyboard.

    Source

    N

    N = 33
    

    n on a US keyboard.

    Source

    O

    O = 34
    

    o on a US keyboard.

    Source

    P

    P = 35
    

    p on a US keyboard.

    Source

    Q

    Q = 36
    

    q on a US keyboard. a on an AZERTY (e.g., French) keyboard.

    Source

    R

    R = 37
    

    r on a US keyboard.

    Source

    S

    S = 38
    

    s on a US keyboard.

    Source

    T

    T = 39
    

    t on a US keyboard.

    Source

    U

    U = 40
    

    u on a US keyboard.

    Source

    V

    V = 41
    

    v on a US keyboard.

    Source

    W

    W = 42
    

    w on a US keyboard. z on an AZERTY (e.g., French) keyboard.

    Source

    X

    X = 43
    

    x on a US keyboard.

    Source

    Y

    Y = 44
    

    y on a US keyboard. z on a QWERTZ (e.g., German) keyboard.

    Source

    Z

    Z = 45
    

    z on a US keyboard. w on an AZERTY (e.g., French) keyboard. y on a QWERTZ (e.g., German) keyboard.

    Source

    Minus

    Minus = 46
    

    -_ on a US keyboard.

    Source

    Period

    Period = 47
    

    .> on a US keyboard.

    Source

    Quote

    Quote = 48
    

    '" on a US keyboard.

    Source

    Semicolon

    Semicolon = 49
    

    ;: on a US keyboard.

    Source

    Slash

    Slash = 50
    

    /? on a US keyboard.

    Source

    AltLeft

    AltLeft = 51
    

    Alt, Option or ⌥.

    Source

    AltRight

    AltRight = 52
    

    Alt, Option or ⌥. This is labelled AltGr key on many keyboard layouts.

    Source

    Backspace

    Backspace = 53
    

    Backspace or ⌫. Labelled Delete on Apple keyboards.

    Source

    CapsLock

    CapsLock = 54
    

    CapsLock or ⇪.

    Source

    ContextMenu

    ContextMenu = 55
    

    The application context menu key, which is typically found between the right Meta key and the right Control key.

    Source

    ControlLeft

    ControlLeft = 56
    

    Control or ⌃.

    Source

    ControlRight

    ControlRight = 57
    

    Control or ⌃.

    Source

    Enter

    Enter = 58
    

    Enter or ↵. Labelled Return on Apple keyboards.

    Source

    MetaLeft

    MetaLeft = 59
    

    The ⊞ (Windows), ⌘, Command or other OS symbol key.

    Source

    MetaRight

    MetaRight = 60
    

    The ⊞ (Windows), ⌘, Command or other OS symbol key.

    Source

    ShiftLeft

    ShiftLeft = 61
    

    Shift or ⇧.

    Source

    ShiftRight

    ShiftRight = 62
    

    Shift or ⇧.

    Source

    Space

    Space = 63
    

    (space).

    Source

    Tab

    Tab = 64
    

    Tab or ⇥.

    Source

    Convert

    Convert = 65
    

    Japanese: 変換 (henkan).

    Source

    KanaMode

    KanaMode = 66
    

    Japanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji).

    Source

    Lang1

    Lang1 = 67
    

    Korean: HangulMode 한/영 (han/yeong). Japanese (Mac keyboard): かな (kana).

    Source

    Lang2

    Lang2 = 68
    

    Korean: Hanja 한자 (hanja). Japanese (Mac keyboard): 英数 (eisu).

    Source

    Lang3

    Lang3 = 69
    

    Japanese (word-processing keyboard): Katakana.

    Source

    Lang4

    Lang4 = 70
    

    Japanese (word-processing keyboard): Hiragana.

    Source

    Lang5

    Lang5 = 71
    

    Japanese (word-processing keyboard): Zenkaku/Hankaku.

    Source

    NonConvert

    NonConvert = 72
    

    Japanese: 無変換 (muhenkan).

    Source

    Delete

    Delete = 73
    

    ⌦. The forward delete key. Note that on Apple keyboards, the key labelled Delete on the main part of the keyboard is Backspace.

    Source

    End

    End = 74
    

    End or ↘.

    Source

    Help

    Help = 75
    

    Help. Not present on standard PC keyboards.

    Source

    Home

    Home = 76
    

    Home or ↖.

    Source

    Insert

    Insert = 77
    

    Insert or Ins. Not present on Apple keyboards.

    Source

    PageDown

    PageDown = 78
    

    Page Down, PgDn or ⇟.

    Source

    PageUp

    PageUp = 79
    

    Page Up, PgUp or ⇞.

    Source

    ArrowDown

    ArrowDown = 80
    

    ↓.

    Source

    ArrowLeft

    ArrowLeft = 81
    

    ←.

    Source

    ArrowRight

    ArrowRight = 82
    

    →.

    Source

    ArrowUp

    ArrowUp = 83
    

    ↑.

    Source

    NumLock

    NumLock = 84
    

    Numeric keypad Num Lock. On the Mac, this is used for the numpad Clear key.

    Source

    NumPad0

    NumPad0 = 85
    

    Numeric keypad 0 Ins on a keyboard. 0 on a phone or remote control.

    Source

    NumPad1

    NumPad1 = 86
    

    Numeric keypad 1 End on a keyboard. 1 or 1 QZ on a phone or remote control.

    Source

    NumPad2

    NumPad2 = 87
    

    Numeric keypad 2 ↓ on a keyboard. 2 ABC on a phone or remote control.

    Source

    NumPad3

    NumPad3 = 88
    

    Numeric keypad 3 PgDn on a keyboard. 3 DEF on a phone or remote control.

    Source

    NumPad4

    NumPad4 = 89
    

    Numeric keypad 4 ← on a keyboard. 4 GHI on a phone or remote control.

    Source

    NumPad5

    NumPad5 = 90
    

    Numeric keypad 5 on a keyboard. 5 JKL on a phone or remote control.

    Source

    NumPad6

    NumPad6 = 91
    

    Numeric keypad 6 → on a keyboard. 6 MNO on a phone or remote control.

    Source

    NumPad7

    NumPad7 = 92
    

    Numeric keypad 7 Home on a keyboard. 7 PQRS or 7 PRS on a phone or remote control.

    Source

    NumPad8

    NumPad8 = 93
    

    Numeric keypad 8 ↑ on a keyboard. 8 TUV on a phone or remote control.

    Source

    NumPad9

    NumPad9 = 94
    

    Numeric keypad 9 PgUp on a keyboard. 9 WXYZ or 9 WXY on a phone or remote control.

    Source

    NumPadAdd

    NumPadAdd = 95
    

    Numeric keypad +.

    Source

    NumPadClear

    NumPadClear = 96
    

    Numeric keypad C or AC (All Clear). Also for use with numpads that have a Clear key that is separate from the NumLock key. On the Mac, the numpad Clear key is NumLock.

    Source

    NumPadComma

    NumPadComma = 97
    

    Numeric keypad , (thousands separator). For locales where the thousands separator is a "." (e.g., Brazil), this key may generate a ..

    Source

    NumPadDecimal

    NumPadDecimal = 98
    

    Numeric keypad . Del. For locales where the decimal separator is "," (e.g., Brazil), this key may generate a ,.

    Source

    NumPadDivide

    NumPadDivide = 99
    

    Numeric keypad /.

    Source

    NumPadEnter

    NumPadEnter = 100
    

    Numeric keypad Enter.

    Source

    NumPadEqual

    NumPadEqual = 101
    

    Numeric keypad =.

    Source

    NumPadMultiply

    NumPadMultiply = 102
    

    Numeric keypad * on a keyboard. For use with numpads that provide mathematical operations (+, -, * and /).

    Source

    NumPadParenLeft

    NumPadParenLeft = 103
    

    Numeric keypad (. Found on the Microsoft Natural Keyboard.

    Source

    NumPadParenRight

    NumPadParenRight = 104
    

    Numeric keypad ). Found on the Microsoft Natural Keyboard.

    Source

    NumPadSubtract

    NumPadSubtract = 105
    

    Numeric keypad -.

    Source

    Escape

    Escape = 106
    

    Esc or ⎋.

    Source

    F1

    F1 = 107
    

    F1.

    Source

    F2

    F2 = 108
    

    F2.

    Source

    F3

    F3 = 109
    

    F3.

    Source

    F4

    F4 = 110
    

    F4.

    Source

    F5

    F5 = 111
    

    F5.

    Source

    F6

    F6 = 112
    

    F6.

    Source

    F7

    F7 = 113
    

    F7.

    Source

    F8

    F8 = 114
    

    F8.

    Source

    F9

    F9 = 115
    

    F9.

    Source

    F10

    F10 = 116
    

    F10.

    Source

    F11

    F11 = 117
    

    F11.

    Source

    F12

    F12 = 118
    

    F12.

    Source

    F13

    F13 = 119
    

    F13.

    Source

    F14

    F14 = 120
    

    F14.

    Source

    F15

    F15 = 121
    

    F15.

    Source

    F16

    F16 = 122
    

    F16.

    Source

    F17

    F17 = 123
    

    F17.

    Source

    F18

    F18 = 124
    

    F18.

    Source

    F19

    F19 = 125
    

    F19.

    Source

    F20

    F20 = 126
    

    F20.

    Source

    F21

    F21 = 127
    

    F21.

    Source

    F22

    F22 = 128
    

    F22.

    Source

    F23

    F23 = 129
    

    F23.

    Source

    F24

    F24 = 130
    

    F24.

    Source

    PrintScreen

    PrintScreen = 131
    

    PrtScr SysRq or Print Screen.

    Source

    ScrollLock

    ScrollLock = 132
    

    Scroll Lock.

    Source

    Pause

    Pause = 133
    

    Pause Break.

    Source

    BrowserBack

    BrowserBack = 134
    

    Browser Back. Some laptops place this key to the left of the ↑ key.

    Source

    BrowserFavorites

    BrowserFavorites = 135
    

    Browser Favorites.

    Source

    BrowserForward

    BrowserForward = 136
    

    Browser Forward. Some laptops place this key to the right of the ↑ key.

    Source

    BrowserHome

    BrowserHome = 137
    

    Browser Home.

    Source

    BrowserRefresh

    BrowserRefresh = 138
    

    Browser Refresh.

    Source

    BrowserSearch

    BrowserSearch = 139
    

    Browser Search.

    Source

    BrowserStop

    BrowserStop = 140
    

    Browser Stop.

    Source

    Eject

    Eject = 141
    

    Eject or ⏏. This key is placed in the function section on some Apple keyboards.

    Source

    LaunchApp1

    LaunchApp1 = 142
    

    App 1. Sometimes labelled My Computer on the keyboard.

    Source

    LaunchApp2

    LaunchApp2 = 143
    

    App 2. Sometimes labelled Calculator on the keyboard.

    Source

    LaunchMail

    LaunchMail = 144
    

    Mail.

    Source

    MediaPlayPause

    MediaPlayPause = 145
    

    Media Play/Pause or ⏵⏸.

    Source

    MediaSelect

    MediaSelect = 146
    

    Media Select.

    Source

    MediaStop

    MediaStop = 147
    

    Media Stop or ⏹.

    Source

    MediaTrackNext

    MediaTrackNext = 148
    

    Media Next or ⏭.

    Source

    MediaTrackPrevious

    MediaTrackPrevious = 149
    

    Media Previous or ⏮.

    Source

    Power

    Power = 150
    

    Power.

    Source

    Sleep

    Sleep = 151
    

    Sleep.

    Source

    AudioVolumeDown

    AudioVolumeDown = 152
    

    Volume Down.

    Source

    AudioVolumeMute

    AudioVolumeMute = 153
    

    Mute.

    Source

    AudioVolumeUp

    AudioVolumeUp = 154
    

    Volume Up.

    Source

    WakeUp

    WakeUp = 155
    

    Wake Up.

    Source

    Again

    Again = 156
    

    Again. Legacy. Found on Sun’s USB keyboard.

    Source

    Copy

    Copy = 157
    

    Copy. Legacy. Found on Sun’s USB keyboard.

    Source

    Cut

    Cut = 158
    

    Cut. Legacy. Found on Sun’s USB keyboard.

    Source

    Find

    Find = 159
    

    Find. Legacy. Found on Sun’s USB keyboard.

    Source

    Open

    Open = 160
    

    Open. Legacy. Found on Sun’s USB keyboard.

    Source

    Paste

    Paste = 161
    

    Paste. Legacy. Found on Sun’s USB keyboard.

    Source

    Props

    Props = 162
    

    Props. Legacy. Found on Sun’s USB keyboard.

    Source

    Select

    Select = 163
    

    Select. Legacy. Found on Sun’s USB keyboard.

    Source

    Undo

    Undo = 164
    

    Undo. Legacy. Found on Sun’s USB keyboard.

    Source

    value

    const fn value(self: Self) -> i32
    

    The numeric value of the member.

    Source

    from_value

    fn from_value(value: i32) -> Option<PhysicalKey>
    

    The member with the given numeric value, if one is defined.

    Source

    name

    fn name(self: Self) -> &'static str
    

    The name of the member. For values with several names this is the first one declared.

    Source

    parse

    fn parse(s: &str) -> Result<PhysicalKey, ParsePhysicalKeyError>
    

    Parses a member name (ignoring case, aliases included) or the numeric value of a defined member.

    Source

    to_qwerty_key

    fn to_qwerty_key(self: Self) -> Key
    

    Maps a physical key to a corresponding key, if possible, on a QWERTY keyboard. Returns Key::None when there is none.

    Source

    to_qwerty_key_symbol

    fn to_qwerty_key_symbol(self: Self, use_shift_modifier: bool) -> Option<&'static str>
    

    Maps a physical key to a corresponding key symbol, if possible, on a QWERTY keyboard. use_shift_modifier indicates whether the Shift key is considered pressed.

    Source

    Trait implementations

    Availability

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