Enum minifb::Key

source ·
pub enum Key {
Show 108 variants Key0 = 0, Key1 = 1, Key2 = 2, Key3 = 3, Key4 = 4, Key5 = 5, Key6 = 6, Key7 = 7, Key8 = 8, Key9 = 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, F1 = 36, F2 = 37, F3 = 38, F4 = 39, F5 = 40, F6 = 41, F7 = 42, F8 = 43, F9 = 44, F10 = 45, F11 = 46, F12 = 47, F13 = 48, F14 = 49, F15 = 50, Down = 51, Left = 52, Right = 53, Up = 54, Apostrophe = 55, Backquote = 56, Backslash = 57, Comma = 58, Equal = 59, LeftBracket = 60, Minus = 61, Period = 62, RightBracket = 63, Semicolon = 64, Slash = 65, Backspace = 66, Delete = 67, End = 68, Enter = 69, Escape = 70, Home = 71, Insert = 72, Menu = 73, PageDown = 74, PageUp = 75, Pause = 76, Space = 77, Tab = 78, NumLock = 79, CapsLock = 80, ScrollLock = 81, LeftShift = 82, RightShift = 83, LeftCtrl = 84, RightCtrl = 85, NumPad0 = 86, NumPad1 = 87, NumPad2 = 88, NumPad3 = 89, NumPad4 = 90, NumPad5 = 91, NumPad6 = 92, NumPad7 = 93, NumPad8 = 94, NumPad9 = 95, NumPadDot = 96, NumPadSlash = 97, NumPadAsterisk = 98, NumPadMinus = 99, NumPadPlus = 100, NumPadEnter = 101, LeftAlt = 102, RightAlt = 103, LeftSuper = 104, RightSuper = 105, Unknown = 106, Count = 107,
}
Expand description

Key is used by the get key functions to check if some keys on the keyboard has been pressed

Variants§

§

Key0 = 0

§

Key1 = 1

§

Key2 = 2

§

Key3 = 3

§

Key4 = 4

§

Key5 = 5

§

Key6 = 6

§

Key7 = 7

§

Key8 = 8

§

Key9 = 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

§

F1 = 36

§

F2 = 37

§

F3 = 38

§

F4 = 39

§

F5 = 40

§

F6 = 41

§

F7 = 42

§

F8 = 43

§

F9 = 44

§

F10 = 45

§

F11 = 46

§

F12 = 47

§

F13 = 48

§

F14 = 49

§

F15 = 50

§

Down = 51

§

Left = 52

§

Right = 53

§

Up = 54

§

Apostrophe = 55

§

Backquote = 56

§

Backslash = 57

§

Comma = 58

§

Equal = 59

§

LeftBracket = 60

§

Minus = 61

§

Period = 62

§

RightBracket = 63

§

Semicolon = 64

§

Slash = 65

§

Backspace = 66

§

Delete = 67

§

End = 68

§

Enter = 69

§

Escape = 70

§

Home = 71

§

Insert = 72

§

Menu = 73

§

PageDown = 74

§

PageUp = 75

§

Pause = 76

§

Space = 77

§

Tab = 78

§

NumLock = 79

§

CapsLock = 80

§

ScrollLock = 81

§

LeftShift = 82

§

RightShift = 83

§

LeftCtrl = 84

§

RightCtrl = 85

§

NumPad0 = 86

§

NumPad1 = 87

§

NumPad2 = 88

§

NumPad3 = 89

§

NumPad4 = 90

§

NumPad5 = 91

§

NumPad6 = 92

§

NumPad7 = 93

§

NumPad8 = 94

§

NumPad9 = 95

§

NumPadDot = 96

§

NumPadSlash = 97

§

NumPadAsterisk = 98

§

NumPadMinus = 99

§

NumPadPlus = 100

§

NumPadEnter = 101

§

LeftAlt = 102

§

RightAlt = 103

§

LeftSuper = 104

§

RightSuper = 105

§

Unknown = 106

Used when an Unknown key has been pressed

§

Count = 107

Trait Implementations§

source§

impl Clone for Key

source§

fn clone(&self) -> Key

Returns a copy 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 Key

source§

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

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

impl Hash for Key

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 Key

source§

fn cmp(&self, other: &Key) -> 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 + PartialOrd,

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

impl PartialEq for Key

source§

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

This method tests for self and other values to be equal, and is used by ==.
1.0.0 · source§

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

This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
source§

impl PartialOrd for Key

source§

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

This method 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

This method 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

This method 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

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more
source§

impl Copy for Key

source§

impl Eq for Key

source§

impl StructuralPartialEq for Key

Auto Trait Implementations§

§

impl Freeze for Key

§

impl RefUnwindSafe for Key

§

impl Send for Key

§

impl Sync for Key

§

impl Unpin for Key

§

impl UnwindSafe for Key

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> 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,

§

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>,

§

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>,

§

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.