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/.
Members
NoneBackquoteBackslashBracketLeftBracketRightCommaDigit0Digit1Digit2Digit3Digit4Digit5Digit6Digit7Digit8Digit9EqualIntlBackslashIntlRoIntlYenABCDEFGHIJKLMNOPQRSTUVWXYZMinusPeriodQuoteSemicolonSlashAltLeftAltRightBackspaceCapsLockContextMenuControlLeftControlRightEnterMetaLeftMetaRightShiftLeftShiftRightSpaceTabConvertKanaModeLang1Lang2Lang3Lang4Lang5NonConvertDeleteEndHelpHomeInsertPageDownPageUpArrowDownArrowLeftArrowRightArrowUpNumLockNumPad0NumPad1NumPad2NumPad3NumPad4NumPad5NumPad6NumPad7NumPad8NumPad9NumPadAddNumPadClearNumPadCommaNumPadDecimalNumPadDivideNumPadEnterNumPadEqualNumPadMultiplyNumPadParenLeftNumPadParenRightNumPadSubtractEscapeF1F2F3F4F5F6F7F8F9F10F11F12F13F14F15F16F17F18F19F20F21F22F23F24PrintScreenScrollLockPauseBrowserBackBrowserFavoritesBrowserForwardBrowserHomeBrowserRefreshBrowserSearchBrowserStopEjectLaunchApp1LaunchApp2LaunchMailMediaPlayPauseMediaSelectMediaStopMediaTrackNextMediaTrackPreviousPowerSleepAudioVolumeDownAudioVolumeMuteAudioVolumeUpWakeUpAgainCopyCutFindOpenPastePropsSelectUndovaluefrom_valuenameparseto_qwerty_keyto_qwerty_key_symbol
None
None = 0
Represents no key.
Backquote
Backquote = 1
``~on a US keyboard. This is the半角/全角/漢字` (hankaku/zenkaku/kanji) key on Japanese keyboards.
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.
BracketLeft
BracketLeft = 3
[{ on a US keyboard.
BracketRight
BracketRight = 4
]} on a US keyboard.
Comma
Comma = 5
,< on a US keyboard.
Digit0
Digit0 = 6
0) on a US keyboard.
Digit1
Digit1 = 7
1! on a US keyboard.
Digit2
Digit2 = 8
2@ on a US keyboard.
Digit3
Digit3 = 9
3# on a US keyboard.
Digit4
Digit4 = 10
4$ on a US keyboard.
Digit5
Digit5 = 11
5% on a US keyboard.
Digit6
Digit6 = 12
6^ on a US keyboard.
Digit7
Digit7 = 13
7& on a US keyboard.
Digit8
Digit8 = 14
8* on a US keyboard.
Digit9
Digit9 = 15
9( on a US keyboard.
Equal
Equal = 16
=+ on a US keyboard.
IntlBackslash
IntlBackslash = 17
Located between the left Shift and Z keys.
\| on a UK keyboard.
IntlRo
IntlRo = 18
Located between the / and right Shift keys.
\ろ (ro) on a Japanese keyboard.
IntlYen
IntlYen = 19
Located between the = and Backspace keys.
¥ (yen) on a Japanese keyboard.
\/ on a Russian keyboard.
A
A = 20
a on a US keyboard.
q on an AZERTY (e.g., French) keyboard.
B
B = 21
b on a US keyboard.
C
C = 22
c on a US keyboard.
D
D = 23
d on a US keyboard.
E
E = 24
e on a US keyboard.
F
F = 25
f on a US keyboard.
G
G = 26
g on a US keyboard.
H
H = 27
h on a US keyboard.
I
I = 28
i on a US keyboard.
J
J = 29
j on a US keyboard.
K
K = 30
k on a US keyboard.
L
L = 31
l on a US keyboard.
M
M = 32
m on a US keyboard.
N
N = 33
n on a US keyboard.
O
O = 34
o on a US keyboard.
P
P = 35
p on a US keyboard.
Q
Q = 36
q on a US keyboard.
a on an AZERTY (e.g., French) keyboard.
R
R = 37
r on a US keyboard.
S
S = 38
s on a US keyboard.
T
T = 39
t on a US keyboard.
U
U = 40
u on a US keyboard.
V
V = 41
v on a US keyboard.
W
W = 42
w on a US keyboard.
z on an AZERTY (e.g., French) keyboard.
X
X = 43
x on a US keyboard.
Y
Y = 44
y on a US keyboard.
z on a QWERTZ (e.g., German) keyboard.
Z
Z = 45
z on a US keyboard.
w on an AZERTY (e.g., French) keyboard.
y on a QWERTZ (e.g., German) keyboard.
Minus
Minus = 46
-_ on a US keyboard.
Period
Period = 47
.> on a US keyboard.
Quote
Quote = 48
'" on a US keyboard.
Semicolon
Semicolon = 49
;: on a US keyboard.
Slash
Slash = 50
/? on a US keyboard.
AltLeft
AltLeft = 51
Alt, Option or ⌥.
AltRight
AltRight = 52
Alt, Option or ⌥.
This is labelled AltGr key on many keyboard layouts.
Backspace
Backspace = 53
Backspace or ⌫.
Labelled Delete on Apple keyboards.
CapsLock
CapsLock = 54
CapsLock or ⇪.
ContextMenu
ContextMenu = 55
The application context menu key, which is typically found between the right Meta key
and the right Control key.
ControlLeft
ControlLeft = 56
Control or ⌃.
ControlRight
ControlRight = 57
Control or ⌃.
Enter
Enter = 58
Enter or ↵.
Labelled Return on Apple keyboards.
MetaLeft
MetaLeft = 59
The ⊞ (Windows), ⌘, Command or other OS symbol key.
MetaRight
MetaRight = 60
The ⊞ (Windows), ⌘, Command or other OS symbol key.
ShiftLeft
ShiftLeft = 61
Shift or ⇧.
ShiftRight
ShiftRight = 62
Shift or ⇧.
Space
Space = 63
(space).
Tab
Tab = 64
Tab or ⇥.
Convert
Convert = 65
Japanese: 変換 (henkan).
KanaMode
KanaMode = 66
Japanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji).
Lang1
Lang1 = 67
Korean: HangulMode 한/영 (han/yeong).
Japanese (Mac keyboard): かな (kana).
Lang2
Lang2 = 68
Korean: Hanja 한자 (hanja).
Japanese (Mac keyboard): 英数 (eisu).
Lang3
Lang3 = 69
Japanese (word-processing keyboard): Katakana.
Lang4
Lang4 = 70
Japanese (word-processing keyboard): Hiragana.
Lang5
Lang5 = 71
Japanese (word-processing keyboard): Zenkaku/Hankaku.
NonConvert
NonConvert = 72
Japanese: 無変換 (muhenkan).
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.
End
End = 74
End or ↘.
Help
Help = 75
Help.
Not present on standard PC keyboards.
Home
Home = 76
Home or ↖.
Insert
Insert = 77
Insert or Ins.
Not present on Apple keyboards.
PageDown
PageDown = 78
Page Down, PgDn or ⇟.
PageUp
PageUp = 79
Page Up, PgUp or ⇞.
ArrowDown
ArrowDown = 80
↓.
ArrowLeft
ArrowLeft = 81
←.
ArrowRight
ArrowRight = 82
→.
ArrowUp
ArrowUp = 83
↑.
NumLock
NumLock = 84
Numeric keypad Num Lock.
On the Mac, this is used for the numpad Clear key.
NumPad0
NumPad0 = 85
Numeric keypad 0 Ins on a keyboard.
0 on a phone or remote control.
NumPad1
NumPad1 = 86
Numeric keypad 1 End on a keyboard.
1 or 1 QZ on a phone or remote control.
NumPad2
NumPad2 = 87
Numeric keypad 2 ↓ on a keyboard.
2 ABC on a phone or remote control.
NumPad3
NumPad3 = 88
Numeric keypad 3 PgDn on a keyboard.
3 DEF on a phone or remote control.
NumPad4
NumPad4 = 89
Numeric keypad 4 ← on a keyboard.
4 GHI on a phone or remote control.
NumPad5
NumPad5 = 90
Numeric keypad 5 on a keyboard.
5 JKL on a phone or remote control.
NumPad6
NumPad6 = 91
Numeric keypad 6 → on a keyboard.
6 MNO on a phone or remote control.
NumPad7
NumPad7 = 92
Numeric keypad 7 Home on a keyboard.
7 PQRS or 7 PRS on a phone or remote control.
NumPad8
NumPad8 = 93
Numeric keypad 8 ↑ on a keyboard.
8 TUV on a phone or remote control.
NumPad9
NumPad9 = 94
Numeric keypad 9 PgUp on a keyboard.
9 WXYZ or 9 WXY on a phone or remote control.
NumPadAdd
NumPadAdd = 95
Numeric keypad +.
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.
NumPadComma
NumPadComma = 97
Numeric keypad , (thousands separator).
For locales where the thousands separator is a "." (e.g., Brazil), this key may generate a ..
NumPadDecimal
NumPadDecimal = 98
Numeric keypad . Del.
For locales where the decimal separator is "," (e.g., Brazil), this key may generate a ,.
NumPadDivide
NumPadDivide = 99
Numeric keypad /.
NumPadEnter
NumPadEnter = 100
Numeric keypad Enter.
NumPadEqual
NumPadEqual = 101
Numeric keypad =.
NumPadMultiply
NumPadMultiply = 102
Numeric keypad * on a keyboard.
For use with numpads that provide mathematical operations (+, -, * and /).
NumPadParenLeft
NumPadParenLeft = 103
Numeric keypad (.
Found on the Microsoft Natural Keyboard.
NumPadParenRight
NumPadParenRight = 104
Numeric keypad ).
Found on the Microsoft Natural Keyboard.
NumPadSubtract
NumPadSubtract = 105
Numeric keypad -.
Escape
Escape = 106
Esc or ⎋.
F1
F1 = 107
F1.
F2
F2 = 108
F2.
F3
F3 = 109
F3.
F4
F4 = 110
F4.
F5
F5 = 111
F5.
F6
F6 = 112
F6.
F7
F7 = 113
F7.
F8
F8 = 114
F8.
F9
F9 = 115
F9.
F10
F10 = 116
F10.
F11
F11 = 117
F11.
F12
F12 = 118
F12.
F13
F13 = 119
F13.
F14
F14 = 120
F14.
F15
F15 = 121
F15.
F16
F16 = 122
F16.
F17
F17 = 123
F17.
F18
F18 = 124
F18.
F19
F19 = 125
F19.
F20
F20 = 126
F20.
F21
F21 = 127
F21.
F22
F22 = 128
F22.
F23
F23 = 129
F23.
F24
F24 = 130
F24.
PrintScreen
PrintScreen = 131
PrtScr SysRq or Print Screen.
ScrollLock
ScrollLock = 132
Scroll Lock.
Pause
Pause = 133
Pause Break.
BrowserBack
BrowserBack = 134
Browser Back.
Some laptops place this key to the left of the ↑ key.
BrowserFavorites
BrowserFavorites = 135
Browser Favorites.
BrowserForward
BrowserForward = 136
Browser Forward.
Some laptops place this key to the right of the ↑ key.
BrowserHome
BrowserHome = 137
Browser Home.
BrowserRefresh
BrowserRefresh = 138
Browser Refresh.
BrowserSearch
BrowserSearch = 139
Browser Search.
BrowserStop
BrowserStop = 140
Browser Stop.
Eject
Eject = 141
Eject or ⏏.
This key is placed in the function section on some Apple keyboards.
LaunchApp1
LaunchApp1 = 142
App 1.
Sometimes labelled My Computer on the keyboard.
LaunchApp2
LaunchApp2 = 143
App 2.
Sometimes labelled Calculator on the keyboard.
LaunchMail
LaunchMail = 144
Mail.
MediaPlayPause
MediaPlayPause = 145
Media Play/Pause or ⏵⏸.
MediaSelect
MediaSelect = 146
Media Select.
MediaStop
MediaStop = 147
Media Stop or ⏹.
MediaTrackNext
MediaTrackNext = 148
Media Next or ⏭.
MediaTrackPrevious
MediaTrackPrevious = 149
Media Previous or ⏮.
Power
Power = 150
Power.
Sleep
Sleep = 151
Sleep.
AudioVolumeDown
AudioVolumeDown = 152
Volume Down.
AudioVolumeMute
AudioVolumeMute = 153
Mute.
AudioVolumeUp
AudioVolumeUp = 154
Volume Up.
WakeUp
WakeUp = 155
Wake Up.
Again
Again = 156
Again.
Legacy.
Found on Sun’s USB keyboard.
Copy
Copy = 157
Copy.
Legacy.
Found on Sun’s USB keyboard.
Cut
Cut = 158
Cut.
Legacy.
Found on Sun’s USB keyboard.
Find
Find = 159
Find.
Legacy.
Found on Sun’s USB keyboard.
Open
Open = 160
Open.
Legacy.
Found on Sun’s USB keyboard.
Paste
Paste = 161
Paste.
Legacy.
Found on Sun’s USB keyboard.
Props
Props = 162
Props.
Legacy.
Found on Sun’s USB keyboard.
Select
Select = 163
Select.
Legacy.
Found on Sun’s USB keyboard.
Undo
Undo = 164
Undo.
Legacy.
Found on Sun’s USB keyboard.
value
const fn value(self: Self) -> i32
The numeric value of the member.
from_value
fn from_value(value: i32) -> Option<PhysicalKey>
The member with the given numeric value, if one is defined.
name
fn name(self: Self) -> &'static str
The name of the member. For values with several names this is the first one declared.
parse
fn parse(s: &str) -> Result<PhysicalKey, ParsePhysicalKeyError>
Parses a member name (ignoring case, aliases included) or the numeric value of a defined member.
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.
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.
Trait implementations
SendSyncFreezeUnsafeUnpinUnpinUnwindSafeRefUnwindSafeResourceKeyObjectPropertyValueAnyValueClassDefaultsBorrow<T>BorrowMut<T>CloneToUninitInto<U>From<T>TryInto<U>TryFrom<U>AnyToOwnedToStringErasedDestructorIntoEitherCloneCopyDebugDefaultStructuralPartialEqPartialEqEqHashPartialOrdOrdFromStrDisplayMarkupTypedValueTypeRegistration
Availability
Extracted for aarch64-apple-darwin. Cargo features are listed in the crate index.