KeyboardEventCode

Enum KeyboardEventCode 

Source
#[repr(u8)]
pub enum KeyboardEventCode {
Show 179 variants Backquote = 0, Backslash = 1, Backspace = 2, BracketLeft = 3, BracketRight = 4, Comma = 5, Digit0 = 6, Digit1 = 7, Digit2 = 8, Digit3 = 9, Digit4 = 10, Digit5 = 11, Digit6 = 12, Digit7 = 13, Digit8 = 14, Digit9 = 15, Equal = 16, IntlBackslash = 17, IntlRo = 18, IntlYen = 19, KeyA = 20, KeyB = 21, KeyC = 22, KeyD = 23, KeyE = 24, KeyF = 25, KeyG = 26, KeyH = 27, KeyI = 28, KeyJ = 29, KeyK = 30, KeyL = 31, KeyM = 32, KeyN = 33, KeyO = 34, KeyP = 35, KeyQ = 36, KeyR = 37, KeyS = 38, KeyT = 39, KeyU = 40, KeyV = 41, KeyW = 42, KeyX = 43, KeyY = 44, KeyZ = 45, Minus = 46, Period = 47, Quote = 48, Semicolon = 49, Slash = 50, AltLeft = 51, AltRight = 52, CapsLock = 53, ContextMenu = 54, ControlLeft = 55, ControlRight = 56, Enter = 57, MetaLeft = 58, MetaRight = 59, ShiftLeft = 60, ShiftRight = 61, Space = 62, Tab = 63, Convert = 64, KanaMode = 65, Lang1 = 66, Lang2 = 67, Lang3 = 68, Lang4 = 69, Lang5 = 70, NonConvert = 71, Delete = 72, End = 73, Help = 74, Home = 75, Insert = 76, PageDown = 77, PageUp = 78, ArrowDown = 79, ArrowLeft = 80, ArrowRight = 81, ArrowUp = 82, NumLock = 83, Numpad0 = 84, Numpad1 = 85, Numpad2 = 86, Numpad3 = 87, Numpad4 = 88, Numpad5 = 89, Numpad6 = 90, Numpad7 = 91, Numpad8 = 92, Numpad9 = 93, NumpadAdd = 94, NumpadBackspace = 95, NumpadClear = 96, NumpadClearEntry = 97, NumpadComma = 98, NumpadDecimal = 99, NumpadDivide = 100, NumpadEnter = 101, NumpadEqual = 102, NumpadHash = 103, NumpadMemoryAdd = 104, NumpadMemoryClear = 105, NumpadMemoryRecall = 106, NumpadMemoryStore = 107, NumpadMemorySubtract = 108, NumpadMultiply = 109, NumpadParenLeft = 110, NumpadParenRight = 111, NumpadStar = 112, NumpadSubtract = 113, Escape = 114, F1 = 115, F2 = 116, F3 = 117, F4 = 118, F5 = 119, F6 = 120, F7 = 121, F8 = 122, F9 = 123, F10 = 124, F11 = 125, F12 = 126, F13 = 127, F14 = 128, F15 = 129, F16 = 130, F17 = 131, F18 = 132, F19 = 133, Fn = 134, FnLock = 135, PrintScreen = 136, ScrollLock = 137, Pause = 138, BrowserBack = 139, BrowserFavorites = 140, BrowserForward = 141, BrowserHome = 142, BrowserRefresh = 143, BrowserSearch = 144, BrowserStop = 145, Eject = 146, LaunchApp1 = 147, LaunchApp2 = 148, LaunchMail = 149, MediaPlayPause = 150, MediaSelect = 151, MediaStop = 152, MediaTrackNext = 153, MediaTrackPrevious = 154, Power = 155, Sleep = 156, AudioVolumeDown = 157, AudioVolumeMute = 158, AudioVolumeUp = 159, WakeUp = 160, Hyper = 161, Super = 162, Turbo = 163, Abort = 164, Resume = 165, Suspend = 166, Again = 167, Copy = 168, Cut = 169, Find = 170, Open = 171, Paste = 172, Props = 173, Select = 174, Undo = 175, Hiragana = 176, Katakana = 177, Unidentified = 178,
}
Available on crate feature enum only.
Expand description

Enum with various KeyboardEvent.code values as per the latest the latest (as of 11 February, 2023) W3C Candidate Recommendation, 01 June 2017.

Variants§

§

Backquote = 0

Corresponds to BACKQUOTE.

§

Backslash = 1

Corresponds to BACKSLASH.

§

Backspace = 2

Corresponds to BACKSPACE.

§

BracketLeft = 3

Corresponds to BRACKET_LEFT.

§

BracketRight = 4

Corresponds to BRACKET_RIGHT.

§

Comma = 5

Corresponds to COMMA.

§

Digit0 = 6

Corresponds to DIGIT0.

§

Digit1 = 7

Corresponds to DIGIT1.

§

Digit2 = 8

Corresponds to DIGIT2.

§

Digit3 = 9

Corresponds to DIGIT3.

§

Digit4 = 10

Corresponds to DIGIT4.

§

Digit5 = 11

Corresponds to DIGIT5.

§

Digit6 = 12

Corresponds to DIGIT6.

§

Digit7 = 13

Corresponds to DIGIT7.

§

Digit8 = 14

Corresponds to DIGIT8.

§

Digit9 = 15

Corresponds to DIGIT9.

§

Equal = 16

Corresponds to EQUAL.

§

IntlBackslash = 17

Corresponds to INTL_BACKSLASH.

§

IntlRo = 18

Corresponds to INTL_RO.

§

IntlYen = 19

Corresponds to INTL_YEN.

§

KeyA = 20

Corresponds to KEY_A.

§

KeyB = 21

Corresponds to KEY_B.

§

KeyC = 22

Corresponds to KEY_C.

§

KeyD = 23

Corresponds to KEY_D.

§

KeyE = 24

Corresponds to KEY_E.

§

KeyF = 25

Corresponds to KEY_F.

§

KeyG = 26

Corresponds to KEY_G.

§

KeyH = 27

Corresponds to KEY_H.

§

KeyI = 28

Corresponds to KEY_I.

§

KeyJ = 29

Corresponds to KEY_J.

§

KeyK = 30

Corresponds to KEY_K.

§

KeyL = 31

Corresponds to KEY_L.

§

KeyM = 32

Corresponds to KEY_M.

§

KeyN = 33

Corresponds to KEY_N.

§

KeyO = 34

Corresponds to KEY_O.

§

KeyP = 35

Corresponds to KEY_P.

§

KeyQ = 36

Corresponds to KEY_Q.

§

KeyR = 37

Corresponds to KEY_R.

§

KeyS = 38

Corresponds to KEY_S.

§

KeyT = 39

Corresponds to KEY_T.

§

KeyU = 40

Corresponds to KEY_U.

§

KeyV = 41

Corresponds to KEY_V.

§

KeyW = 42

Corresponds to KEY_W.

§

KeyX = 43

Corresponds to KEY_X.

§

KeyY = 44

Corresponds to KEY_Y.

§

KeyZ = 45

Corresponds to KEY_Z.

§

Minus = 46

Corresponds to MINUS.

§

Period = 47

Corresponds to PERIOD.

§

Quote = 48

Corresponds to QUOTE.

§

Semicolon = 49

Corresponds to SEMICOLON.

§

Slash = 50

Corresponds to SLASH.

§

AltLeft = 51

Corresponds to ALT_LEFT.

§

AltRight = 52

Corresponds to ALT_RIGHT.

§

CapsLock = 53

Corresponds to CAPS_LOCK.

§

ContextMenu = 54

Corresponds to CONTEXT_MENU.

§

ControlLeft = 55

Corresponds to CONTROL_LEFT.

§

ControlRight = 56

Corresponds to CONTROL_RIGHT.

§

Enter = 57

Corresponds to ENTER.

§

MetaLeft = 58

Corresponds to META_LEFT.

§

MetaRight = 59

Corresponds to META_RIGHT.

§

ShiftLeft = 60

Corresponds to SHIFT_LEFT.

§

ShiftRight = 61

Corresponds to SHIFT_RIGHT.

§

Space = 62

Corresponds to SPACE.

§

Tab = 63

Corresponds to TAB.

§

Convert = 64

Corresponds to CONVERT.

§

KanaMode = 65

Corresponds to KANA_MODE.

§

Lang1 = 66

Corresponds to LANG1.

§

Lang2 = 67

Corresponds to LANG2.

§

Lang3 = 68

Corresponds to LANG3.

§

Lang4 = 69

Corresponds to LANG4.

§

Lang5 = 70

Corresponds to LANG5.

§

NonConvert = 71

Corresponds to NON_CONVERT.

§

Delete = 72

Corresponds to DELETE.

§

End = 73

Corresponds to END.

§

Help = 74

Corresponds to HELP.

§

Home = 75

Corresponds to HOME.

§

Insert = 76

Corresponds to INSERT.

§

PageDown = 77

Corresponds to PAGE_DOWN.

§

PageUp = 78

Corresponds to PAGE_UP.

§

ArrowDown = 79

Corresponds to ARROW_DOWN.

§

ArrowLeft = 80

Corresponds to ARROW_LEFT.

§

ArrowRight = 81

Corresponds to ARROW_RIGHT.

§

ArrowUp = 82

Corresponds to ARROW_UP.

§

NumLock = 83

Corresponds to NUM_LOCK.

§

Numpad0 = 84

Corresponds to NUMPAD0.

§

Numpad1 = 85

Corresponds to NUMPAD1.

§

Numpad2 = 86

Corresponds to NUMPAD2.

§

Numpad3 = 87

Corresponds to NUMPAD3.

§

Numpad4 = 88

Corresponds to NUMPAD4.

§

Numpad5 = 89

Corresponds to NUMPAD5.

§

Numpad6 = 90

Corresponds to NUMPAD6.

§

Numpad7 = 91

Corresponds to NUMPAD7.

§

Numpad8 = 92

Corresponds to NUMPAD8.

§

Numpad9 = 93

Corresponds to NUMPAD9.

§

NumpadAdd = 94

Corresponds to NUMPAD_ADD.

§

NumpadBackspace = 95

Corresponds to NUMPAD_BACKSPACE.

§

NumpadClear = 96

Corresponds to NUMPAD_CLEAR.

§

NumpadClearEntry = 97

Corresponds to NUMPAD_CLEAR_ENTRY.

§

NumpadComma = 98

Corresponds to NUMPAD_COMMA.

§

NumpadDecimal = 99

Corresponds to NUMPAD_DECIMAL.

§

NumpadDivide = 100

Corresponds to NUMPAD_DIVIDE.

§

NumpadEnter = 101

Corresponds to NUMPAD_ENTER.

§

NumpadEqual = 102

Corresponds to NUMPAD_EQUAL.

§

NumpadHash = 103

Corresponds to NUMPAD_HASH.

§

NumpadMemoryAdd = 104

Corresponds to NUMPAD_MEMORY_ADD.

§

NumpadMemoryClear = 105

Corresponds to NUMPAD_MEMORY_CLEAR.

§

NumpadMemoryRecall = 106

Corresponds to NUMPAD_MEMORY_RECALL.

§

NumpadMemoryStore = 107

Corresponds to NUMPAD_MEMORY_STORE.

§

NumpadMemorySubtract = 108

Corresponds to NUMPAD_MEMORY_SUBTRACT.

§

NumpadMultiply = 109

Corresponds to NUMPAD_MULTIPLY.

§

NumpadParenLeft = 110

Corresponds to NUMPAD_PAREN_LEFT.

§

NumpadParenRight = 111

Corresponds to NUMPAD_PAREN_RIGHT.

§

NumpadStar = 112

Corresponds to NUMPAD_STAR.

§

NumpadSubtract = 113

Corresponds to NUMPAD_SUBTRACT.

§

Escape = 114

Corresponds to ESCAPE.

§

F1 = 115

Corresponds to F1.

§

F2 = 116

Corresponds to F2.

§

F3 = 117

Corresponds to F3.

§

F4 = 118

Corresponds to F4.

§

F5 = 119

Corresponds to F5.

§

F6 = 120

Corresponds to F6.

§

F7 = 121

Corresponds to F7.

§

F8 = 122

Corresponds to F8.

§

F9 = 123

Corresponds to F9.

§

F10 = 124

Corresponds to F10.

§

F11 = 125

Corresponds to F11.

§

F12 = 126

Corresponds to F12.

§

F13 = 127

Corresponds to F13.

§

F14 = 128

Corresponds to F14.

§

F15 = 129

Corresponds to F15.

§

F16 = 130

Corresponds to F16.

§

F17 = 131

Corresponds to F17.

§

F18 = 132

Corresponds to F18.

§

F19 = 133

Corresponds to F19.

§

Fn = 134

Corresponds to FN.

§

FnLock = 135

Corresponds to FN_LOCK.

§

PrintScreen = 136

Corresponds to PRINT_SCREEN.

§

ScrollLock = 137

Corresponds to SCROLL_LOCK.

§

Pause = 138

Corresponds to PAUSE.

§

BrowserBack = 139

Corresponds to BROWSER_BACK.

§

BrowserFavorites = 140

Corresponds to BROWSER_FAVORITES.

§

BrowserForward = 141

Corresponds to BROWSER_FORWARD.

§

BrowserHome = 142

Corresponds to BROWSER_HOME.

§

BrowserRefresh = 143

Corresponds to BROWSER_REFRESH.

§

BrowserSearch = 144

Corresponds to BROWSER_SEARCH.

§

BrowserStop = 145

Corresponds to BROWSER_STOP.

§

Eject = 146

Corresponds to EJECT.

§

LaunchApp1 = 147

Corresponds to LAUNCH_APP1.

§

LaunchApp2 = 148

Corresponds to LAUNCH_APP2.

§

LaunchMail = 149

Corresponds to LAUNCH_MAIL.

§

MediaPlayPause = 150

Corresponds to MEDIA_PLAY_PAUSE.

§

MediaSelect = 151

Corresponds to MEDIA_SELECT.

§

MediaStop = 152

Corresponds to MEDIA_STOP.

§

MediaTrackNext = 153

Corresponds to MEDIA_TRACK_NEXT.

§

MediaTrackPrevious = 154

Corresponds to MEDIA_TRACK_PREVIOUS.

§

Power = 155

Corresponds to POWER.

§

Sleep = 156

Corresponds to SLEEP.

§

AudioVolumeDown = 157

Corresponds to AUDIO_VOLUME_DOWN.

§

AudioVolumeMute = 158

Corresponds to AUDIO_VOLUME_MUTE.

§

AudioVolumeUp = 159

Corresponds to AUDIO_VOLUME_UP.

§

WakeUp = 160

Corresponds to WAKE_UP.

§

Hyper = 161

Available on crate feature legacy only.

Corresponds to HYPER.

§

Super = 162

Available on crate feature legacy only.

Corresponds to SUPER.

§

Turbo = 163

Available on crate feature legacy only.

Corresponds to TURBO.

§

Abort = 164

Available on crate feature legacy only.

Corresponds to ABORT.

§

Resume = 165

Available on crate feature legacy only.

Corresponds to RESUME.

§

Suspend = 166

Available on crate feature legacy only.

Corresponds to SUSPEND.

§

Again = 167

Available on crate feature legacy only.

Corresponds to AGAIN.

§

Copy = 168

Available on crate feature legacy only.

Corresponds to COPY.

§

Cut = 169

Available on crate feature legacy only.

Corresponds to CUT.

§

Find = 170

Available on crate feature legacy only.

Corresponds to FIND.

§

Open = 171

Available on crate feature legacy only.

Corresponds to OPEN.

§

Paste = 172

Available on crate feature legacy only.

Corresponds to PASTE.

§

Props = 173

Available on crate feature legacy only.

Corresponds to PROPS.

§

Select = 174

Available on crate feature legacy only.

Corresponds to SELECT.

§

Undo = 175

Available on crate feature legacy only.

Corresponds to UNDO.

§

Hiragana = 176

Available on crate feature non_standard_intl only.

Corresponds to HIRAGANA.

§

Katakana = 177

Available on crate feature non_standard_intl only.

Corresponds to KATAKANA.

§

Unidentified = 178

Corresponds to UNIDENTIFIED.

Implementations§

Source§

impl KeyboardEventCode

Source

pub const fn from_repr(discriminant: u8) -> Option<KeyboardEventCode>

Try to create Self from the raw representation

Trait Implementations§

Source§

impl Clone for KeyboardEventCode

Source§

fn clone(&self) -> KeyboardEventCode

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 KeyboardEventCode

Source§

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

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

impl EnumCount for KeyboardEventCode

Source§

const COUNT: usize = 179usize

Source§

impl Hash for KeyboardEventCode

Source§

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

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 KeyboardEventCode

Source§

fn eq(&self, other: &KeyboardEventCode) -> 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 KeyboardEventCode

Source§

impl Eq for KeyboardEventCode

Source§

impl StructuralPartialEq for KeyboardEventCode

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.