[][src]Enum keytokey::KeyCode

#[repr(u32)]
pub enum KeyCode {
    No,
    ErrorRollOver,
    PostFail,
    ErrorUndefined,
    A,
    B,
    C,
    D,
    E,
    F,
    G,
    H,
    I,
    J,
    K,
    L,
    M,
    N,
    O,
    P,
    Q,
    R,
    S,
    T,
    U,
    V,
    W,
    X,
    Y,
    Z,
    Kb1,
    Kb2,
    Kb3,
    Kb4,
    Kb5,
    Kb6,
    Kb7,
    Kb8,
    Kb9,
    Kb0,
    Enter,
    Escape,
    BSpace,
    Tab,
    Space,
    Minus,
    Equal,
    LBracket,
    RBracket,
    BSlash,
    NonUsHash,
    SColon,
    Quote,
    Grave,
    Comma,
    Dot,
    Slash,
    CapsLock,
    F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    F11,
    F12,
    PScreen,
    ScrollLock,
    Pause,
    Insert,
    Home,
    PgUp,
    Delete,
    End,
    PgDown,
    Right,
    Left,
    Down,
    Up,
    NumLock,
    KpSlash,
    KpAsterisk,
    KpMinus,
    KpPlus,
    KpEnter,
    Kp1,
    Kp2,
    Kp3,
    Kp4,
    Kp5,
    Kp6,
    Kp7,
    Kp8,
    Kp9,
    Kp0,
    KpDot,
    NonUsBslash,
    Application,
    LCtrl,
    LShift,
    LAlt,
    LGui,
    RCtrl,
    RShift,
    RAlt,
    RGui,
}

usb key codes mapped into the first private region of unicode USBKeyOut must substract UNICODE_BELOW_256 to create valid u8 values to transmit

Variants

NoErrorRollOverPostFailErrorUndefinedABCDEFGHIJKLMNOPQRSTUVWXYZKb1Kb2Kb3Kb4Kb5Kb6Kb7Kb8Kb9Kb0EnterEscapeBSpaceTabSpaceMinusEqualLBracketRBracketBSlashNonUsHashSColonQuoteGraveCommaDotSlashCapsLockF1F2F3F4F5F6F7F8F9F10F11F12PScreenScrollLockPauseInsertHomePgUpDeleteEndPgDownRightLeftDownUpNumLockKpSlashKpAsteriskKpMinusKpPlusKpEnterKp1Kp2Kp3Kp4Kp5Kp6Kp7Kp8Kp9Kp0KpDotNonUsBslashApplicationLCtrlLShiftLAltLGuiRCtrlRShiftRAltRGui

Methods

impl KeyCode[src]

pub fn is_modifier(self) -> bool[src]

needed to build USB reports

pub fn as_modifier_bit(self) -> u8[src]

needed to build USB reports

pub fn to_u8(self) -> u8[src]

Trait Implementations

impl AcceptsKeycode for KeyCode[src]

impl Debug for KeyCode[src]

impl PartialEq<KeyCode> for KeyCode[src]

#[must_use] fn ne(&self, other: &Rhs) -> bool1.0.0[src]

This method tests for !=.

impl Eq for KeyCode[src]

impl Ord for KeyCode[src]

fn max(self, other: Self) -> Self1.21.0[src]

Compares and returns the maximum of two values. Read more

fn min(self, other: Self) -> Self1.21.0[src]

Compares and returns the minimum of two values. Read more

fn clamp(self, min: Self, max: Self) -> Self[src]

🔬 This is a nightly-only experimental API. (clamp)

Restrict a value to a certain interval. Read more

impl PartialOrd<KeyCode> for KeyCode[src]

#[must_use] fn lt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than (for self and other) and is used by the < operator. Read more

#[must_use] fn le(&self, other: &Rhs) -> bool1.0.0[src]

This method tests less than or equal to (for self and other) and is used by the <= operator. Read more

#[must_use] fn gt(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than (for self and other) and is used by the > operator. Read more

#[must_use] fn ge(&self, other: &Rhs) -> bool1.0.0[src]

This method tests greater than or equal to (for self and other) and is used by the >= operator. Read more

impl Copy for KeyCode[src]

impl TryFrom<u32> for KeyCode[src]

type Error = String

The type returned in the event of a conversion error.

impl TryFrom<u8> for KeyCode[src]

type Error = String

The type returned in the event of a conversion error.

impl From<KeyCode> for u32[src]

impl Clone for KeyCode[src]

fn clone_from(&mut self, source: &Self)1.0.0[src]

Performs copy-assignment from source. Read more

Auto Trait Implementations

impl Unpin for KeyCode

impl Sync for KeyCode

impl Send for KeyCode

impl RefUnwindSafe for KeyCode

impl UnwindSafe for KeyCode

Blanket Implementations

impl<T, U> TryFrom<U> for T where
    U: Into<T>, 
[src]

type Error = Infallible

The type returned in the event of a conversion error.

impl<T, U> Into<U> for T where
    U: From<T>, 
[src]

impl<T> From<T> for T[src]

impl<T, U> TryInto<U> for T where
    U: TryFrom<T>, 
[src]

type Error = <U as TryFrom<T>>::Error

The type returned in the event of a conversion error.

impl<T> Borrow<T> for T where
    T: ?Sized
[src]

impl<T> BorrowMut<T> for T where
    T: ?Sized
[src]

impl<T> Any for T where
    T: 'static + ?Sized
[src]

impl<T> ToOwned for T where
    T: Clone
[src]

type Owned = T

The resulting type after obtaining ownership.