#[repr(u32)]pub enum NonPrintableKey {
Show 59 variants
Unidentified = 0,
Alt = 17,
AltGraph = 18,
CapsLock = 19,
Control = 20,
Fn = 21,
FnLock = 22,
Meta = 23,
NumLock = 24,
ScrollLock = 25,
Shift = 26,
Symbol = 27,
SymbolLock = 28,
Hyper = 29,
Super = 30,
Enter = 49,
Tab = 50,
Backspace = 65,
Down = 97,
Left = 98,
Right = 99,
Up = 100,
End = 101,
Home = 102,
PageDown = 103,
PageUp = 104,
Escape = 24_581,
Select = 24_588,
BrightnessDown = 28_672,
BrightnessUp = 28_673,
F1 = 36_865,
F2 = 36_866,
F3 = 36_867,
F4 = 36_868,
F5 = 36_869,
F6 = 36_870,
F7 = 36_871,
F8 = 36_872,
F9 = 36_873,
F10 = 36_874,
F11 = 36_875,
F12 = 36_876,
Soft1 = 36_881,
Soft2 = 36_882,
Soft3 = 36_883,
Soft4 = 36_884,
MediaPlayPause = 40_968,
AudioVolumeDown = 49_162,
AudioVolumeUp = 49_163,
AudioVolumeMute = 49_164,
BrowserBack = 61_440,
BrowserFavorites = 61_441,
BrowserForward = 61_442,
BrowserHome = 61_443,
BrowserRefresh = 61_444,
BrowserSearch = 61_445,
BrowserStop = 61_446,
ZoomToggle = 73_799,
UnknownOrdinal_(u32),
}Expand description
NonPrintableKey represents the meaning of a non-symbolic key on a keyboard.
The definition of each key is derived from W3C named values of a key attribute.
§API version 9 and onwards
Starting from API version 9, the enum value space is subdivided based on the subsection numbers of the section Named Key Attribute Values, multiplied by 0x1000.
For example, the keys from section 3.10 Multimedia keys will be located
at 0xa000-0xafff. The values and reservations that were present
in this enum prior to the introduction of the convention have not been moved,
and values that go logically into pre-existing sections have been inserted
into their logical place using the prior convention (see below). This allows
us to extract the section ranges if this is for some reason useful to the
application.
§Prior to API version 9
The space of the nonprintable keys is subdivided roughly to correspond to the subsections of Section 3 of the document Named Key Attribute Values. The choice for the section values is arbitrary, so long as blocks of values are allocated at once, and the keys with similar purpose are kept together.
§Reserved ranges
The space of possible values for NonPrintableKey is subdivided into a number of ranges, with the intention that the enum values are placed in the appropriate range when added.
- Special keys: 0x00-0x10
- Modifier keys: 0x11-0x30
- Whitespace keys: 0x31-0x40
- Navigation keys: 0x61-0x80
- General-purpose function keys: 0x9000-0x9FFF
Variants§
Unidentified = 0
Alt = 17
AltGraph = 18
CapsLock = 19
Control = 20
Fn = 21
FnLock = 22
Meta = 23
NumLock = 24
ScrollLock = 25
Shift = 26
Symbol = 27
SymbolLock = 28
Hyper = 29
Super = 30
Enter = 49
Tab = 50
Backspace = 65
Down = 97
Left = 98
Right = 99
Up = 100
End = 101
Home = 102
PageDown = 103
PageUp = 104
Escape = 24_581
Select = 24_588
BrightnessDown = 28_672
BrightnessUp = 28_673
F1 = 36_865
F2 = 36_866
F3 = 36_867
F4 = 36_868
F5 = 36_869
F6 = 36_870
F7 = 36_871
F8 = 36_872
F9 = 36_873
F10 = 36_874
F11 = 36_875
F12 = 36_876
Soft1 = 36_881
Soft2 = 36_882
Soft3 = 36_883
Soft4 = 36_884
MediaPlayPause = 40_968
AudioVolumeDown = 49_162
AudioVolumeUp = 49_163
AudioVolumeMute = 49_164
BrowserBack = 61_440
BrowserFavorites = 61_441
BrowserForward = 61_442
BrowserHome = 61_443
BrowserRefresh = 61_444
BrowserSearch = 61_445
BrowserStop = 61_446
ZoomToggle = 73_799
UnknownOrdinal_(u32)
Trait Implementations§
Source§impl Clone for NonPrintableKey
impl Clone for NonPrintableKey
Source§fn clone(&self) -> NonPrintableKey
fn clone(&self) -> NonPrintableKey
1.0.0 (const: unstable) · Source§fn clone_from(&mut self, source: &Self)
fn clone_from(&mut self, source: &Self)
source. Read moreimpl Copy for NonPrintableKey
Source§impl Debug for NonPrintableKey
impl Debug for NonPrintableKey
Source§impl<___E> Encode<NonPrintableKey, ___E> for NonPrintableKeywhere
___E: ?Sized,
impl<___E> Encode<NonPrintableKey, ___E> for NonPrintableKeywhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<NonPrintableKey>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<NonPrintableKey>, _: (), ) -> Result<(), EncodeError>
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
Source§impl<'a, ___E> Encode<NonPrintableKey, ___E> for &'a NonPrintableKeywhere
___E: ?Sized,
impl<'a, ___E> Encode<NonPrintableKey, ___E> for &'a NonPrintableKeywhere
___E: ?Sized,
Source§fn encode(
self,
encoder: &mut ___E,
out: &mut MaybeUninit<NonPrintableKey>,
_: (),
) -> Result<(), EncodeError>
fn encode( self, encoder: &mut ___E, out: &mut MaybeUninit<NonPrintableKey>, _: (), ) -> Result<(), EncodeError>
§const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
const COPY_OPTIMIZATION: CopyOptimization<Self, W> = _
impl Eq for NonPrintableKey
Source§impl From<NonPrintableKey> for u32
impl From<NonPrintableKey> for u32
Source§fn from(value: NonPrintableKey) -> Self
fn from(value: NonPrintableKey) -> Self
Source§impl From<NonPrintableKey> for NonPrintableKey
impl From<NonPrintableKey> for NonPrintableKey
Source§fn from(wire: NonPrintableKey) -> Self
fn from(wire: NonPrintableKey) -> Self
Source§impl From<NonPrintableKey> for NonPrintableKey
impl From<NonPrintableKey> for NonPrintableKey
Source§fn from(natural: NonPrintableKey) -> Self
fn from(natural: NonPrintableKey) -> Self
Source§impl From<u32> for NonPrintableKey
impl From<u32> for NonPrintableKey
Source§impl FromWire<NonPrintableKey> for NonPrintableKey
impl FromWire<NonPrintableKey> for NonPrintableKey
Source§fn from_wire(wire: NonPrintableKey) -> Self
fn from_wire(wire: NonPrintableKey) -> Self
§const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
const COPY_OPTIMIZATION: CopyOptimization<W, Self> = _
Source§impl FromWireRef<NonPrintableKey> for NonPrintableKey
impl FromWireRef<NonPrintableKey> for NonPrintableKey
Source§fn from_wire_ref(wire: &NonPrintableKey) -> Self
fn from_wire_ref(wire: &NonPrintableKey) -> Self
Source§impl Hash for NonPrintableKey
impl Hash for NonPrintableKey
Source§impl Ord for NonPrintableKey
impl Ord for NonPrintableKey
Source§fn cmp(&self, other: &NonPrintableKey) -> Ordering
fn cmp(&self, other: &NonPrintableKey) -> Ordering
1.21.0 (const: unstable) · Source§fn max(self, other: Self) -> Selfwhere
Self: Sized,
fn max(self, other: Self) -> Selfwhere
Self: Sized,
1.21.0 (const: unstable) · Source§fn min(self, other: Self) -> Selfwhere
Self: Sized,
fn min(self, other: Self) -> Selfwhere
Self: Sized,
Source§impl PartialEq for NonPrintableKey
impl PartialEq for NonPrintableKey
Source§impl PartialOrd for NonPrintableKey
impl PartialOrd for NonPrintableKey
impl StructuralPartialEq for NonPrintableKey
Auto Trait Implementations§
impl Freeze for NonPrintableKey
impl RefUnwindSafe for NonPrintableKey
impl Send for NonPrintableKey
impl Sync for NonPrintableKey
impl Unpin for NonPrintableKey
impl UnsafeUnpin for NonPrintableKey
impl UnwindSafe for NonPrintableKey
Blanket Implementations§
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, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
impl<T, W> FromWireOption<Box<'_, W>> for Twhere
T: FromWire<W>,
§fn from_wire_option(wire: Box<'_, W>) -> Option<T>
fn from_wire_option(wire: Box<'_, W>) -> Option<T>
§impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
impl<T, W> FromWireOptionRef<Box<'_, W>> for Twhere
T: FromWireRef<W>,
§fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
fn from_wire_option_ref(wire: &Box<'_, W>) -> Option<T>
§impl<T> InstanceFromServiceTransport<T> for T
impl<T> InstanceFromServiceTransport<T> for T
§fn from_service_transport(handle: T) -> T
fn from_service_transport(handle: T) -> T
T to [Self]