Enum tfc::Key

source ·
#[repr(u8)]
pub enum Key {
Show 110 variants CapsLock = 0, Shift = 1, Control = 2, Alt = 3, Meta = 4, ControlOrMeta = 5, RightShift = 6, RightControl = 7, RightAlt = 8, RightMeta = 9, RightControlOrMeta = 10, Fn = 11, ReturnOrEnter = 12, Escape = 13, DeleteOrBackspace = 14, ForwardDelete = 15, Insert = 16, Tab = 17, Space = 18, Minus = 19, Equal = 20, LeftBracket = 21, RightBracket = 22, Backslash = 23, Semicolon = 24, Quote = 25, Grave = 26, Comma = 27, Period = 28, Slash = 29, UpArrow = 30, RightArrow = 31, DownArrow = 32, LeftArrow = 33, PageUp = 34, PageDown = 35, Home = 36, End = 37, A = 38, B = 39, C = 40, D = 41, E = 42, F = 43, G = 44, H = 45, I = 46, J = 47, K = 48, L = 49, M = 50, N = 51, O = 52, P = 53, Q = 54, R = 55, S = 56, T = 57, U = 58, V = 59, W = 60, X = 61, Y = 62, Z = 63, N0 = 64, N1 = 65, N2 = 66, N3 = 67, N4 = 68, N5 = 69, N6 = 70, N7 = 71, N8 = 72, N9 = 73, Numpad0 = 74, Numpad1 = 75, Numpad2 = 76, Numpad3 = 77, Numpad4 = 78, Numpad5 = 79, Numpad6 = 80, Numpad7 = 81, Numpad8 = 82, Numpad9 = 83, NumpadClear = 84, NumpadEquals = 85, NumpadDivide = 86, NumpadMultiply = 87, NumpadMinus = 88, NumpadPlus = 89, NumpadEnter = 90, NumpadDecimal = 91, F1 = 92, F2 = 93, F3 = 94, F4 = 95, F5 = 96, F6 = 97, F7 = 98, F8 = 99, F9 = 100, F10 = 101, F11 = 102, F12 = 103, FastForward = 104, Rewind = 105, PlayPause = 106, VolumeUp = 107, VolumeDown = 108, Mute = 109,
}
Expand description

A keyboard key used by the KeyboardContext trait.

This implements the Enum trait.

Variants§

§

CapsLock = 0

§

Shift = 1

§

Control = 2

§

Alt = 3

§

Meta = 4

§

ControlOrMeta = 5

§

RightShift = 6

§

RightControl = 7

§

RightAlt = 8

§

RightMeta = 9

§

RightControlOrMeta = 10

§

Fn = 11

§

ReturnOrEnter = 12

§

Escape = 13

§

DeleteOrBackspace = 14

§

ForwardDelete = 15

§

Insert = 16

§

Tab = 17

§

Space = 18

§

Minus = 19

§

Equal = 20

§

LeftBracket = 21

§

RightBracket = 22

§

Backslash = 23

§

Semicolon = 24

§

Quote = 25

§

Grave = 26

§

Comma = 27

§

Period = 28

§

Slash = 29

§

UpArrow = 30

§

RightArrow = 31

§

DownArrow = 32

§

LeftArrow = 33

§

PageUp = 34

§

PageDown = 35

§

Home = 36

§

End = 37

§

A = 38

§

B = 39

§

C = 40

§

D = 41

§

E = 42

§

F = 43

§

G = 44

§

H = 45

§

I = 46

§

J = 47

§

K = 48

§

L = 49

§

M = 50

§

N = 51

§

O = 52

§

P = 53

§

Q = 54

§

R = 55

§

S = 56

§

T = 57

§

U = 58

§

V = 59

§

W = 60

§

X = 61

§

Y = 62

§

Z = 63

§

N0 = 64

§

N1 = 65

§

N2 = 66

§

N3 = 67

§

N4 = 68

§

N5 = 69

§

N6 = 70

§

N7 = 71

§

N8 = 72

§

N9 = 73

§

Numpad0 = 74

§

Numpad1 = 75

§

Numpad2 = 76

§

Numpad3 = 77

§

Numpad4 = 78

§

Numpad5 = 79

§

Numpad6 = 80

§

Numpad7 = 81

§

Numpad8 = 82

§

Numpad9 = 83

§

NumpadClear = 84

§

NumpadEquals = 85

§

NumpadDivide = 86

§

NumpadMultiply = 87

§

NumpadMinus = 88

§

NumpadPlus = 89

§

NumpadEnter = 90

§

NumpadDecimal = 91

§

F1 = 92

§

F2 = 93

§

F3 = 94

§

F4 = 95

§

F5 = 96

§

F6 = 97

§

F7 = 98

§

F8 = 99

§

F9 = 100

§

F10 = 101

§

F11 = 102

§

F12 = 103

§

FastForward = 104

§

Rewind = 105

§

PlayPause = 106

§

VolumeUp = 107

§

VolumeDown = 108

§

Mute = 109

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 Display for Key

source§

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

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

impl Enum for Key

source§

const NAME: &'static str = "Key"

The name of the enum.
source§

const COUNT: u8 = 110u8

The number of variants in the enum.
source§

fn display_name(&self) -> &'static str

The display name of this enum variant. Read more
source§

fn identifier_name(&self) -> &'static str

The identifier name of this enum variant. Read more
source§

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

Create an instance of the enum from a u8. Read more
source§

fn into_u8(self) -> u8

Convert this enum variant to a u8. Read more
source§

fn iter() -> EnumIterator<Self>

Get an iterator over the variants of the enum.
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 Copy for Key

source§

impl Eq for Key

source§

impl StructuralEq for Key

source§

impl StructuralPartialEq for Key

Auto Trait Implementations§

§

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> ToString for T
where T: Display + ?Sized,

source§

default fn to_string(&self) -> String

Converts the given value to a String. 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.