Enum KeyCode

Source
#[repr(u32)]
pub enum KeyCode {
Show 154 variants Key1 = 0, Key2 = 1, Key3 = 2, Key4 = 3, Key5 = 4, Key6 = 5, Key7 = 6, Key8 = 7, Key9 = 8, Key0 = 9, A = 10, B = 11, C = 12, D = 13, E = 14, F = 15, G = 16, H = 17, I = 18, J = 19, K = 20, L = 21, M = 22, N = 23, O = 24, P = 25, Q = 26, R = 27, S = 28, T = 29, U = 30, V = 31, W = 32, X = 33, Y = 34, Z = 35, Escape = 36, F1 = 37, F2 = 38, F3 = 39, F4 = 40, F5 = 41, F6 = 42, F7 = 43, F8 = 44, F9 = 45, F10 = 46, F11 = 47, F12 = 48, F13 = 49, F14 = 50, F15 = 51, Snapshot = 52, Scroll = 53, Pause = 54, Insert = 55, Home = 56, Delete = 57, End = 58, PageDown = 59, PageUp = 60, Left = 61, Up = 62, Right = 63, Down = 64, Back = 65, Return = 66, Space = 67, Compose = 68, Caret = 69, Numlock = 70, Numpad0 = 71, Numpad1 = 72, Numpad2 = 73, Numpad3 = 74, Numpad4 = 75, Numpad5 = 76, Numpad6 = 77, Numpad7 = 78, Numpad8 = 79, Numpad9 = 80, AbntC1 = 81, AbntC2 = 82, Add = 83, Apostrophe = 84, Apps = 85, At = 86, Ax = 87, Backslash = 88, Calculator = 89, Capital = 90, Colon = 91, Comma = 92, Convert = 93, Decimal = 94, Divide = 95, Equals = 96, Grave = 97, Kana = 98, Kanji = 99, LAlt = 100, LBracket = 101, LControl = 102, LMenu = 103, LShift = 104, LWin = 105, Mail = 106, MediaSelect = 107, MediaStop = 108, Minus = 109, Multiply = 110, Mute = 111, MyComputer = 112, NavigateForward = 113, NavigateBackward = 114, NextTrack = 115, NoConvert = 116, NumpadComma = 117, NumpadEnter = 118, NumpadEquals = 119, OEM102 = 120, Period = 121, PlayPause = 122, Power = 123, PrevTrack = 124, RAlt = 125, RBracket = 126, RControl = 127, RMenu = 128, RShift = 129, RWin = 130, Semicolon = 131, Slash = 132, Sleep = 133, Stop = 134, Subtract = 135, Sysrq = 136, Tab = 137, Underline = 138, Unlabeled = 139, VolumeDown = 140, VolumeUp = 141, Wake = 142, WebBack = 143, WebFavorites = 144, WebForward = 145, WebHome = 146, WebRefresh = 147, WebSearch = 148, WebStop = 149, Yen = 150, Copy = 151, Paste = 152, Cut = 153,
}
Expand description

Symbolic name for a keyboard key.

Variants§

§

Key1 = 0

The ‘1’ key over the letters.

§

Key2 = 1

The ‘2’ key over the letters.

§

Key3 = 2

The ‘3’ key over the letters.

§

Key4 = 3

The ‘4’ key over the letters.

§

Key5 = 4

The ‘5’ key over the letters.

§

Key6 = 5

The ‘6’ key over the letters.

§

Key7 = 6

The ‘7’ key over the letters.

§

Key8 = 7

The ‘8’ key over the letters.

§

Key9 = 8

The ‘9’ key over the letters.

§

Key0 = 9

The ‘0’ key over the ‘O’ and ‘P’ keys.

§

A = 10

§

B = 11

§

C = 12

§

D = 13

§

E = 14

§

F = 15

§

G = 16

§

H = 17

§

I = 18

§

J = 19

§

K = 20

§

L = 21

§

M = 22

§

N = 23

§

O = 24

§

P = 25

§

Q = 26

§

R = 27

§

S = 28

§

T = 29

§

U = 30

§

V = 31

§

W = 32

§

X = 33

§

Y = 34

§

Z = 35

§

Escape = 36

The Escape key, next to F1.

§

F1 = 37

§

F2 = 38

§

F3 = 39

§

F4 = 40

§

F5 = 41

§

F6 = 42

§

F7 = 43

§

F8 = 44

§

F9 = 45

§

F10 = 46

§

F11 = 47

§

F12 = 48

§

F13 = 49

§

F14 = 50

§

F15 = 51

§

Snapshot = 52

Print Screen/SysRq.

§

Scroll = 53

Scroll Lock.

§

Pause = 54

Pause/Break key, next to Scroll lock.

§

Insert = 55

Insert, next to Backspace.

§

Home = 56

§

Delete = 57

§

End = 58

§

PageDown = 59

§

PageUp = 60

§

Left = 61

§

Up = 62

§

Right = 63

§

Down = 64

§

Back = 65

The Backspace key, right over Enter.

§

Return = 66

The Enter key.

§

Space = 67

The space bar.

§

Compose = 68

The “Compose” key on Linux.

§

Caret = 69

§

Numlock = 70

§

Numpad0 = 71

§

Numpad1 = 72

§

Numpad2 = 73

§

Numpad3 = 74

§

Numpad4 = 75

§

Numpad5 = 76

§

Numpad6 = 77

§

Numpad7 = 78

§

Numpad8 = 79

§

Numpad9 = 80

§

AbntC1 = 81

§

AbntC2 = 82

§

Add = 83

§

Apostrophe = 84

§

Apps = 85

§

At = 86

§

Ax = 87

§

Backslash = 88

§

Calculator = 89

§

Capital = 90

§

Colon = 91

§

Comma = 92

§

Convert = 93

§

Decimal = 94

§

Divide = 95

§

Equals = 96

§

Grave = 97

§

Kana = 98

§

Kanji = 99

§

LAlt = 100

§

LBracket = 101

§

LControl = 102

§

LMenu = 103

§

LShift = 104

§

LWin = 105

§

Mail = 106

§

MediaSelect = 107

§

MediaStop = 108

§

Minus = 109

§

Multiply = 110

§

Mute = 111

§

MyComputer = 112

§

NavigateForward = 113

§

NavigateBackward = 114

§

NextTrack = 115

§

NoConvert = 116

§

NumpadComma = 117

§

NumpadEnter = 118

§

NumpadEquals = 119

§

OEM102 = 120

§

Period = 121

§

PlayPause = 122

§

Power = 123

§

PrevTrack = 124

§

RAlt = 125

§

RBracket = 126

§

RControl = 127

§

RMenu = 128

§

RShift = 129

§

RWin = 130

§

Semicolon = 131

§

Slash = 132

§

Sleep = 133

§

Stop = 134

§

Subtract = 135

§

Sysrq = 136

§

Tab = 137

§

Underline = 138

§

Unlabeled = 139

§

VolumeDown = 140

§

VolumeUp = 141

§

Wake = 142

§

WebBack = 143

§

WebFavorites = 144

§

WebForward = 145

§

WebHome = 146

§

WebRefresh = 147

§

WebSearch = 148

§

WebStop = 149

§

Yen = 150

§

Copy = 151

§

Paste = 152

§

Cut = 153

Trait Implementations§

Source§

impl Clone for VirtualKeyCode

Source§

fn clone(&self) -> VirtualKeyCode

Returns a duplicate of the value. Read more
1.0.0 · Source§

fn clone_from(&mut self, source: &Self)

Performs copy-assignment from source. Read more
Source§

impl Debug for VirtualKeyCode

Source§

fn fmt(&self, f: &mut Formatter<'_>) -> Result<(), Error>

Formats the value using the given formatter. Read more
Source§

impl Hash for VirtualKeyCode

Source§

fn hash<__H>(&self, state: &mut __H)
where __H: Hasher,

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl PartialEq for VirtualKeyCode

Source§

fn eq(&self, other: &VirtualKeyCode) -> bool

Tests for self and other values to be equal, and is used by ==.
1.0.0 · Source§

fn ne(&self, other: &Rhs) -> bool

Tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Source§

impl Copy for VirtualKeyCode

Source§

impl Eq for VirtualKeyCode

Source§

impl StructuralPartialEq for VirtualKeyCode

Auto Trait Implementations§

Blanket Implementations§

Source§

impl<T> Any for T
where T: 'static + ?Sized,

Source§

fn type_id(&self) -> TypeId

Gets the TypeId of self. Read more
Source§

impl<T> Borrow<T> for T
where T: ?Sized,

Source§

fn borrow(&self) -> &T

Immutably borrows from an owned value. Read more
Source§

impl<T> BorrowMut<T> for T
where T: ?Sized,

Source§

fn borrow_mut(&mut self) -> &mut T

Mutably borrows from an owned value. Read more
Source§

impl<T> CloneToUninit for T
where T: Clone,

Source§

unsafe fn clone_to_uninit(&self, dest: *mut u8)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dest. Read more
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

Source§

impl<T, U> Into<U> for T
where U: From<T>,

Source§

fn into(self) -> U

Calls U::from(self).

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

Source§

impl<T> ToOwned for T
where T: Clone,

Source§

type Owned = T

The resulting type after obtaining ownership.
Source§

fn to_owned(&self) -> T

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

fn clone_into(&self, target: &mut T)

Uses borrowed data to replace owned data, usually by cloning. Read more
Source§

impl<T, U> TryFrom<U> for T
where U: Into<T>,

Source§

type Error = Infallible

The type returned in the event of a conversion error.
Source§

fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>

Performs the conversion.
Source§

impl<T, U> TryInto<U> for T
where U: TryFrom<T>,

Source§

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.
Source§

fn try_into(self) -> Result<U, <U as TryFrom<T>>::Error>

Performs the conversion.