pub enum KeyCodeClass {
    WritingSystem,
    Functional,
    ControlPad,
    ArrowPad,
    Numpad,
    Function,
    Media,
    Legacy,
    Gamepad,
    NonStandard,
}
Expand description

Every KeyCode is grouped into one of these classes.

Variants§

§

WritingSystem

The writing system keys are those that change meaning (i.e., they produce different key values) based on the current locale and keyboard layout.

§

Functional

The functional keys (not to be confused with the function keys described later) are those keys in the alphanumeric section that provide general editing functions that are common to all locales (like Shift, Tab, Enter and Backspace). With a few exceptions, these keys do not change meaning based on the current keyboard layout.

§

ControlPad

The control pad section of the keyboard is the set of (usually 6) keys that perform navigating and editing operations, for example, Home, PageUp and Insert.

§

ArrowPad

The arrow pad contains the 4 arrow keys. The keys are commonly arranged in an “upside-down T” configuration.

§

Numpad

The numpad section is the set of keys on the keyboard arranged in a grid like a calculator or mobile phone. This section contains numeric and mathematical operator keys. Often this section will contain a NumLock key which causes the keys to switch between the standard numeric functions and mimicking the keys of the control pad and arrow pad. Laptop computers and compact keyboards will commonly omit these keys to save space.

§

Function

The function section runs along the top of the keyboard (above the alphanumeric section) and contains the function keys and a few additional special keys (for example, Esc and Print Screen).

§

Media

Media keys are extra keys added to a keyboard that provide media related functionality like play, pause or volume control. These keys do not have a standard location on the keyboard so keyboards from different manufacturers are likely to have a different arrangement of keys or a completely different sets of keys.

§

Legacy

These keys are not found on modern standard keyboards. They are listed here for reference purposes.

§

Gamepad

These buttons are found on gamepads.

§

NonStandard

These keys are supported by some browsers.

Trait Implementations§

Returns a copy of the value. Read more
Performs copy-assignment from source. Read more
Formats the value using the given formatter. Read more
Deserialize this value from the given Serde deserializer. Read more
Feeds this value into the given Hasher. Read more
Feeds a slice of this type into the given Hasher. Read more
This method tests for self and other values to be equal, and is used by ==.
This method tests for !=. The default implementation is almost always sufficient, and should not be overridden without very good reason.
Serialize this value into the given Serde serializer. Read more

Auto Trait Implementations§

Blanket Implementations§

Gets the TypeId of self. Read more
Immutably borrows from an owned value. Read more
Mutably borrows from an owned value. Read more
Converts self into T using Into<T>. Read more
Causes self to use its Binary implementation when Debug-formatted.
Causes self to use its Display implementation when Debug-formatted.
Causes self to use its LowerExp implementation when Debug-formatted.
Causes self to use its LowerHex implementation when Debug-formatted.
Causes self to use its Octal implementation when Debug-formatted.
Causes self to use its Pointer implementation when Debug-formatted.
Causes self to use its UpperExp implementation when Debug-formatted.
Causes self to use its UpperHex implementation when Debug-formatted.
Formats each item in a sequence. Read more

Returns the argument unchanged.

Calls U::from(self).

That is, this conversion is whatever the implementation of From<T> for U chooses to do.

Pipes by value. This is generally the method you want to use. Read more
Borrows self and passes that borrow into the pipe function. Read more
Mutably borrows self and passes that borrow into the pipe function. Read more
Borrows self, then passes self.borrow() into the pipe function. Read more
Mutably borrows self, then passes self.borrow_mut() into the pipe function. Read more
Borrows self, then passes self.as_ref() into the pipe function.
Mutably borrows self, then passes self.as_mut() into the pipe function.
Borrows self, then passes self.deref() into the pipe function.
Mutably borrows self, then passes self.deref_mut() into the pipe function.
Immutable access to a value. Read more
Mutable access to a value. Read more
Immutable access to the Borrow<B> of a value. Read more
Mutable access to the BorrowMut<B> of a value. Read more
Immutable access to the AsRef<R> view of a value. Read more
Mutable access to the AsMut<R> view of a value. Read more
Immutable access to the Deref::Target of a value. Read more
Mutable access to the Deref::Target of a value. Read more
Calls .tap() only in debug builds, and is erased in release builds.
Calls .tap_mut() only in debug builds, and is erased in release builds.
Calls .tap_borrow() only in debug builds, and is erased in release builds.
Calls .tap_borrow_mut() only in debug builds, and is erased in release builds.
Calls .tap_ref() only in debug builds, and is erased in release builds.
Calls .tap_ref_mut() only in debug builds, and is erased in release builds.
Calls .tap_deref() only in debug builds, and is erased in release builds.
Calls .tap_deref_mut() only in debug builds, and is erased in release builds.
The resulting type after obtaining ownership.
Creates owned data from borrowed data, usually by cloning. Read more
Uses borrowed data to replace owned data, usually by cloning. Read more
Attempts to convert self into T using TryInto<T>. Read more
The type returned in the event of a conversion error.
Performs the conversion.
The type returned in the event of a conversion error.
Performs the conversion.