#[repr(u8)]
pub enum Key {
Show 156 variants None, Overflow, PostFail, Undefined, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, Num1, Num2, Num3, Num4, Num5, Num6, Num7, Num8, Num9, Num0, Enter, Esc, BackSpace, Tab, Space, Minus, Equal, LeftBrace, RightBrace, BackSlash, HashTilde, Semicolon, Apostrophe, Grave, Comma, Dot, Slash, CapsLock, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, SysRq, ScrollLock, Pause, Insert, Home, PageUp, Delete, End, PageDown, Right, Left, Down, Up, NumLock, KeyPadSlash, KeyPadAsterisk, KeyPadMinus, KeyPadPlus, KyePadEnter, KeyPad1, KeyPad2, KeyPad3, KeyPad4, KeyPad5, KeyPad6, KeyPad7, KeyPad8, KeyPad9, KeyPad0, KeyPadDot, NonUsBackSlash, Compose, Power, KeyPadEqual, F13, F14, F15, F16, F17, F18, F19, F20, F21, F22, F23, F24, Open, Help, Props, Front, Stop, Again, Undo, Cut, Copy, Paste, Find, Mute, VolumeUp, VolumeDown, LockingCapsLock, LockingNumLock, LockingScrollLock, KeyPadComma, KeyPadEqualSign, Ro, KatakanaHiragana, Yen, Henkan, Munenkan, KeyPadJpComma, Hangeul, Hanja, Katakana, Hiragana, ZankakuHankaku, KeyPadLeftParen, KeyPadRightParen, LeftCtrl, LeftShift, LeftAlt, LeftMeta, RightCtrl, RightShift, RightAlt, RightMeta,
}
Expand description

Key code

Variants

None

No key

Overflow

Keyboard Error Roll Over - used for all slots if too many keys are pressed (“Phantom key”)

PostFail

Keyboard POST Fail

Undefined

Keyboard Error Undefined

A

Keyboard a and A

B

Keyboard b and B

C

Keyboard c and C

D

Keyboard d and D

E

Keyboard e and E

F

Keyboard f and F

G

Keyboard g and G

H

Keyboard h and H

I

Keyboard i and I

J

Keyboard j and J

K

Keyboard k and K

L

Keyboard l and L

M

Keyboard m and M

N

Keyboard n and N

O

Keyboard o and O

P

Keyboard p and P

Q

Keyboard q and Q

R

Keyboard r and R

S

Keyboard s and S

T

Keyboard t and T

U

Keyboard u and U

V

Keyboard v and V

W

Keyboard w and W

X

Keyboard x and X

Y

Keyboard y and Y

Z

Keyboard z and Z

Num1

Keyboard 1 and !

Num2

Keyboard 2 and @

Num3

Keyboard 3 and #

Num4

Keyboard 4 and $

Num5

Keyboard 5 and %

Num6

Keyboard 6 and ^

Num7

Keyboard 7 and &

Num8

Keyboard 8 and *

Num9

Keyboard 9 and (

Num0

Keyboard 0 and )

Enter

Keyboard Return (ENTER)

Esc

Keyboard ESCAPE

BackSpace

Keyboard DELETE (Backspace)

Tab

Keyboard Tab

Space

Keyboard Spacebar

Minus

Keyboard - and _

Equal

Keyboard = and +

LeftBrace

Keyboard [ and {

RightBrace

Keyboard ] and }

BackSlash

Keyboard \ and |

HashTilde

Keyboard Non-US # and ~

Semicolon

Keyboard ; and :

Apostrophe

Keyboard ’ and “

Grave

Keyboard ` and ~

Comma

Keyboard , and <

Dot

Keyboard . and >

Slash

Keyboard / and ?

CapsLock

Keyboard Caps Lock

F1

Keyboard F1

F2

Keyboard F2

F3

Keyboard F3

F4

Keyboard F4

F5

Keyboard F5

F6

Keyboard F6

F7

Keyboard F7

F8

Keyboard F8

F9

Keyboard F9

F10

Keyboard F10

F11

Keyboard F11

F12

Keyboard F12

SysRq

Keyboard Print Screen

ScrollLock

Keyboard Scroll Lock

Pause

Keyboard Pause

Insert

Keyboard Insert

Home

Keyboard Home

PageUp

Keyboard Page Up

Delete

Keyboard Delete Forward

End

Keyboard End

PageDown

Keyboard Page Down

Right

Keyboard Right Arrow

Left

Keyboard Left Arrow

Down

Keyboard Down Arrow

Up

Keyboard Up Arrow

NumLock

Keyboard Num Lock and Clear

KeyPadSlash

Keypad /

KeyPadAsterisk

Keypad *

KeyPadMinus

Keypad -

KeyPadPlus

Keypad +

KyePadEnter

Keypad ENTER

KeyPad1

Keypad 1 and End

KeyPad2

Keypad 2 and Down Arrow

KeyPad3

Keypad 3 and PageDn

KeyPad4

Keypad 4 and Left Arrow

KeyPad5

Keypad 5

KeyPad6

Keypad 6 and Right Arrow

KeyPad7

Keypad 7 and Home

KeyPad8

Keypad 8 and Up Arrow

KeyPad9

Keypad 9 and Page Up

KeyPad0

Keypad 0 and Insert

KeyPadDot

Keypad . and Delete

NonUsBackSlash

Keyboard Non-US \ and |

Compose

Keyboard Application

Power

Keyboard Power

KeyPadEqual

Keypad =

F13

Keyboard F13

F14

Keyboard F14

F15

Keyboard F15

F16

Keyboard F16

F17

Keyboard F17

F18

Keyboard F18

F19

Keyboard F19

F20

Keyboard F20

F21

Keyboard F21

F22

Keyboard F22

F23

Keyboard F23

F24

Keyboard F24

Open

Keyboard Execute

Help

Keyboard Help

Props

Keyboard Menu

Front

Keyboard Select

Stop

Keyboard Stop

Again

Keyboard Again

Undo

Keyboard Undo

Cut

Keyboard Cut

Copy

Keyboard Copy

Paste

Keyboard Paste

Find

Keyboard Find

Mute

Keyboard Mute

VolumeUp

Keyboard Volume Up

VolumeDown

Keyboard Volume Down

LockingCapsLock

Keyboard Locking Caps Lock

LockingNumLock

Keyboard Locking Num Lock

LockingScrollLock

Keyboard Locking Scroll Lock

KeyPadComma

Keypad Comma

KeyPadEqualSign

Keypad Equal Sign

Ro

Keyboard International1

KatakanaHiragana

Keyboard International2

Yen

Keyboard International3

Henkan

Keyboard International4

Munenkan

Keyboard International5

KeyPadJpComma

Keyboard International6

Hangeul

Keyboard LANG1

Hanja

Keyboard LANG2

Katakana

Keyboard LANG3

Hiragana

Keyboard LANG4

ZankakuHankaku

Keyboard LANG5

KeyPadLeftParen

Keypad (

KeyPadRightParen

Keypad )

LeftCtrl

Keyboard Left Control

LeftShift

Keyboard Left Shift

LeftAlt

Keyboard Left Alt

LeftMeta

Keyboard Left GUI

RightCtrl

Keyboard Right Control

RightShift

Keyboard Right Shift

RightAlt

Keyboard Right Alt

RightMeta

Keyboard Right GUI

Implementations

List of all enum variants

Converts from raw value safely

Trait Implementations

Converts this type into a mutable reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Converts this type into a shared reference of the (usually inferred) input type.
Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Returns the “default value” for a type. Read more
Formats the value using the given formatter. Read more
Converts to this type from the input type.
Converts to this type from the input type.
Converts to this type from the input type.
The associated error which can be returned from parsing.
Parses a string s to return a value of this type. Read more
This method tests for self and other values to be equal, and is used by ==. Read more
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason. Read more

Auto Trait Implementations

Blanket Implementations

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Converts the given value to a String. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.