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 · Source§

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

Performs copy-assignment from source. Read more
Source§

impl Debug for KeyboardKey

Source§

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

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

impl FromPrimitive for KeyboardKey

Source§

fn from_i64(n: i64) -> Option<Self>

Converts an i64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u64(n: u64) -> Option<Self>

Converts an u64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_isize(n: isize) -> Option<Self>

Converts an isize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i8(n: i8) -> Option<Self>

Converts an i8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i16(n: i16) -> Option<Self>

Converts an i16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i32(n: i32) -> Option<Self>

Converts an i32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_i128(n: i128) -> Option<Self>

Converts an i128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_usize(n: usize) -> Option<Self>

Converts a usize to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u8(n: u8) -> Option<Self>

Converts an u8 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u16(n: u16) -> Option<Self>

Converts an u16 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u32(n: u32) -> Option<Self>

Converts an u32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_u128(n: u128) -> Option<Self>

Converts an u128 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
Source§

fn from_f32(n: f32) -> Option<Self>

Converts a f32 to return an optional value of this type. If the value cannot be represented by this type, then None is returned.
Source§

fn from_f64(n: f64) -> Option<Self>

Converts a f64 to return an optional value of this type. If the value cannot be represented by this type, then None is returned. Read more
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 · 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 ToPrimitive for KeyboardKey

Source§

fn to_i64(&self) -> Option<i64>

Converts the value of self to an i64. If the value cannot be represented by an i64, then None is returned.
Source§

fn to_u64(&self) -> Option<u64>

Converts the value of self to a u64. If the value cannot be represented by a u64, then None is returned.
Source§

fn to_isize(&self) -> Option<isize>

Converts the value of self to an isize. If the value cannot be represented by an isize, then None is returned.
Source§

fn to_i8(&self) -> Option<i8>

Converts the value of self to an i8. If the value cannot be represented by an i8, then None is returned.
Source§

fn to_i16(&self) -> Option<i16>

Converts the value of self to an i16. If the value cannot be represented by an i16, then None is returned.
Source§

fn to_i32(&self) -> Option<i32>

Converts the value of self to an i32. If the value cannot be represented by an i32, then None is returned.
Source§

fn to_i128(&self) -> Option<i128>

Converts the value of self to an i128. If the value cannot be represented by an i128 (i64 under the default implementation), then None is returned. Read more
Source§

fn to_usize(&self) -> Option<usize>

Converts the value of self to a usize. If the value cannot be represented by a usize, then None is returned.
Source§

fn to_u8(&self) -> Option<u8>

Converts the value of self to a u8. If the value cannot be represented by a u8, then None is returned.
Source§

fn to_u16(&self) -> Option<u16>

Converts the value of self to a u16. If the value cannot be represented by a u16, then None is returned.
Source§

fn to_u32(&self) -> Option<u32>

Converts the value of self to a u32. If the value cannot be represented by a u32, then None is returned.
Source§

fn to_u128(&self) -> Option<u128>

Converts the value of self to a u128. If the value cannot be represented by a u128 (u64 under the default implementation), then None is returned. Read more
Source§

fn to_f32(&self) -> Option<f32>

Converts the value of self to an f32. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f32.
Source§

fn to_f64(&self) -> Option<f64>

Converts the value of self to an f64. Overflows may map to positive or negative inifinity, otherwise None is returned if the value cannot be represented by an f64. Read more
Source§

impl Copy for KeyboardKey

Source§

impl Eq for KeyboardKey

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.