Skip to main content

KeyCode

Enum KeyCode 

Source
#[repr(u32)]
pub enum KeyCode {
Show 67 variants NoKey = 0, Escape = 1, Backspace = 2, Tab = 3, Enter = 4, Shift = 5, Control = 6, Alt = 7, Pause = 8, CapsLock = 9, PageUp = 10, PageDown = 11, End = 12, Home = 13, Up = 14, Left = 15, Right = 16, Down = 17, PrintScreen = 18, Insert = 19, Delete = 20, LeftWin = 21, RightWin = 22, Apps = 23, Number0 = 24, Number1 = 25, Number2 = 26, Number3 = 27, Number4 = 28, Number5 = 29, Number6 = 30, Number7 = 31, Number8 = 32, Number9 = 33, NumPad0 = 34, NumPad1 = 35, NumPad2 = 36, NumPad3 = 37, NumPad4 = 38, NumPad5 = 39, NumPad6 = 40, NumPad7 = 41, NumPad8 = 42, NumPad9 = 43, NumPadAdd = 44, NumPadSubtract = 45, NumPadDivide = 46, NumPadMultiply = 47, NumPadDecimal = 48, NumPadEnter = 49, F1 = 50, F2 = 51, F3 = 52, F4 = 53, F5 = 54, F6 = 55, F7 = 56, F8 = 57, F9 = 58, F10 = 59, F11 = 60, F12 = 61, NumLock = 62, ScrollLock = 63, Spacebar = 64, Char = 65, Text = 66,
}

Variants§

§

NoKey = 0

§

Escape = 1

§

Backspace = 2

§

Tab = 3

§

Enter = 4

§

Shift = 5

§

Control = 6

§

Alt = 7

§

Pause = 8

§

CapsLock = 9

§

PageUp = 10

§

PageDown = 11

§

End = 12

§

Home = 13

§

Up = 14

§

Left = 15

§

Right = 16

§

Down = 17

§

PrintScreen = 18

§

Insert = 19

§

Delete = 20

§

LeftWin = 21

§

RightWin = 22

§

Apps = 23

§

Number0 = 24

§

Number1 = 25

§

Number2 = 26

§

Number3 = 27

§

Number4 = 28

§

Number5 = 29

§

Number6 = 30

§

Number7 = 31

§

Number8 = 32

§

Number9 = 33

§

NumPad0 = 34

§

NumPad1 = 35

§

NumPad2 = 36

§

NumPad3 = 37

§

NumPad4 = 38

§

NumPad5 = 39

§

NumPad6 = 40

§

NumPad7 = 41

§

NumPad8 = 42

§

NumPad9 = 43

§

NumPadAdd = 44

§

NumPadSubtract = 45

§

NumPadDivide = 46

§

NumPadMultiply = 47

§

NumPadDecimal = 48

§

NumPadEnter = 49

§

F1 = 50

§

F2 = 51

§

F3 = 52

§

F4 = 53

§

F5 = 54

§

F6 = 55

§

F7 = 56

§

F8 = 57

§

F9 = 58

§

F10 = 59

§

F11 = 60

§

F12 = 61

§

NumLock = 62

§

ScrollLock = 63

§

Spacebar = 64

§

Char = 65

§

Text = 66

Trait Implementations§

Source§

impl Clone for KeyCode

Source§

fn clone(&self) -> KeyCode

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 KeyCode

Source§

impl Debug for KeyCode

Source§

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

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

impl Default for KeyCode

Source§

fn default() -> KeyCode

Returns the “default value” for a type. Read more
Source§

impl PartialEq for KeyCode

Source§

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

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.