Enum keyboard_types::Code
[−]
[src]
pub enum Code {
Backquote,
Backslash,
Backspace,
BracketLeft,
BracketRight,
Comma,
Digit0,
Digit1,
Digit2,
Digit3,
Digit4,
Digit5,
Digit6,
Digit7,
Digit8,
Digit9,
Equal,
IntlBackslash,
IntlRo,
IntlYen,
KeyA,
KeyB,
KeyC,
KeyD,
KeyE,
KeyF,
KeyG,
KeyH,
KeyI,
KeyJ,
KeyK,
KeyL,
KeyM,
KeyN,
KeyO,
KeyP,
KeyQ,
KeyR,
KeyS,
KeyT,
KeyU,
KeyV,
KeyW,
KeyX,
KeyY,
KeyZ,
Minus,
Period,
Quote,
Semicolon,
Slash,
AltLeft,
AltRight,
CapsLock,
ContextMenu,
ControlLeft,
ControlRight,
Enter,
MetaLeft,
MetaRight,
ShiftLeft,
ShiftRight,
Space,
Tab,
Convert,
KanaMode,
Lang1,
Lang2,
Lang3,
Lang4,
Lang5,
NonConvert,
Delete,
End,
Help,
Home,
Insert,
PageDown,
PageUp,
ArrowDown,
ArrowLeft,
ArrowRight,
ArrowUp,
NumLock,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
NumpadAdd,
NumpadBackspace,
NumpadClear,
NumpadClearEntry,
NumpadComma,
NumpadDecimal,
NumpadDivide,
NumpadEnter,
NumpadEqual,
NumpadHash,
NumpadMemoryAdd,
NumpadMemoryClear,
NumpadMemoryRecall,
NumpadMemoryStore,
NumpadMemorySubtract,
NumpadMultiply,
NumpadParenLeft,
NumpadParenRight,
NumpadStar,
NumpadSubtract,
Escape,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
Fn,
FnLock,
PrintScreen,
ScrollLock,
Pause,
BrowserBack,
BrowserFavorites,
BrowserForward,
BrowserHome,
BrowserRefresh,
BrowserSearch,
BrowserStop,
Eject,
LaunchApp1,
LaunchApp2,
LaunchMail,
MediaPlayPause,
MediaSelect,
MediaStop,
MediaTrackNext,
MediaTrackPrevious,
Power,
Sleep,
AudioVolumeDown,
AudioVolumeMute,
AudioVolumeUp,
WakeUp,
Hyper,
Super,
Turbo,
Abort,
Resume,
Suspend,
Again,
Copy,
Cut,
Find,
Open,
Paste,
Props,
Select,
Undo,
Hiragana,
Katakana,
Unidentified,
// some variants omitted
}Code is the physical position of a key.
The names are based on the US keyboard. If the key is not present on US keyboards a name from another layout is used.
Specification: https://www.w3.org/TR/2017/CR-uievents-code-20170601/
Variants
Backquote`~ on a US keyboard. This is the 半角/全角/漢字 (hankaku/zenkaku/kanji) key on Japanese keyboards
BackslashUsed 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.
Labelled #~ on a UK (102) keyboard.
BackspaceBackspace or ⌫.
Labelled Delete on Apple keyboards.
BracketLeft[{ on a US keyboard.
BracketRight]} on a US keyboard.
Comma,< on a US keyboard.
Digit00) on a US keyboard.
Digit11! on a US keyboard.
Digit22@ on a US keyboard.
Digit33# on a US keyboard.
Digit44$ on a US keyboard.
Digit55% on a US keyboard.
Digit66 on a US keyboard.
Digit77& on a US keyboard.
Digit88* on a US keyboard.
Digit99( on a US keyboard.
Equal=+ on a US keyboard.
IntlBackslashLocated between the left Shift and Z keys.
Labelled | on a UK keyboard.
IntlRoLocated between the / and right Shift keys.
Labelled \ろ (ro) on a Japanese keyboard.
IntlYenLocated between the = and Backspace keys.
Labelled ¥ (yen) on a Japanese keyboard. \/ on a
Russian keyboard.
KeyAa on a US keyboard.
Labelled q on an AZERTY (e.g., French) keyboard.
KeyBb on a US keyboard.
KeyCc on a US keyboard.
KeyDd on a US keyboard.
KeyEe on a US keyboard.
KeyFf on a US keyboard.
KeyGg on a US keyboard.
KeyHh on a US keyboard.
KeyIi on a US keyboard.
KeyJj on a US keyboard.
KeyKk on a US keyboard.
KeyLl on a US keyboard.
KeyMm on a US keyboard.
KeyNn on a US keyboard.
KeyOo on a US keyboard.
KeyPp on a US keyboard.
KeyQq on a US keyboard.
Labelled a on an AZERTY (e.g., French) keyboard.
KeyRr on a US keyboard.
KeySs on a US keyboard.
KeyTt on a US keyboard.
KeyUu on a US keyboard.
KeyVv on a US keyboard.
KeyWw on a US keyboard.
Labelled z on an AZERTY (e.g., French) keyboard.
KeyXx on a US keyboard.
KeyYy on a US keyboard.
Labelled z on a QWERTZ (e.g., German) keyboard.
KeyZz on a US keyboard.
Labelled w on an AZERTY (e.g., French) keyboard, and y on a
QWERTZ (e.g., German) keyboard.
Minus-_ on a US keyboard.
Period.> on a US keyboard.
Quote'" on a US keyboard.
Semicolon;: on a US keyboard.
Slash/? on a US keyboard.
AltLeftAlt, Option or ⌥.
AltRightAlt, Option or ⌥.
This is labelled AltGr key on many keyboard layouts.
CapsLockCapsLock or ⇪
ContextMenuThe application context menu key, which is typically found between the right Meta key and the right Control key.
ControlLeftControl or ⌃
ControlRightControl or ⌃
EnterEnter or ↵. Labelled Return on Apple keyboards.
MetaLeftThe Windows, ⌘, Command or other OS symbol key.
MetaRightThe Windows, ⌘, Command or other OS symbol key.
ShiftLeftShift or ⇧
ShiftRightShift or ⇧
Space (space)
TabTab or ⇥
ConvertJapanese: 変換 (henkan)
KanaModeJapanese: カタカナ/ひらがな/ローマ字 (katakana/hiragana/romaji)
Lang1Korean: HangulMode 한/영 (han/yeong)
Japanese (Mac keyboard): かな (kana)
Lang2Korean: Hanja 한자 (hanja)
Japanese (Mac keyboard): 英数 (eisu)
Lang3Japanese (word-processing keyboard): Katakana
Lang4Japanese (word-processing keyboard): Hiragana
Lang5Japanese (word-processing keyboard): Zenkaku/Hankaku
NonConvertJapanese: 無変換 (muhenkan)
Delete⌦. The forward delete key.
Note that on Apple keyboards, the key labelled Delete on the main part of
the keyboard should be encoded as "Backspace".
EndPage Down, End or ↘
HelpHelp. Not present on standard PC keyboards.
HomeHome or ↖
InsertInsert or Ins. Not present on Apple keyboards.
PageDownPage Down, PgDn or ⇟
PageUpPage Up, PgUp or ⇞
ArrowDown↓
ArrowLeft←
ArrowRight→
ArrowUp↑
NumLockOn the Mac, the "NumLock" code should be used for the numpad Clear key.
Numpad00 Ins on a keyboard0 on a phone or remote control
Numpad11 End on a keyboard1 or 1 QZ on a phone or
remote control
Numpad22 ↓ on a keyboard2 ABC on a phone or remote control
Numpad33 PgDn on a keyboard3 DEF on a phone or remote control
Numpad44 ← on a keyboard4 GHI on a phone or remote control
Numpad55 on a keyboard5 JKL on a phone or remote control
Numpad66 → on a keyboard6 MNO on a phone or remote control
Numpad77 Home on a keyboard7 PQRS or 7 PRS on a phone
or remote control
Numpad88 ↑ on a keyboard8 TUV on a phone or remote control
Numpad99 PgUp on a keyboard9 WXYZ or 9 WXY on a phone
or remote control
NumpadAdd+
NumpadBackspaceFound on the Microsoft Natural Keyboard.
NumpadClearC 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 should always
be encoded as "NumLock".
NumpadClearEntryCE (Clear Entry)
NumpadComma, (thousands separator). For locales where the thousands separator
is a "." (e.g., Brazil), this key may generate a ..
NumpadDecimal. Del. For locales where the decimal separator is "," (e.g.,
Brazil), this key may generate a ,.
NumpadDivide/
NumpadEnterNumpadEqual=
NumpadHash# on a phone or remote control device. This key is typically found
below the 9 key and to the right of the 0 key.
NumpadMemoryAddM+ Add current entry to the value stored in memory.
NumpadMemoryClearMC Clear the value stored in memory.
NumpadMemoryRecallMR Replace the current entry with the value stored in memory.
NumpadMemoryStoreMS Replace the value stored in memory with the current entry.
NumpadMemorySubtractM- Subtract current entry from the value stored in memory.
NumpadMultiply on a keyboard. For use with numpads that provide mathematical
operations (+, -, and /).
Use "NumpadStar" for the * key on phones and remote controls.
NumpadParenLeft( Found on the Microsoft Natural Keyboard.
NumpadParenRight) Found on the Microsoft Natural Keyboard.
NumpadStar on a phone or remote control device.
This key is typically found below the 7 key and to the left of
the 0 key.
Use "NumpadMultiply" for the key on
numeric keypads.
NumpadSubtract-
EscapeEsc or ⎋
F1F1
F2F2
F3F3
F4F4
F5F5
F6F6
F7F7
F8F8
F9F9
F10F10
F11F11
F12F12
FnFn This is typically a hardware key that does not generate a separate
code. Most keyboards do not place this key in the function section, but it is
included here to keep it with related keys.
FnLockFLock or FnLock. Function Lock key. Found on the Microsoft
Natural Keyboard.
PrintScreenPrtScr SysRq or Print Screen
ScrollLockScroll Lock
PausePause Break
BrowserBackSome laptops place this key to the left of the ↑ key.
BrowserFavoritesBrowserForwardSome laptops place this key to the right of the ↑ key.
BrowserHomeBrowserRefreshBrowserSearchBrowserStopEjectEject or ⏏. This key is placed in the function
section on some Apple keyboards.
LaunchApp1Sometimes labelled My Computer on the keyboard
LaunchApp2Sometimes labelled Calculator on the keyboard
LaunchMailMediaPlayPauseMediaSelectMediaStopMediaTrackNextMediaTrackPreviousPowerThis key is placed in the function section on some Apple keyboards,
replacing the Eject key.
SleepAudioVolumeDownAudioVolumeMuteAudioVolumeUpWakeUpHyperSuperTurboAbortResumeSuspendAgainFound on Sun’s USB keyboard.
CopyFound on Sun’s USB keyboard.
CutFound on Sun’s USB keyboard.
FindFound on Sun’s USB keyboard.
OpenFound on Sun’s USB keyboard.
PasteFound on Sun’s USB keyboard.
PropsFound on Sun’s USB keyboard.
SelectFound on Sun’s USB keyboard.
UndoFound on Sun’s USB keyboard.
HiraganaUse for dedicated ひらがな key found on some Japanese word processing keyboards.
KatakanaUse for dedicated カタカナ key found on some Japanese word processing keyboards.
UnidentifiedThis value code should be used when no other value given in this specification is appropriate.
Trait Implementations
impl Copy for Code[src]
impl Clone for Code[src]
fn clone(&self) -> Code
Returns a copy of the value. Read more
fn clone_from(&mut self, source: &Self)1.0.0
Performs copy-assignment from source. Read more
impl Debug for Code[src]
impl Eq for Code[src]
impl PartialEq for Code[src]
fn eq(&self, __arg_0: &Code) -> bool
This method tests for self and other values to be equal, and is used by ==. Read more
fn ne(&self, other: &Rhs) -> bool1.0.0
This method tests for !=.