#[non_exhaustive]#[repr(i32)]pub enum Key {
Show 133 variants
None = 0,
Back = 2,
Tab = 3,
Return = 6,
Pause = 7,
CapsLock = 8,
Escape = 13,
Space = 18,
PageUp = 19,
PageDown = 20,
End = 21,
Home = 22,
Left = 23,
Up = 24,
Right = 25,
Down = 26,
PrintScreen = 30,
Insert = 31,
Delete = 32,
Help = 33,
D0 = 34,
D1 = 35,
D2 = 36,
D3 = 37,
D4 = 38,
D5 = 39,
D6 = 40,
D7 = 41,
D8 = 42,
D9 = 43,
A = 44,
B = 45,
C = 46,
D = 47,
E = 48,
F = 49,
G = 50,
H = 51,
I = 52,
J = 53,
K = 54,
L = 55,
M = 56,
N = 57,
O = 58,
P = 59,
Q = 60,
R = 61,
S = 62,
T = 63,
U = 64,
V = 65,
W = 66,
X = 67,
Y = 68,
Z = 69,
LWin = 70,
RWin = 71,
Apps = 72,
NumPad0 = 74,
NumPad1 = 75,
NumPad2 = 76,
NumPad3 = 77,
NumPad4 = 78,
NumPad5 = 79,
NumPad6 = 80,
NumPad7 = 81,
NumPad8 = 82,
NumPad9 = 83,
Multiply = 84,
Add = 85,
Subtract = 87,
Decimal = 88,
Divide = 89,
F1 = 90,
F2 = 91,
F3 = 92,
F4 = 93,
F5 = 94,
F6 = 95,
F7 = 96,
F8 = 97,
F9 = 98,
F10 = 99,
F11 = 100,
F12 = 101,
F13 = 102,
F14 = 103,
F15 = 104,
F16 = 105,
F17 = 106,
F18 = 107,
F19 = 108,
F20 = 109,
F21 = 110,
F22 = 111,
F23 = 112,
F24 = 113,
NumLock = 114,
ScrollLock = 115,
LeftShift = 116,
RightShift = 117,
LeftCtrl = 118,
RightCtrl = 119,
LeftAlt = 120,
RightAlt = 121,
OemSemicolon = 140,
OemPlus = 141,
OemComma = 142,
OemMinus = 143,
OemPeriod = 144,
OemSlash = 145,
OemTilde = 146,
OemOpenBrackets = 149,
OemPipe = 150,
OemCloseBrackets = 151,
OemQuotes = 152,
GamepadLeft = 175,
GamepadUp = 176,
GamepadRight = 177,
GamepadDown = 178,
GamepadAccept = 179,
GamepadCancel = 180,
GamepadMenu = 181,
GamepadView = 182,
GamepadPageUp = 183,
GamepadPageDown = 184,
GamepadPageLeft = 185,
GamepadPageRight = 186,
GamepadContext1 = 187,
GamepadContext2 = 188,
GamepadContext3 = 189,
GamepadContext4 = 190,
}Expand description
Common subset of Noesis::Key from NsGui/InputEnums.h. Values are the
C++ enum ordinals, validated by static_assert in noesis_view.cpp.
View::key_down takes this typed enum, so a key outside the subset can’t
be sent until it is added here — add the variant (with a matching assert in
C++) to centralize the mapping.
Variants (Non-exhaustive)§
This enum is marked as non-exhaustive
None = 0
Back = 2
Tab = 3
Return = 6
Pause = 7
CapsLock = 8
Escape = 13
Space = 18
PageUp = 19
PageDown = 20
End = 21
Home = 22
Left = 23
Up = 24
Right = 25
Down = 26
PrintScreen = 30
Insert = 31
Delete = 32
Help = 33
D0 = 34
D1 = 35
D2 = 36
D3 = 37
D4 = 38
D5 = 39
D6 = 40
D7 = 41
D8 = 42
D9 = 43
A = 44
B = 45
C = 46
D = 47
E = 48
F = 49
G = 50
H = 51
I = 52
J = 53
K = 54
L = 55
M = 56
N = 57
O = 58
P = 59
Q = 60
R = 61
S = 62
T = 63
U = 64
V = 65
W = 66
X = 67
Y = 68
Z = 69
LWin = 70
RWin = 71
Apps = 72
NumPad0 = 74
NumPad1 = 75
NumPad2 = 76
NumPad3 = 77
NumPad4 = 78
NumPad5 = 79
NumPad6 = 80
NumPad7 = 81
NumPad8 = 82
NumPad9 = 83
Multiply = 84
Add = 85
Subtract = 87
Decimal = 88
Divide = 89
F1 = 90
F2 = 91
F3 = 92
F4 = 93
F5 = 94
F6 = 95
F7 = 96
F8 = 97
F9 = 98
F10 = 99
F11 = 100
F12 = 101
F13 = 102
F14 = 103
F15 = 104
F16 = 105
F17 = 106
F18 = 107
F19 = 108
F20 = 109
F21 = 110
F22 = 111
F23 = 112
F24 = 113
NumLock = 114
ScrollLock = 115
LeftShift = 116
RightShift = 117
LeftCtrl = 118
RightCtrl = 119
LeftAlt = 120
RightAlt = 121
OemSemicolon = 140
Semicolon / colon on US layouts (Key_Oem1 / Key_OemSemicolon).
OemPlus = 141
= / + (Key_OemPlus).
OemComma = 142
OemMinus = 143
OemPeriod = 144
OemSlash = 145
/ / ? (Key_Oem2 / Key_OemQuestion).
OemTilde = 146
Backtick / tilde (Key_Oem3 / Key_OemTilde).
OemOpenBrackets = 149
[ / { (Key_Oem4 / Key_OemOpenBrackets).
OemPipe = 150
\ / | (Key_Oem5 / Key_OemPipe).
OemCloseBrackets = 151
] / } (Key_Oem6 / Key_OemCloseBrackets).
OemQuotes = 152
' / " (Key_Oem7 / Key_OemQuotes).
GamepadLeft = 175
Gamepad D-pad / left-stick left. Drives directional focus navigation (moves focus left) when the focused element uses Noesis directional nav.
GamepadUp = 176
Gamepad D-pad / left-stick up. Moves directional focus up.
GamepadRight = 177
Gamepad D-pad / left-stick right. Moves directional focus right.
GamepadDown = 178
Gamepad D-pad / left-stick down. Moves directional focus down.
GamepadAccept = 179
Gamepad A / accept button. Activates the focused control (like
Return) and engages focus scopes.
GamepadCancel = 180
Gamepad B / cancel button. Cancels / disengages the current focus
scope (like Escape).
GamepadMenu = 181
Gamepad menu / start button.
GamepadView = 182
Gamepad view / back button.
GamepadPageUp = 183
Gamepad page up (typically a shoulder/bumper), for paged scrolling.
GamepadPageDown = 184
Gamepad page down (typically a shoulder/bumper), for paged scrolling.
GamepadPageLeft = 185
Gamepad page left (typically a trigger), for horizontal paged scrolling.
GamepadPageRight = 186
Gamepad page right (typically a trigger), for horizontal paged scrolling.
GamepadContext1 = 187
Gamepad context-action button 1 (Key_GamepadContext1), free for
app-defined bindings.
GamepadContext2 = 188
Gamepad context-action button 2 (Key_GamepadContext2).
GamepadContext3 = 189
Gamepad context-action button 3 (Key_GamepadContext3).
GamepadContext4 = 190
Gamepad context-action button 4 (Key_GamepadContext4).
Trait Implementations§
impl Copy for Key
impl Eq for Key
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, U> AsBindGroupShaderType<U> for T
impl<T, U> AsBindGroupShaderType<U> for T
Source§fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
fn as_bind_group_shader_type(&self, _images: &RenderAssets<GpuImage>) -> U
T ShaderType for self. When used in AsBindGroup
derives, it is safe to assume that all images in self exist.Source§impl<T> BorrowMut<T> for Twhere
T: ?Sized,
impl<T> BorrowMut<T> for Twhere
T: ?Sized,
Source§fn borrow_mut(&mut self) -> &mut T
fn borrow_mut(&mut self) -> &mut T
Source§impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> CloneToUninit for Twhere
T: Clone,
impl<T> ConditionalSend for Twhere
T: Send,
Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
Box<dyn Trait> (where Trait: Downcast) to Box<dyn Any>, which can then be
downcast into Box<dyn ConcreteType> where ConcreteType implements Trait.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>, which can then be further
downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> Downcast for Twhere
T: Any,
impl<T> Downcast for Twhere
T: Any,
Source§fn into_any(self: Box<T>) -> Box<dyn Any>
fn into_any(self: Box<T>) -> Box<dyn Any>
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.Source§fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
fn into_any_rc(self: Rc<T>) -> Rc<dyn Any>
Rc<Trait> (where Trait: Downcast) to Rc<Any>. Rc<Any> can then be
further downcast into Rc<ConcreteType> where ConcreteType implements Trait.Source§fn as_any(&self) -> &(dyn Any + 'static)
fn as_any(&self) -> &(dyn Any + 'static)
&Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &Any’s vtable from &Trait’s.Source§fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
fn as_any_mut(&mut self) -> &mut (dyn Any + 'static)
&mut Trait (where Trait: Downcast) to &Any. This is needed since Rust cannot
generate &mut Any’s vtable from &mut Trait’s.Source§impl<T> DowncastSend for T
impl<T> DowncastSend for T
Source§impl<T> DowncastSync for T
impl<T> DowncastSync for T
impl<S, T> Duplex<S> for Twhere
T: FromSample<S> + ToSample<S>,
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§fn equivalent(&self, key: &K) -> bool
fn equivalent(&self, key: &K) -> bool
key and return true if they are equal.Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
Source§impl<Q, K> Equivalent<K> for Q
impl<Q, K> Equivalent<K> for Q
impl<T> ErasedDestructor for Twhere
T: 'static,
Source§impl<S> FromSample<S> for S
impl<S> FromSample<S> for S
fn from_sample_(s: S) -> S
Source§impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T, W> HasTypeWitness<W> for Twhere
W: MakeTypeWitness<Arg = T>,
T: ?Sized,
impl<T> HitDataExtra for T
Source§impl<T> Identity for Twhere
T: ?Sized,
impl<T> Identity for Twhere
T: ?Sized,
Source§impl<T> Instrument for T
impl<T> Instrument for T
Source§fn instrument(self, span: Span) -> Instrumented<Self>
fn instrument(self, span: Span) -> Instrumented<Self>
Source§fn in_current_span(self) -> Instrumented<Self>
fn in_current_span(self) -> Instrumented<Self>
Source§impl<T> IntoEither for T
impl<T> IntoEither for T
Source§fn into_either(self, into_left: bool) -> Either<Self, Self>
fn into_either(self, into_left: bool) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left is true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read moreSource§fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
fn into_either_with<F>(self, into_left: F) -> Either<Self, Self>
self into a Left variant of Either<Self, Self>
if into_left(&self) returns true.
Converts self into a Right variant of Either<Self, Self>
otherwise. Read more