pub enum Key {
Show 103 variants Escape, Main1, Main2, Main3, Main4, Main5, Main6, Main7, Main8, Main9, Main0, Minus, Equals, Backspace, Tabulation, Q, W, E, R, T, Y, U, I, O, P, LeftBracket, RightBracket, Enter, LeftControl, A, S, D, F, G, H, J, K, L, Semicolon, Apostrophe, Grave, LeftShift, Backslash, Z, X, C, V, B, N, M, Comma, Period, Slash, RightShift, Multiply, LeftAlt, Space, CapsLock, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, NumLock, ScrollLock, NumPad7, NumPad8, NumPad9, Subtract, NumPad4, NumPad5, NumPad6, Add, NumPad1, NumPad2, NumPad3, NumPad0, Decimal, OEM102, F11, F12, NumPadEnter, RightControl, Divide, PrintScreen, RightAlt, Pause, Home, Up, PageUp, Left, Right, End, Down, PageDown, Insert, Delete, Unknown(u8),
}
Expand description

Keyboard keys

Variants

Escape

Escape key

Main1

‘1’ key on main keyboard

Main2

‘2’ key on main keyboard

Main3

‘3’ key on main keyboard

Main4

‘4’ key on main keyboard

Main5

‘5’ key on main keyboard

Main6

‘6’ key on main keyboard

Main7

‘7’ key on main keyboard

Main8

‘8’ key on main keyboard

Main9

‘9’ key on main keyboard

Main0

‘0’ key on main keyboard

Minus

‘-’ key on main keyboard

Equals

‘=’ key on main keyboard

Backspace

backspace key

Tabulation

tab key

Q

‘Q’ key

W

‘W’ key

E

‘E’ key

R

‘R’ key

T

‘T’ key

Y

‘Y’ key

U

‘U’ key

I

‘I’ key

O

‘O’ key

P

‘P’ key

LeftBracket

‘[’ (left bracket) key

RightBracket

‘]’ (right bracket) key

Enter

‘Enter’ key on main keyboard

LeftControl

Left ‘Ctrl’ key

A

‘A’ key

S

‘S’ key

D

‘D’ key

F

‘F’ key

G

‘G’ key

H

‘H’ key

J

‘J’ key

K

‘K’ key

L

‘L’ key

Semicolon

‘;’ (semicolon) key

Apostrophe

’ (apostrophe) key

Grave

accent grave

LeftShift

Left ‘Shift’ key

Backslash

’' (Backslash) key

Z

‘Z’ key

X

‘X’ key

C

‘C’ key

V

‘V’ key

B

‘B’ key

N

‘N’ key

M

‘M’ key

Comma

‘,’ (comma) key

Period

‘.’ key on main keyboard

Slash

‘/’ key on main keyboard

RightShift

Right ‘Shift’ key

Multiply

  • on numeric keypad

LeftAlt

left Alt

Space

‘Space’ key

CapsLock

caps lock key

F1

F1 function key

F2

F2 function key

F3

F3 function key

F4

F4 function key

F5

F5 function key

F6

F6 function key

F7

F7 function key

F8

F8 function key

F9

F9 function key

F10

F10 function key

NumLock

‘Num Lock’ key

ScrollLock

Scroll lock

NumPad7

‘7’ key on numeric keypad

NumPad8

‘8’ key on numeric keypad

NumPad9

‘9’ key on numeric keypad

Subtract

‘-’ key on numeric keypad

NumPad4

‘4’ key on numeric keypad

NumPad5

‘5’ key on numeric keypad

NumPad6

‘6’ key on numeric keypad

Add

‘+’ key on numeric keypad

NumPad1

‘1’ key on numeric keypad

NumPad2

‘2’ key on numeric keypad

NumPad3

‘3’ key on numeric keypad

NumPad0

‘0’ key on numeric keypad

Decimal

‘.’ key on numeric keypad

OEM102

| < > on UK/German keyboards

F11

F11 function key

F12

F12 function key

NumPadEnter

Enter on numeric keypad

RightControl

right Control key

Divide

‘/’ key on numeric keypad

PrintScreen

SysRq/PrtScn key

RightAlt

right Alt

Pause

Break/Pause key

Home

Home on cursor keypad

Up

up-arrow on cursor keypad

PageUp

PgUp on cursor keypad

Left

left-arrow on cursor keypad

Right

right-arrow on cursor keypad

End

End on cursor keypad

Down

down-arrow on cursor keypad

PageDown

PgDn on cursor keypad

Insert

Insert on cursor keypad

Delete

Delete on cursor keypad

Unknown(u8)

Unknown key

Trait Implementations

Returns a copy of the value. Read more

Performs copy-assignment from source. Read more

Formats the value using the given formatter. Read more

This method tests for self and other values to be equal, and is used by ==. Read more

This method tests for !=.

This method returns an ordering between self and other values if one exists. Read more

This method tests less than (for self and other) and is used by the < operator. Read more

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

This method tests greater than (for self and other) and is used by the > operator. Read more

This method tests greater than or equal to (for self and other) and is used by the >= operator. 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

Performs the conversion.

Performs the conversion.

The resulting type after obtaining ownership.

Creates owned data from borrowed data, usually by cloning. Read more

🔬 This is a nightly-only experimental API. (toowned_clone_into)

Uses borrowed data to replace owned data, usually by cloning. 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.