Skip to main content

KeyboardKey

Enum KeyboardKey 

Source
#[repr(C)]
pub enum KeyboardKey {
Show 109 variants Null = 0, Apostrophe = 39, Comma = 44, Minus = 45, Period = 46, Slash = 47, Zero = 48, One = 49, Two = 50, Three = 51, Four = 52, Five = 53, Six = 54, Seven = 55, Eight = 56, Nine = 57, Semicolon = 59, Equal = 61, A = 65, B = 66, C = 67, D = 68, E = 69, F = 70, G = 71, H = 72, I = 73, J = 74, K = 75, L = 76, M = 77, N = 78, O = 79, P = 80, Q = 81, R = 82, S = 83, T = 84, U = 85, V = 86, W = 87, X = 88, Y = 89, Z = 90, LeftBracket = 91, Backslash = 92, RightBracket = 93, Grave = 96, Space = 32, Escape = 256, Enter = 257, Tab = 258, Backspace = 259, Insert = 260, Delete = 261, Right = 262, Left = 263, Down = 264, Up = 265, PageUp = 266, PageDown = 267, Home = 268, End = 269, CapsLock = 280, ScrollLock = 281, NumLock = 282, PrintScreen = 283, Pause = 284, F1 = 290, F2 = 291, F3 = 292, F4 = 293, F5 = 294, F6 = 295, F7 = 296, F8 = 297, F9 = 298, F10 = 299, F11 = 300, F12 = 301, LeftShift = 340, LeftControl = 341, LeftAlt = 342, LeftSuper = 343, RightShift = 344, RightControl = 345, RightAlt = 346, RightSuper = 347, KbMenu = 348, Kp0 = 320, Kp1 = 321, Kp2 = 322, Kp3 = 323, Kp4 = 324, Kp5 = 325, Kp6 = 326, Kp7 = 327, Kp8 = 328, Kp9 = 329, KpDecimal = 330, KpDivide = 331, KpMultiply = 332, KpSubtract = 333, KpAdd = 334, KpEnter = 335, KpEqual = 336, Back = 4, VolumeUp = 24, VolumeDown = 25,
}
Expand description

Keyboard keys (US keyboard layout)

Variants§

§

Null = 0

Key: NULL, used for no key pressed

§

Apostrophe = 39

Key: ’

§

Comma = 44

Key: ,

§

Minus = 45

Key: -

§

Period = 46

Key: .

§

Slash = 47

Key: /

§

Zero = 48

Key: 0

§

One = 49

Key: 1

§

Two = 50

Key: 2

§

Three = 51

Key: 3

§

Four = 52

Key: 4

§

Five = 53

Key: 5

§

Six = 54

Key: 6

§

Seven = 55

Key: 7

§

Eight = 56

Key: 8

§

Nine = 57

Key: 9

§

Semicolon = 59

Key: ;

§

Equal = 61

Key: =

§

A = 65

Key: A | a

§

B = 66

Key: B | b

§

C = 67

Key: C | c

§

D = 68

Key: D | d

§

E = 69

Key: E | e

§

F = 70

Key: F | f

§

G = 71

Key: G | g

§

H = 72

Key: H | h

§

I = 73

Key: I | i

§

J = 74

Key: J | j

§

K = 75

Key: K | k

§

L = 76

Key: L | l

§

M = 77

Key: M | m

§

N = 78

Key: N | n

§

O = 79

Key: O | o

§

P = 80

Key: P | p

§

Q = 81

Key: Q | q

§

R = 82

Key: R | r

§

S = 83

Key: S | s

§

T = 84

Key: T | t

§

U = 85

Key: U | u

§

V = 86

Key: V | v

§

W = 87

Key: W | w

§

X = 88

Key: X | x

§

Y = 89

Key: Y | y

§

Z = 90

Key: Z | z

§

LeftBracket = 91

Key: [

§

Backslash = 92

Key: ’'

§

RightBracket = 93

Key: ]

§

Grave = 96

Key: `

§

Space = 32

Key: Space

§

Escape = 256

Key: Esc

§

Enter = 257

Key: Enter

§

Tab = 258

Key: Tab

§

Backspace = 259

Key: Backspace

§

Insert = 260

Key: Ins

§

Delete = 261

Key: Del

§

Right = 262

Key: Cursor right

§

Left = 263

Key: Cursor left

§

Down = 264

Key: Cursor down

§

Up = 265

Key: Cursor up

§

PageUp = 266

Key: Page up

§

PageDown = 267

Key: Page down

§

Home = 268

Key: Home

§

End = 269

Key: End

§

CapsLock = 280

Key: Caps lock

§

ScrollLock = 281

Key: Scroll down

§

NumLock = 282

Key: Num lock

§

PrintScreen = 283

Key: Print screen

§

Pause = 284

Key: Pause

§

F1 = 290

Key: F1

§

F2 = 291

Key: F2

§

F3 = 292

Key: F3

§

F4 = 293

Key: F4

§

F5 = 294

Key: F5

§

F6 = 295

Key: F6

§

F7 = 296

Key: F7

§

F8 = 297

Key: F8

§

F9 = 298

Key: F9

§

F10 = 299

Key: F10

§

F11 = 300

Key: F11

§

F12 = 301

Key: F12

§

LeftShift = 340

Key: Shift left

§

LeftControl = 341

Key: Control left

§

LeftAlt = 342

Key: Alt left

§

LeftSuper = 343

Key: Super left

§

RightShift = 344

Key: Shift right

§

RightControl = 345

Key: Control right

§

RightAlt = 346

Key: Alt right

§

RightSuper = 347

Key: Super right

§

KbMenu = 348

Key: KB menu

§

Kp0 = 320

Key: Keypad 0

§

Kp1 = 321

Key: Keypad 1

§

Kp2 = 322

Key: Keypad 2

§

Kp3 = 323

Key: Keypad 3

§

Kp4 = 324

Key: Keypad 4

§

Kp5 = 325

Key: Keypad 5

§

Kp6 = 326

Key: Keypad 6

§

Kp7 = 327

Key: Keypad 7

§

Kp8 = 328

Key: Keypad 8

§

Kp9 = 329

Key: Keypad 9

§

KpDecimal = 330

Key: Keypad .

§

KpDivide = 331

Key: Keypad /

§

KpMultiply = 332

Key: Keypad *

§

KpSubtract = 333

Key: Keypad -

§

KpAdd = 334

Key: Keypad +

§

KpEnter = 335

Key: Keypad Enter

§

KpEqual = 336

Key: Keypad =

§

Back = 4

Key: Android back button

§

VolumeUp = 24

Key: Android volume up button

§

VolumeDown = 25

Key: Android volume down button

Trait Implementations§

Source§

impl Clone for KeyboardKey

Source§

fn clone(&self) -> KeyboardKey

Returns a duplicate of the value. Read more
1.0.0 (const: unstable) · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Copy for KeyboardKey

Source§

impl Debug for KeyboardKey

Source§

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

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

impl Eq for KeyboardKey

Source§

impl Hash for KeyboardKey

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 KeyboardKey

Source§

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

Tests for self and other values to be equal, and is used by ==.
1.0.0 (const: unstable) · 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 StructuralPartialEq for KeyboardKey

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.