Enum readkey::Keycode[][src]

#[repr(u16)]
pub enum Keycode { A, S, D, F, H, G, Z, X, C, V, B, Q, W, E, R, Y, T, _1, _2, _3, _4, _6, _5, Equal, _9, _7, Minus, _8, _0, RightBracket, O, U, LeftBracket, I, P, L, J, Quote, K, Semicolon, Backslash, Comma, Slash, N, M, Period, Grave, KeypadDecimal, KeypadMultiply, KeypadPlus, KeypadClear, KeypadDivide, KeypadEnter, KeypadMinus, KeypadEquals, Keypad0, Keypad1, Keypad2, Keypad3, Keypad4, Keypad5, Keypad6, Keypad7, Keypad8, Keypad9, Return, Tab, Space, Delete, Escape, Command, Shift, CapsLock, Option, Control, RightShift, RightOption, RightControl, Function, F17, VolumeUp, VolumeDown, Mute, F18, F19, F20, F5, F6, F7, F3, F8, F9, F11, F13, F16, F14, F10, F12, F15, Help, Home, PageUp, ForwardDelete, F4, End, F2, PageDown, F1, Left, Right, Down, Up, Section, Yen, Underscore, KeypadComma, Eisu, Kana, }

Carbon's virtual keycodes, found here.

Variants

Keycodes for keys that are independent of keyboard layout

ISO keyboards only

JIS keyboards only

Methods

impl Keycode
[src]

Returns true if key is currently pressed.

loop {
  println!("State of Up key: {}, ", Keycode::Up.is_pressed());
}

Auto Trait Implementations

impl Send for Keycode

impl Sync for Keycode