Enum Key

Source
pub enum Key {
Show 64 variants None = 0, ESC = 1, One = 2, Two = 3, Three = 4, Four = 5, Five = 6, Six = 7, Seven = 8, Eight = 9, Nine = 10, Zero = 11, Minus = 12, Equal = 13, BackSpace = 14, Tab = 15, Q = 16, W = 17, E = 18, R = 19, T = 20, Y = 21, U = 22, I = 23, O = 24, P = 25, LSB = 26, RSB = 27, Enter = 28, LCTRL = 29, A = 30, S = 31, D = 32, F = 33, G = 34, H = 35, J = 36, K = 37, L = 38, Colon = 39, SineglePoint = 40, Point = 41, LSHIFT = 42, BackSlash = 43, Z = 44, X = 45, C = 46, V = 47, B = 48, N = 49, M = 50, Comma = 51, Dot = 52, Slash = 53, RSHIFT = 54, DPSTAR = 55, LALT = 56, Space = 57, CAPS = 58, MouseScrollDown = 336, MouseScrollUp = 337, MouseLeft = 272, MouseRight = 273, MouseMid = 274,
}

Variants§

§

None = 0

§

ESC = 1

§

One = 2

§

Two = 3

§

Three = 4

§

Four = 5

§

Five = 6

§

Six = 7

§

Seven = 8

§

Eight = 9

§

Nine = 10

§

Zero = 11

§

Minus = 12

§

Equal = 13

§

BackSpace = 14

§

Tab = 15

§

Q = 16

§

W = 17

§

E = 18

§

R = 19

§

T = 20

§

Y = 21

§

U = 22

§

I = 23

§

O = 24

§

P = 25

§

LSB = 26

§

RSB = 27

§

Enter = 28

§

LCTRL = 29

§

A = 30

§

S = 31

§

D = 32

§

F = 33

§

G = 34

§

H = 35

§

J = 36

§

K = 37

§

L = 38

§

Colon = 39

§

SineglePoint = 40

§

Point = 41

§

LSHIFT = 42

§

BackSlash = 43

§

Z = 44

§

X = 45

§

C = 46

§

V = 47

§

B = 48

§

N = 49

§

M = 50

§

Comma = 51

§

Dot = 52

§

Slash = 53

§

RSHIFT = 54

§

DPSTAR = 55

§

LALT = 56

§

Space = 57

§

CAPS = 58

§

MouseScrollDown = 336

§

MouseScrollUp = 337

§

MouseLeft = 272

§

MouseRight = 273

§

MouseMid = 274

Implementations§

Source§

impl Key

Source

pub fn from_code(code: usize) -> Result<Key, ()>

Source

pub fn to_char(&self) -> Result<char, ()>

Trait Implementations§

Source§

impl Clone for Key

Source§

fn clone(&self) -> Key

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 Key

Source§

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

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

impl PartialEq for Key

Source§

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