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, LeftArrow, RightArrow, DownArrow, UpArrow, Section, Yen, Underscore, KeypadComma, Eisu, Kana, }
Carbon's virtual keycodes, found here.
Variants
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
Keycodes for keys that are independent of keyboard layout
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
LeftArrow
RightArrow
DownArrow
UpArrow
Section
ISO keyboards only
Yen
JIS keyboards only
Underscore
KeypadComma
Eisu
Kana
Methods
impl Keycode
[src]
impl Keycode
pub fn is_pressed(self) -> bool
[src]
pub fn is_pressed(self) -> bool
Returns true if key is currently pressed.
loop { println!("State of Up key: {}, ", Keycode::Up.is_pressed()); }