Enum Keys

Source
#[repr(u8)]
pub enum Keys {
Show 119 variants None = 0, A = 4, B = 5, C = 6, D = 7, E = 8, F = 9, G = 10, H = 11, I = 12, J = 13, K = 14, L = 15, M = 16, N = 17, O = 18, P = 19, Q = 20, R = 21, S = 22, T = 23, U = 24, V = 25, W = 26, X = 27, Y = 28, Z = 29, One = 30, Two = 31, Three = 32, Four = 33, Five = 34, Six = 35, Seven = 36, Eight = 37, Nine = 38, Zero = 39, Enter = 40, Escape = 41, Backspace = 42, Tab = 43, Spacebar = 44, Minus = 45, Equals = 46, LeftBracket = 47, RightBracket = 48, Backslash = 49, Pound = 50, Semicolon = 51, Quote = 52, BackQuote = 53, Comma = 54, Period = 55, ForwardSlash = 56, CapsLock = 57, F1 = 58, F2 = 59, F3 = 60, F4 = 61, F5 = 62, F6 = 63, F7 = 64, F8 = 65, F9 = 66, F10 = 67, F11 = 68, F12 = 69, PrintScreen = 70, ScrollLock = 71, PauseBreak = 72, Insert = 73, Home = 74, PageUp = 75, Delete = 76, End = 77, PageDown = 78, RightArrow = 79, LeftArrow = 80, DownArrow = 81, UpArrow = 82, NumLock = 83, KeypadDivide = 84, KeypadMultiply = 85, KeypadSubtract = 86, KeypadAdd = 87, KeypadEnter = 88, KeypadOne = 89, KeypadTwo = 90, KeypadThree = 91, KeypadFour = 92, KeypadFive = 93, KeypadSix = 94, KeypadSeven = 95, KeypadEight = 96, KeypadNine = 97, KeypadZero = 98, KeypadDecimal = 99, Intlbackslash = 100, KeypadEquals = 103, F13 = 104, F14 = 105, F15 = 106, F16 = 107, F17 = 108, F18 = 109, F19 = 110, F20 = 111, F21 = 112, F22 = 113, F23 = 114, F24 = 115, LeftControl = 224, LeftShift = 225, LeftAlt = 226, LeftMeta = 227, RightControl = 228, RightShift = 229, RightAlt = 230, RightMeta = 231,
}
Expand description

Keyboard keys as enum values, with usage-id representation.

Variants§

§

None = 0

§

A = 4

§

B = 5

§

C = 6

§

D = 7

§

E = 8

§

F = 9

§

G = 10

§

H = 11

§

I = 12

§

J = 13

§

K = 14

§

L = 15

§

M = 16

§

N = 17

§

O = 18

§

P = 19

§

Q = 20

§

R = 21

§

S = 22

§

T = 23

§

U = 24

§

V = 25

§

W = 26

§

X = 27

§

Y = 28

§

Z = 29

§

One = 30

§

Two = 31

§

Three = 32

§

Four = 33

§

Five = 34

§

Six = 35

§

Seven = 36

§

Eight = 37

§

Nine = 38

§

Zero = 39

§

Enter = 40

§

Escape = 41

§

Backspace = 42

§

Tab = 43

§

Spacebar = 44

§

Minus = 45

§

Equals = 46

§

LeftBracket = 47

§

RightBracket = 48

§

Backslash = 49

§

Pound = 50

§

Semicolon = 51

§

Quote = 52

§

BackQuote = 53

§

Comma = 54

§

Period = 55

§

ForwardSlash = 56

§

CapsLock = 57

§

F1 = 58

§

F2 = 59

§

F3 = 60

§

F4 = 61

§

F5 = 62

§

F6 = 63

§

F7 = 64

§

F8 = 65

§

F9 = 66

§

F10 = 67

§

F11 = 68

§

F12 = 69

§

PrintScreen = 70

§

ScrollLock = 71

§

PauseBreak = 72

§

Insert = 73

§

Home = 74

§

PageUp = 75

§

Delete = 76

§

End = 77

§

PageDown = 78

§

RightArrow = 79

§

LeftArrow = 80

§

DownArrow = 81

§

UpArrow = 82

§

NumLock = 83

§

KeypadDivide = 84

§

KeypadMultiply = 85

§

KeypadSubtract = 86

§

KeypadAdd = 87

§

KeypadEnter = 88

§

KeypadOne = 89

§

KeypadTwo = 90

§

KeypadThree = 91

§

KeypadFour = 92

§

KeypadFive = 93

§

KeypadSix = 94

§

KeypadSeven = 95

§

KeypadEight = 96

§

KeypadNine = 97

§

KeypadZero = 98

§

KeypadDecimal = 99

§

Intlbackslash = 100

§

KeypadEquals = 103

§

F13 = 104

§

F14 = 105

§

F15 = 106

§

F16 = 107

§

F17 = 108

§

F18 = 109

§

F19 = 110

§

F20 = 111

§

F21 = 112

§

F22 = 113

§

F23 = 114

§

F24 = 115

§

LeftControl = 224

§

LeftShift = 225

§

LeftAlt = 226

§

LeftMeta = 227

§

RightControl = 228

§

RightShift = 229

§

RightAlt = 230

§

RightMeta = 231

Trait Implementations§

Source§

impl Clone for Keys

Source§

fn clone(&self) -> Keys

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 Keys

Source§

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

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

impl Hash for Keys

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 Ord for Keys

Source§

fn cmp(&self, other: &Keys) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for Keys

Source§

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

Source§

fn partial_cmp(&self, other: &Keys) -> Option<Ordering>

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

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TryFrom<u8> for Keys

Source§

type Error = ()

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

fn try_from(value: u8) -> Result<Self, Self::Error>

Performs the conversion.
Source§

impl Copy for Keys

Source§

impl Eq for Keys

Source§

impl StructuralPartialEq for Keys

Auto Trait Implementations§

§

impl Freeze for Keys

§

impl RefUnwindSafe for Keys

§

impl Send for Keys

§

impl Sync for Keys

§

impl Unpin for Keys

§

impl UnwindSafe for Keys

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.