[][src]Enum riddle_input::Scancode

#[repr(u16)]pub enum Scancode {
    Unknown,
    Escape,
    One,
    Two,
    Three,
    Four,
    Five,
    Six,
    Seven,
    Eight,
    Nine,
    Zero,
    Minus,
    Equal,
    Backspace,
    Tab,
    Q,
    W,
    E,
    R,
    T,
    Y,
    U,
    I,
    O,
    P,
    LeftBrace,
    RightBrace,
    Enter,
    LeftControl,
    A,
    D,
    S,
    F,
    G,
    H,
    J,
    K,
    L,
    Semicolon,
    Apostrope,
    Grave,
    LeftShift,
    Backslash,
    Z,
    X,
    C,
    V,
    B,
    N,
    M,
    Comma,
    Dot,
    Slash,
    RightShift,
    KeyPadAsterick,
    LeftAlt,
    Space,
    CapsLock,
    F1,
    F2,
    F3,
    F4,
    F5,
    F6,
    F7,
    F8,
    F9,
    F10,
    NumLock,
    ScrollLock,
    KeyPad7,
    KeyPad8,
    KeyPad9,
    KeyPadMinus,
    KeyPad4,
    KeyPad5,
    KeyPad6,
    KeyPadPlus,
    KeyPad1,
    KeyPad2,
    KeyPad3,
    KeyPad0,
    KeyPadDot,
    NonUSBackslash,
    F11,
    F12,
    KeyPadEnter,
    RightAlt,
    Home,
    Up,
    PageUp,
    Left,
    Right,
    End,
    Down,
    PageDown,
    Insert,
    Delete,
    KeyPadEqual,
    KeyPadPlusMinus,
}

Supported scancodes.

Scancodes relate to the physical location of a key on the keyboard, not what the currently mapped meaning of the key is. Use scancodes in situations where physical location matters (WASD for movement, etc), not for situations where meaning matters (eg. textual input). For those cases use crate::VirtualKey.

Converting from a u32 to Scancode assumes the integer represents a platform native scancode value, so depending on build target the mapping from number to scancode will vary.

Variants

Unknown
Escape
One
Two
Three
Four
Five
Six
Seven
Eight
Nine
Zero
Minus
Equal
Backspace
Tab
Q
W
E
R
T
Y
U
I
O
P
LeftBrace
RightBrace
Enter
LeftControl
A
D
S
F
G
H
J
K
L
Semicolon
Apostrope
Grave
LeftShift
Backslash
Z
X
C
V
B
N
M
Comma
Dot
Slash
RightShift
KeyPadAsterick
LeftAlt
Space
CapsLock
F1
F2
F3
F4
F5
F6
F7
F8
F9
F10
NumLock
ScrollLock
KeyPad7
KeyPad8
KeyPad9
KeyPadMinus
KeyPad4
KeyPad5
KeyPad6
KeyPadPlus
KeyPad1
KeyPad2
KeyPad3
KeyPad0
KeyPadDot
NonUSBackslash
F11
F12
KeyPadEnter
RightAlt
Home
Up
PageUp
Left
Right
End
Down
PageDown
Insert
Delete
KeyPadEqual
KeyPadPlusMinus

Trait Implementations

impl Clone for Scancode[src]

impl Copy for Scancode[src]

impl Debug for Scancode[src]

impl Eq for Scancode[src]

impl From<u32> for Scancode[src]

impl PartialEq<Scancode> for Scancode[src]

impl StructuralEq for Scancode[src]

impl StructuralPartialEq for Scancode[src]

Auto Trait Implementations

impl RefUnwindSafe for Scancode

impl Send for Scancode

impl Sync for Scancode

impl Unpin for Scancode

impl UnwindSafe for Scancode

Blanket Implementations

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

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

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

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

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

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

type Owned = T

The resulting type after obtaining ownership.

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> 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.