[−][src]Enum keyberon::key_code::KeyCode
Define a key code according to the HID specification. Their names correspond to the american QWERTY layout.
Variants
The "no" key, a placeholder to express nothing.
Error if too much keys are pressed at the same time.
The POST fail error.
An undefined error occured.
a
and A
.
1
and !
.
2
and @
.
3
and #
.
4
and $
.
5
and %
.
6
and ^
.
7
and &
.
8
and *
.
9
and (
.
0
and )
.
-
and _
.
=
and +
.
[
and {
.
]
and }
.
\
and |
.
Non-US #
and ~
(Typically near the Enter key).
;
and :
.
'
and "
.
` and ~
.
,
and <
.
.
and >
.
/
and ?
.
Keypad /
Keypad *
Keypad -
.
Keypad +
.
Keypad enter.
Keypad 1.
Non-US \
and |
(Typically near the Left-Shift key)
not a key, used for errors
Keypad =
.
Deprecated.
Deprecated.
Deprecated.
Keypad ,
, also used for the brazilian keypad period (.) key.
Used on AS/400 keyboard
Left Control.
Left Shift.
Left Alt.
Left GUI (the Windows key).
Right Control.
Right Shift.
Right Alt (or Alt Gr).
Right GUI (the Windows key).
Implementations
impl KeyCode
[src]
pub fn is_modifier(self) -> bool
[src]
Returns true
if the key code correspond to a modifier (send
separately on USB HID report).
pub fn as_modifier_bit(self) -> u8
[src]
Returns the byte with the bit corresponding to the USB HID modifier bitfield setted.
Trait Implementations
impl Clone for KeyCode
[src]
fn clone(&self) -> KeyCode
[src]
fn clone_from(&mut self, source: &Self)
1.0.0[src]
impl Copy for KeyCode
[src]
impl Debug for KeyCode
[src]
impl Eq for KeyCode
[src]
impl FromIterator<KeyCode> for KbHidReport
[src]
fn from_iter<T>(iter: T) -> Self where
T: IntoIterator<Item = KeyCode>,
[src]
T: IntoIterator<Item = KeyCode>,
impl Ord for KeyCode
[src]
fn cmp(&self, other: &KeyCode) -> Ordering
[src]
#[must_use]fn max(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn min(self, other: Self) -> Self
1.21.0[src]
#[must_use]fn clamp(self, min: Self, max: Self) -> Self
[src]
impl PartialEq<KeyCode> for KeyCode
[src]
impl PartialOrd<KeyCode> for KeyCode
[src]
fn partial_cmp(&self, other: &KeyCode) -> Option<Ordering>
[src]
#[must_use]fn lt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn le(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn gt(&self, other: &Rhs) -> bool
1.0.0[src]
#[must_use]fn ge(&self, other: &Rhs) -> bool
1.0.0[src]
impl StructuralEq for KeyCode
[src]
impl StructuralPartialEq for KeyCode
[src]
Auto Trait Implementations
Blanket Implementations
impl<T> Any for T where
T: 'static + ?Sized,
[src]
T: 'static + ?Sized,
impl<T> Borrow<T> for T where
T: ?Sized,
[src]
T: ?Sized,
impl<T> BorrowMut<T> for T where
T: ?Sized,
[src]
T: ?Sized,
fn borrow_mut(&mut self) -> &mut T
[src]
impl<T> From<T> for T
[src]
impl<T, U> Into<U> for T where
U: From<T>,
[src]
U: From<T>,
impl<T> Same<T> for T
type Output = T
Should always be Self
impl<T, U> TryFrom<U> for T where
U: Into<T>,
[src]
U: Into<T>,
type Error = Infallible
The type returned in the event of a conversion error.
fn try_from(value: U) -> Result<T, <T as TryFrom<U>>::Error>
[src]
impl<T, U> TryInto<U> for T where
U: TryFrom<T>,
[src]
U: TryFrom<T>,