#[repr(u32)]
pub enum KeyCode {
Show 163 variants
Key1,
Key2,
Key3,
Key4,
Key5,
Key6,
Key7,
Key8,
Key9,
Key0,
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,
Escape,
F1,
F2,
F3,
F4,
F5,
F6,
F7,
F8,
F9,
F10,
F11,
F12,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21,
F22,
F23,
F24,
Snapshot,
Scroll,
Pause,
Insert,
Home,
Delete,
End,
PageDown,
PageUp,
Left,
Up,
Right,
Down,
Back,
Return,
Space,
Compose,
Caret,
Numlock,
Numpad0,
Numpad1,
Numpad2,
Numpad3,
Numpad4,
Numpad5,
Numpad6,
Numpad7,
Numpad8,
Numpad9,
AbntC1,
AbntC2,
NumpadAdd,
Apostrophe,
Apps,
Asterisk,
Plus,
At,
Ax,
Backslash,
Calculator,
Capital,
Colon,
Comma,
Convert,
NumpadDecimal,
NumpadDivide,
Equals,
Grave,
Kana,
Kanji,
LAlt,
LBracket,
LControl,
LShift,
LWin,
Mail,
MediaSelect,
MediaStop,
Minus,
NumpadMultiply,
Mute,
MyComputer,
NavigateForward,
NavigateBackward,
NextTrack,
NoConvert,
NumpadComma,
NumpadEnter,
NumpadEquals,
Oem102,
Period,
PlayPause,
Power,
PrevTrack,
RAlt,
RBracket,
RControl,
RShift,
RWin,
Semicolon,
Slash,
Sleep,
Stop,
NumpadSubtract,
Sysrq,
Tab,
Underline,
Unlabeled,
VolumeDown,
VolumeUp,
Wake,
WebBack,
WebFavorites,
WebForward,
WebHome,
WebRefresh,
WebSearch,
WebStop,
Yen,
Copy,
Paste,
Cut,
}
Expand description
The key code of a KeyboardInput
.
Usage
It is used as the generic T
value of an Input
to create a Res<Input<KeyCode>>
.
The resource stores the data of the buttons of a keyboard and can be accessed inside of a system.
Updating
The resource is updated inside of the keyboard_input_system
.
Variants
Key1
The 1
key over the letters.
Key2
The 2
key over the letters.
Key3
The 3
key over the letters.
Key4
The 4
key over the letters.
Key5
The 5
key over the letters.
Key6
The 6
key over the letters.
Key7
The 7
key over the letters.
Key8
The 8
key over the letters.
Key9
The 9
key over the letters.
Key0
The 0
key over the letters.
A
The A
key.
B
The B
key.
C
The C
key.
D
The D
key.
E
The E
key.
F
The F
key.
G
The G
key.
H
The H
key.
I
The I
key.
J
The J
key.
K
The K
key.
L
The L
key.
M
The M
key.
N
The N
key.
O
The O
key.
P
The P
key.
Q
The Q
key.
R
The R
key.
S
The S
key.
T
The T
key.
U
The U
key.
V
The V
key.
W
The W
key.
X
The X
key.
Y
The Y
key.
Z
The Z
key.
Escape
The Escape
/ ESC
key, next to the F1
key.
F1
The F1
key.
F2
The F2
key.
F3
The F3
key.
F4
The F4
key.
F5
The F5
key.
F6
The F6
key.
F7
The F7
key.
F8
The F8
key.
F9
The F9
key.
F10
The F10
key.
F11
The F11
key.
F12
The F12
key.
F13
The F13
key.
F14
The F14
key.
F15
The F15
key.
F16
The F16
key.
F17
The F17
key.
F18
The F18
key.
F19
The F19
key.
F20
The F20
key.
F21
The F21
key.
F22
The F22
key.
F23
The F23
key.
F24
The F24
key.
Snapshot
The Snapshot
/ Print Screen
key.
Scroll
The Scroll
/ Scroll Lock
key.
Pause
The Pause
/ Break
key, next to the Scroll
key.
Insert
The Insert
key, next to the Backspace
key.
Home
The Home
key.
Delete
The Delete
key.
End
The End
key.
PageDown
The PageDown
key.
PageUp
The PageUp
key.
Left
The Left
/ Left Arrow
key.
Up
The Up
/ Up Arrow
key.
Right
The Right
/ Right Arrow
key.
Down
The Down
/ Down Arrow
key.
Back
The Back
/ Backspace
key.
Return
The Return
/ Enter
key.
Space
The Space
/ Spacebar
/
key.
Compose
The Compose
key on Linux.
Caret
The Caret
/ ^
key.
Numlock
The Numlock
key.
Numpad0
The Numpad0
/ 0
key.
Numpad1
The Numpad1
/ 1
key.
Numpad2
The Numpad2
/ 2
key.
Numpad3
The Numpad3
/ 3
key.
Numpad4
The Numpad4
/ 4
key.
Numpad5
The Numpad5
/ 5
key.
Numpad6
The Numpad6
/ 6
key.
Numpad7
The Numpad7
/ 7
key.
Numpad8
The Numpad8
/ 8
key.
Numpad9
The Numpad9
/ 9
key.
AbntC1
The AbntC1
key.
AbntC2
The AbntC2
key.
NumpadAdd
The NumpadAdd
/ +
key.
Apostrophe
The Apostrophe
/ '
key.
Apps
The Apps
key.
Asterisk
The Asterik
/ *
key.
Plus
The Plus
/ +
key.
At
The At
/ @
key.
Ax
The Ax
key.
Backslash
The Backslash
/ \
key.
Calculator
The Calculator
key.
Capital
The Capital
key.
Colon
The Colon
/ :
key.
Comma
The Comma
/ ,
key.
Convert
The Convert
key.
NumpadDecimal
The NumpadDecimal
/ .
key.
NumpadDivide
The NumpadDivide
/ /
key.
Equals
The Equals
/ =
key.
Grave
The Grave
/ Backtick
/ `
key.
Kana
The Kana
key.
Kanji
The Kanji
key.
LAlt
The LAlt
/ Left Alt
key. Maps to Left Option
on Mac.
LBracket
The LBracket
/ Left Bracket
key.
LControl
The LControl
/ Left Control
key.
LShift
The LShift
/ Left Shift
key.
LWin
The LWin
/ Left Windows
key. Maps to Left Command
on Mac.
Mail
The Mail
key.
MediaSelect
The MediaSelect
key.
MediaStop
The MediaStop
key.
Minus
The Minus
/ -
key.
NumpadMultiply
The NumpadMultiply
/ *
key.
Mute
The Mute
key.
MyComputer
The MyComputer
key.
NavigateForward
The NavigateForward
/ Prior
key.
NavigateBackward
The NavigateBackward
/ Next
key.
NextTrack
The NextTrack
key.
NoConvert
The NoConvert
key.
NumpadComma
The NumpadComma
/ ,
key.
NumpadEnter
The NumpadEnter
key.
NumpadEquals
The NumpadEquals
/ =
key.
Oem102
The Oem102
key.
Period
The Period
/ .
key.
PlayPause
The PlayPause
key.
Power
The Power
key.
PrevTrack
The PrevTrack
key.
RAlt
The RAlt
/ Right Alt
key. Maps to Right Option
on Mac.
RBracket
The RBracket
/ Right Bracket
key.
RControl
The RControl
/ Right Control
key.
RShift
The RShift
/ Right Shift
key.
RWin
The RWin
/ Right Windows
key. Maps to Right Command
on Mac.
Semicolon
The Semicolon
/ ;
key.
Slash
The Slash
/ /
key.
Sleep
The Sleep
key.
Stop
The Stop
key.
NumpadSubtract
The NumpadSubtract
/ -
key.
Sysrq
The Sysrq
key.
Tab
The Tab
/
key.
Underline
The Underline
/ _
key.
Unlabeled
The Unlabeled
key.
VolumeDown
The VolumeDown
key.
VolumeUp
The VolumeUp
key.
Wake
The Wake
key.
WebBack
The WebBack
key.
WebFavorites
The WebFavorites
key.
WebForward
The WebForward
key.
WebHome
The WebHome
key.
WebRefresh
The WebRefresh
key.
WebSearch
The WebSearch
key.
WebStop
The WebStop
key.
Yen
The Yen
key.
Copy
The Copy
key.
Paste
The Paste
key.
Cut
The Cut
key.
Trait Implementations
impl Ord for KeyCode
impl Ord for KeyCode
1.21.0 · sourcefn max(self, other: Self) -> Self
fn max(self, other: Self) -> Self
Compares and returns the maximum of two values. Read more
1.21.0 · sourcefn min(self, other: Self) -> Self
fn min(self, other: Self) -> Self
Compares and returns the minimum of two values. Read more
1.50.0 · sourcefn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
fn clamp(self, min: Self, max: Self) -> Self where
Self: PartialOrd<Self>,
Restrict a value to a certain interval. Read more
impl PartialEq<KeyCode> for KeyCode
impl PartialEq<KeyCode> for KeyCode
impl PartialOrd<KeyCode> for KeyCode
impl PartialOrd<KeyCode> for KeyCode
fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>
fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>
This method returns an ordering between self
and other
values if one exists. Read more
1.0.0 · sourcefn lt(&self, other: &Rhs) -> bool
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 · sourcefn le(&self, other: &Rhs) -> bool
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
impl Copy for KeyCode
impl Eq for KeyCode
impl StructuralEq for KeyCode
impl StructuralPartialEq for KeyCode
Auto Trait Implementations
impl RefUnwindSafe for KeyCode
impl Send for KeyCode
impl Sync for KeyCode
impl Unpin for KeyCode
impl UnwindSafe for KeyCode
Blanket Implementations
impl<T, U> AsBindGroupShaderType<U> for T where
U: ShaderType,
&'a T: for<'a> Into<U>,
impl<T, U> AsBindGroupShaderType<U> for T where
U: ShaderType,
&'a T: for<'a> Into<U>,
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
fn as_bind_group_shader_type(
&self,
_images: &HashMap<Handle<Image>, <Image as RenderAsset>::PreparedAsset, RandomState, Global>
) -> U
Return the T
ShaderType
for self
. When used in AsBindGroup
derives, it is safe to assume that all images in self
exist. Read more
sourceimpl<T> BorrowMut<T> for T where
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
const: unstable · sourcefn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Mutably borrows from an owned value. Read more
impl<T> Downcast for T where
T: Any,
impl<T> Downcast for T where
T: Any,
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
fn into_any(self: Box<T, Global>) -> Box<dyn Any + 'static, Global>
Convert Box<dyn Trait>
(where Trait: Downcast
) to Box<dyn Any>
. Box<dyn Any>
can
then be further downcast
into Box<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any + 'static>
Convert Rc<Trait>
(where Trait: Downcast
) to Rc<Any>
. Rc<Any>
can then be
further downcast
into Rc<ConcreteType>
where ConcreteType
implements Trait
. Read more
fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
Convert &Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &Any
’s vtable from &Trait
’s. Read more
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
Convert &mut Trait
(where Trait: Downcast
) to &Any
. This is needed since Rust cannot
generate &mut Any
’s vtable from &mut Trait
’s. Read more
sourceimpl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
impl<Q, K> Equivalent<K> for Q where
Q: Eq + ?Sized,
K: Borrow<Q> + ?Sized,
sourcefn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
Compare self to key
and return true
if they are equal.
sourceimpl<T> Instrument for T
impl<T> Instrument for T
sourcefn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn instrument(self, span: Span) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
sourcefn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
fn in_current_span(self) -> Instrumented<Self>ⓘNotable traits for Instrumented<T>impl<T> Future for Instrumented<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
impl<T> TypeData for T where
T: 'static + Send + Sync + Clone,
fn clone_type_data(&self) -> Box<dyn TypeData + 'static, Global>
sourceimpl<T> WithSubscriber for T
impl<T> WithSubscriber for T
sourcefn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
where
S: Into<Dispatch>,
T: Future, type Output = <T as Future>::Output;
Attaches the provided Subscriber
to this type, returning a
WithDispatch
wrapper. Read more
sourcefn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
fn with_current_subscriber(self) -> WithDispatch<Self>ⓘNotable traits for WithDispatch<T>impl<T> Future for WithDispatch<T> where
T: Future, type Output = <T as Future>::Output;
T: Future, type Output = <T as Future>::Output;
Attaches the current default Subscriber
to this type, returning a
WithDispatch
wrapper. Read more