fidl_fuchsia_ui_input3

Enum NonPrintableKey

Source
pub enum NonPrintableKey {
Show 58 variants Unidentified, Alt, AltGraph, CapsLock, Control, Fn, FnLock, Meta, NumLock, ScrollLock, Shift, Symbol, SymbolLock, Hyper, Super, Enter, Tab, Backspace, Down, Left, Right, Up, End, Home, PageDown, PageUp, Escape, Select, BrightnessDown, BrightnessUp, F1, F2, F3, F4, F5, F6, F7, F8, F9, F10, F11, F12, Soft1, Soft2, Soft3, Soft4, MediaPlayPause, AudioVolumeDown, AudioVolumeUp, AudioVolumeMute, BrowserBack, BrowserFavorites, BrowserForward, BrowserHome, BrowserRefresh, BrowserSearch, BrowserStop, ZoomToggle, // some variants omitted
}
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

This key value is used when an implementation is unable to identify another key value, due to either hardware, platform, or software constraints.

§

Alt

The Alt (Alternative) key.

This key enables the alternate modifier function for interpreting concurrent or subsequent keyboard input. This key value is also used for the Apple Option key.

§

AltGraph

The Alternate Graphics (AltGr or AltGraph).

This key is used enable the ISO Level 3 shift modifier (the standard Shift key is the level 2 modifier). See ISO9995-1.

§

CapsLock

The Caps Lock (Capital) key.

Toggle capital character lock function for interpreting subsequent keyboard input event.

§

Control

The Control or Ctrl key, to enable control modifier function for interpreting concurrent or subsequent keyboard input.

§

Fn

The Function switch Fn key.

Activating this key simultaneously with another key changes that key’s value to an alternate character or function. This key is often handled directly in the keyboard hardware and does not usually generate key events.

§

FnLock

The Function-Lock (FnLock or F-Lock) key.

Activating this key switches the mode of the keyboard to changes some keys’ values to an alternate character or function. This key is often handled directly in the keyboard hardware and does not usually generate key events.

§

Meta

The Meta key, to enable meta modifier function for interpreting concurrent or subsequent keyboard input.

This key value is used for the Windows Logo key and the Apple Command or ⌘ key.

§

NumLock

The NumLock or Number Lock key, to toggle numpad mode function for interpreting subsequent keyboard input.

§

ScrollLock

The Scroll Lock key, to toggle between scrolling and cursor movement modes.

§

Shift

The Shift key, to enable shift modifier function for interpreting concurrent or subsequent keyboard input.

§

Symbol

The Symbol modifier key (used on some virtual keyboards).

§

SymbolLock

The Symbol Lock key.

§

Hyper

The Hyper key. A legacy modifier.

§

Super

The Super key. A legacy modifier.

§

Enter

The Enter or ↵ key, to activate current selection or accept current input. This key value is also used for the Return (Macintosh numpad) key.

§

Tab

The Horizontal Tabulation Tab key.

§

Backspace

Delete the character immediately preceding the cursor (i.e. the character to the left for LTR languages).

§

Down

The down arrow navigation key.

§

Left

The left arrow navigation key.

§

Right

The right arrow navigation key.

§

Up

The up arrow navigation key.

§

End

The “End” key.

§

Home

The “Home” key.

§

PageDown

The “Page Down” key.

§

PageUp

The “Page Up” key.

§

Escape

The Escape or Esc key.

§

Select

The Select key. Used to select the window of a task to focus on.

§

BrightnessDown

The Brightness Down key. Typically controls the display brightness.

§

BrightnessUp

The Brightness Up key. Typically controls the display brightness.

§

F1

The F1 key, a general purpose function key, as index 1.

§

F2

The F2 key, a general purpose function key, as index 2.

§

F3

The F3 key, a general purpose function key, as index 3.

§

F4

The F4 key, a general purpose function key, as index 4.

§

F5

The F5 key, a general purpose function key, as index 5.

§

F6

The F6 key, a general purpose function key, as index 6.

§

F7

The F7 key, a general purpose function key, as index 7.

§

F8

The F8 key, a general purpose function key, as index 8.

§

F9

The F9 key, a general purpose function key, as index 9.

§

F10

The F10 key, a general purpose function key, as index 10.

§

F11

The F11 key, a general purpose function key, as index 11.

§

F12

The F1 key, a general purpose function key, as index 12.

§

Soft1

General purpose virtual function key, as index 1.

§

Soft2

General purpose virtual function key, as index 2.

§

Soft3

General purpose virtual function key, as index 3.

§

Soft4

General purpose virtual function key, as index 4.

§

MediaPlayPause

Pause the currently playing media.

NOTE: Media controller devices should use this value rather than PAUSE for their pause keys.

§

AudioVolumeDown

Decrease audio volume.

§

AudioVolumeUp

Increase audio volume.

§

AudioVolumeMute

Toggle between muted state and prior volume level.

§

BrowserBack

Navigate to previous content or page in current history.

§

BrowserFavorites

Open the list of browser favorites.

§

BrowserForward

Navigate to next content or page in current history.

§

BrowserHome

Go to the user’s preferred home page.

§

BrowserRefresh

Refresh the current page or content.

§

BrowserSearch

Call up the user’s preferred search page.

§

BrowserStop

§

ZoomToggle

Toggle between full-screen and scaled content, or alter magnification level.

Implementations§

Source§

impl NonPrintableKey

Source

pub fn from_primitive(prim: u32) -> Option<Self>

Source

pub fn from_primitive_allow_unknown(prim: u32) -> Self

Source

pub fn unknown() -> Self

Source

pub const fn into_primitive(self) -> u32

Source

pub fn is_unknown(&self) -> bool

Trait Implementations§

Source§

impl Clone for NonPrintableKey

Source§

fn clone(&self) -> NonPrintableKey

Returns a copy 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 NonPrintableKey

Source§

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

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

impl<D: ResourceDialect> Decode<NonPrintableKey, D> for NonPrintableKey

Source§

fn new_empty() -> Self

Creates a valid instance of Self. The specific value does not matter, since it will be overwritten by decode.
Source§

unsafe fn decode( &mut self, decoder: &mut Decoder<'_, D>, offset: usize, _depth: Depth, ) -> Result<()>

Decodes an object of type T from the decoder’s buffers into self. Read more
Source§

impl<D: ResourceDialect> Encode<NonPrintableKey, D> for NonPrintableKey

Source§

unsafe fn encode( self, encoder: &mut Encoder<'_, D>, offset: usize, _depth: Depth, ) -> Result<()>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
Source§

impl Hash for NonPrintableKey

Source§

fn hash<__H: Hasher>(&self, state: &mut __H)

Feeds this value into the given Hasher. Read more
1.3.0 · Source§

fn hash_slice<H>(data: &[Self], state: &mut H)
where H: Hasher, Self: Sized,

Feeds a slice of this type into the given Hasher. Read more
Source§

impl Ord for NonPrintableKey

Source§

fn cmp(&self, other: &NonPrintableKey) -> Ordering

This method returns an Ordering between self and other. Read more
1.21.0 · Source§

fn max(self, other: Self) -> Self
where Self: Sized,

Compares and returns the maximum of two values. Read more
1.21.0 · Source§

fn min(self, other: Self) -> Self
where Self: Sized,

Compares and returns the minimum of two values. Read more
1.50.0 · Source§

fn clamp(self, min: Self, max: Self) -> Self
where Self: Sized,

Restrict a value to a certain interval. Read more
Source§

impl PartialEq for NonPrintableKey

Source§

fn eq(&self, other: &NonPrintableKey) -> 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 PartialOrd for NonPrintableKey

Source§

fn partial_cmp(&self, other: &NonPrintableKey) -> Option<Ordering>

This method returns an ordering between self and other values if one exists. Read more
1.0.0 · Source§

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

Tests less than (for self and other) and is used by the < operator. Read more
1.0.0 · Source§

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

Tests less than or equal to (for self and other) and is used by the <= operator. Read more
1.0.0 · Source§

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

Tests greater than (for self and other) and is used by the > operator. Read more
1.0.0 · Source§

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

Tests greater than or equal to (for self and other) and is used by the >= operator. Read more
Source§

impl TypeMarker for NonPrintableKey

Source§

type Owned = NonPrintableKey

The owned Rust type which this FIDL type decodes into.
Source§

fn inline_align(_context: Context) -> usize

Returns the minimum required alignment of the inline portion of the encoded object. It must be a (nonzero) power of two.
Source§

fn inline_size(_context: Context) -> usize

Returns the size of the inline portion of the encoded object, including padding for alignment. Must be a multiple of inline_align.
Source§

fn encode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and encoding requires no validation. When true, we can optimize encoding arrays and vectors of Self::Owned to a single memcpy. Read more
Source§

fn decode_is_copy() -> bool

Returns true if the memory layout of Self::Owned matches the FIDL wire format and decoding requires no validation. When true, we can optimize decoding arrays and vectors of Self::Owned to a single memcpy.
Source§

impl ValueTypeMarker for NonPrintableKey

Source§

type Borrowed<'a> = NonPrintableKey

The Rust type to use for encoding. This is a particular Encode<Self> type cheaply obtainable from &Self::Owned. There are three cases: Read more
Source§

fn borrow(value: &<Self as TypeMarker>::Owned) -> Self::Borrowed<'_>

Cheaply converts from &Self::Owned to Self::Borrowed.
Source§

impl Copy for NonPrintableKey

Source§

impl Eq for NonPrintableKey

Source§

impl StructuralPartialEq for NonPrintableKey

Auto Trait Implementations§

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, dst: *mut T)

🔬This is a nightly-only experimental API. (clone_to_uninit)
Performs copy-assignment from self to dst. Read more
§

impl<T, D> Encode<Ambiguous1, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<T, D> Encode<Ambiguous2, D> for T
where D: ResourceDialect,

§

unsafe fn encode( self, _encoder: &mut Encoder<'_, D>, _offset: usize, _depth: Depth, ) -> Result<(), Error>

Encodes the object into the encoder’s buffers. Any handles stored in the object are swapped for Handle::INVALID. Read more
§

impl<E> ErrorType for E
where E: ValueTypeMarker<Owned = E> + Decode<E, DefaultFuchsiaResourceDialect>,

§

type Marker = E

The marker type.
Source§

impl<T> From<T> for T

Source§

fn from(t: T) -> T

Returns the argument unchanged.

§

impl<T> Instrument for T

§

fn instrument(self, span: Span) -> Instrumented<Self>

Instruments this type with the provided [Span], returning an Instrumented wrapper. Read more
§

fn in_current_span(self) -> Instrumented<Self>

Instruments this type with the current Span, returning an Instrumented wrapper. Read more
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.

§

impl<T> Pointable for T

§

const ALIGN: usize = _

The alignment of pointer.
§

type Init = T

The type for initializers.
§

unsafe fn init(init: <T as Pointable>::Init) -> usize

Initializes a with the given initializer. Read more
§

unsafe fn deref<'a>(ptr: usize) -> &'a T

Dereferences the given pointer. Read more
§

unsafe fn deref_mut<'a>(ptr: usize) -> &'a mut T

Mutably dereferences the given pointer. Read more
§

unsafe fn drop(ptr: usize)

Drops the object pointed to by the given pointer. Read more
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.
§

impl<T> WithSubscriber for T

§

fn with_subscriber<S>(self, subscriber: S) -> WithDispatch<Self>
where S: Into<Dispatch>,

Attaches the provided Subscriber to this type, returning a [WithDispatch] wrapper. Read more
§

fn with_current_subscriber(self) -> WithDispatch<Self>

Attaches the current default Subscriber to this type, returning a [WithDispatch] wrapper. Read more