add keycodes

This commit is contained in:
Edward Shen 2020-01-28 14:33:17 -05:00
parent 789d5f9021
commit 39f830f114
No known key found for this signature in database
GPG Key ID: F350507060ED6C90
1 changed files with 177 additions and 0 deletions

177
src/keycodes.rs Normal file
View File

@ -0,0 +1,177 @@
pub enum KeyCodes {
NO = 0x00,
ROLLOVER,
POSTFAIL,
UNDEFINED,
A,
B,
C,
D,
E,
F,
G,
H,
I,
J,
K,
L,
M, // 0x10
N,
O,
P,
Q,
R,
S,
T,
U,
V,
W,
X,
Y,
Z,
N1,
N2,
N3, // 0x20
N4,
N5,
N6,
N7,
N8,
N9,
N0,
ENTER,
ESCAPE,
BSPACE,
TAB,
SPACE,
MINUS,
EQUAL,
LBRACKET,
RBRACKET, // 0x30
BSLASH,
NONUSHASH,
SCOLON,
QUOTE,
GRAVE,
COMMA,
DOT,
SLASH,
CAPSLOCK,
F1,
F2,
F3,
F4,
F5,
F6,
F7, // 0x40
F8,
F9,
F10,
F11,
F12,
PSCREEN,
SCROLLLOCK,
PAUSE,
INSERT,
HOME,
PGUP,
DELETE,
END,
PGDOWN,
RIGHT,
LEFT, // 0x50
DOWN,
UP,
NUMLOCK,
KPSLASH,
KPASTERISK,
KPMINUS,
KPPLUS,
KPENTER,
KP1,
KP2,
KP3,
KP4,
KP5,
KP6,
KP7,
KP8, // 0x60
KP9,
KP0,
KPDOT,
NONUSBSLASH,
APPLICATION,
POWER,
KPEQUAL,
F13,
F14,
F15,
F16,
F17,
F18,
F19,
F20,
F21, // 0x70
F22,
F23,
F24,
EXECUTE,
HELP,
MENU,
SELECT,
STOP,
AGAIN,
UNDO,
CUT,
COPY,
PASTE,
FIND,
MUTE,
VOLUP, // 0x80
VOLDOWN,
LOCKINGCAPS,
LOCKINGNUM,
LOCKINGSCROLL,
KPCOMMA,
KPEQUALAS400,
INT1,
INT2,
INT3,
INT4,
INT5,
INT6,
INT7,
INT8,
INT9,
LANG1, // 0x90
LANG2,
LANG3,
LANG4,
LANG5,
LANG6,
LANG7,
LANG8,
LANG9,
ALTERASE,
SYSREQ,
CANCEL,
CLEAR,
PRIOR,
RETURN,
SEPARATOR,
OUT, // 0xA0
OPER,
CLEARAGAIN,
CRSEL,
EXSEL,
/* Modifiers */
LCTRL = 0xE0,
LSHIFT,
LALT,
LGUI,
RCTRL,
RSHIFT,
RALT,
RGUI,
}