Skip to main content

Key

Enum Key 

Source
pub enum Key {
Show 100 variants NUM_LOCK, CLEAR, HELP, ALT, BACKSPACE, CAPS_LOCK, CONTROL, DELETE, DOWN, END, ENTER, ESCAPE, F1, F10, F11, F12, F13, F14, F15, F2, F3, F4, F5, F6, F7, F8, F9, HOME, INSERT, LEFT, NUMPAD_0, NUMPAD_1, NUMPAD_2, NUMPAD_3, NUMPAD_4, NUMPAD_5, NUMPAD_6, NUMPAD_7, NUMPAD_8, NUMPAD_9, NUMPAD_ADD, NUMPAD_DECIMAL, NUMPAD_DIVIDE, NUMPAD_ENTER, NUMPAD_MULTIPLY, NUMPAD_SUBTRACT, PAGE_DOWN, PAGE_UP, RIGHT, SHIFT, SPACE, TAB, UP, A, B, C, D, E, F, G, H, I, J, K, L, M, N, O, P, Q, R, S, T, U, V, W, X, Y, Z, NUMBER_0, NUMBER_1, NUMBER_2, NUMBER_3, NUMBER_4, NUMBER_5, NUMBER_6, NUMBER_7, NUMBER_8, NUMBER_9, COLON, EQUALS, HYPHEN, SLASH, TILDE, SQUARELEFT, SQUARERIGHT, BACKSLASH, APOSTROPHE, TOPLEFT, CUSTOM { value: u32, },
}
Expand description

Representing the keys on a Keyboard for use in the InputKeyboard virtual controller.

Can be extended with Custom by using concrete project values.

Variants§

§

NUM_LOCK

§

CLEAR

§

HELP

§

ALT

§

BACKSPACE

§

CAPS_LOCK

§

CONTROL

§

DELETE

§

DOWN

§

END

§

ENTER

§

ESCAPE

§

F1

§

F10

§

F11

§

F12

§

F13

§

F14

§

F15

§

F2

§

F3

§

F4

§

F5

§

F6

§

F7

§

F8

§

F9

§

HOME

§

INSERT

§

LEFT

§

NUMPAD_0

§

NUMPAD_1

§

NUMPAD_2

§

NUMPAD_3

§

NUMPAD_4

§

NUMPAD_5

§

NUMPAD_6

§

NUMPAD_7

§

NUMPAD_8

§

NUMPAD_9

§

NUMPAD_ADD

§

NUMPAD_DECIMAL

§

NUMPAD_DIVIDE

§

NUMPAD_ENTER

§

NUMPAD_MULTIPLY

§

NUMPAD_SUBTRACT

§

PAGE_DOWN

§

PAGE_UP

§

RIGHT

§

SHIFT

§

SPACE

§

TAB

§

UP

§

A

§

B

§

C

§

D

§

E

§

F

§

G

§

H

§

I

§

J

§

K

§

L

§

M

§

N

§

O

§

P

§

Q

§

R

§

S

§

T

§

U

§

V

§

W

§

X

§

Y

§

Z

§

NUMBER_0

§

NUMBER_1

§

NUMBER_2

§

NUMBER_3

§

NUMBER_4

§

NUMBER_5

§

NUMBER_6

§

NUMBER_7

§

NUMBER_8

§

NUMBER_9

§

COLON

§

EQUALS

§

HYPHEN

§

SLASH

§

TILDE

§

SQUARELEFT

§

SQUARERIGHT

§

BACKSLASH

§

APOSTROPHE

§

TOPLEFT

§

CUSTOM

Allows EKey to be extended (e.g. for using non US / English keyboards).

Fields

§value: u32

Custom value

Trait Implementations§

Source§

impl Clone for Key

Source§

fn clone(&self) -> Key

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 Key

Source§

impl Debug for Key

Source§

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

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

impl Eq for Key

Source§

impl PartialEq for Key

Source§

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

Equality operator ==. Read more
1.0.0 (const: unstable) · Source§

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

Inequality operator !=. Read more
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 UnsafeUnpin 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<Fr, To> IntoColor<To> for Fr
where To: FromColor<Fr>,

Source§

fn into_color(self) -> To

Convert into color
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.