-
Notifications
You must be signed in to change notification settings - Fork 5
/
__init__.py
84 lines (83 loc) · 1.66 KB
/
__init__.py
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
# encoding=utf-8
# US keyboard layout
KEY_A = 0x4 # a A
KEY_B = 0x5 # b B
KEY_C = 0x6 # c C
KEY_D = 0x7 # d D
KEY_E = 0x8 # e E
KEY_F = 0x9 # f F
KEY_G = 0xa # g G
KEY_H = 0xb # h H
KEY_I = 0xc # i I
KEY_J = 0xd # j J
KEY_K = 0xe # k K
KEY_L = 0xf # l L
KEY_M = 0x10 # m M
KEY_N = 0x11 # n N
KEY_O = 0x12 # o O
KEY_P = 0x13 # p P
KEY_Q = 0x14 # q Q
KEY_R = 0x15 # r R
KEY_S = 0x16 # s S
KEY_T = 0x17 # t T
KEY_U = 0x18 # u U
KEY_V = 0x19 # v V
KEY_W = 0x1a # w W
KEY_X = 0x1b # x X
KEY_Y = 0x1c # y Y
KEY_Z = 0x1d # z Z
KEY_1 = 0x1e # 1 !
KEY_2 = 0x1f # 2 @
KEY_3 = 0x20 # 3 #
KEY_4 = 0x21 # 4 $
KEY_5 = 0x22 # 5 %
KEY_6 = 0x23 # 6 ^
KEY_7 = 0x24 # 7 &
KEY_8 = 0x25 # 8 *
KEY_9 = 0x26 # 9 (
KEY_0 = 0x27 # 0 )
ENTER = 0x28 # Enter / Return
ESC = 0x29 # Escape
BACKSPACE = 0x2a # Backspace
TAB = 0x2b # Tab
SPACE = 0x2c # Space
KEY_MINUS = 0x2d # - _
KEY_EQUAL = 0x2e # = +
OPEN_SQUARE_BRACKET = 0x2f # [ {
CLOSE_SQUARE_BRACKET = 0x30 # ] }
BACKSLASH = 0x31 # \ |
SEMICOLON = 0x33 # ; :
SINGLE_QUOTE = 0x34 # ' "
BACKTICK = 0x35 # ` ~
COMMA = 0x36 # , <
DOT = 0x37 # . >
SLASH = 0x38 # / ?
CAPSLOCK = 0x39
F1 = 0x3a
F2 = 0x3b
F3 = 0x3c
F4 = 0x3d
F5 = 0x3e
F6 = 0x3f
F7 = 0x40
F8 = 0x41
F9 = 0x42
F10 = 0x43
F11 = 0x44
F12 = 0x45
PRINT_SCREEN = 0x46
SCROLL_LOCK = 0x47
PAUSE = 0x48 # Pause Break
DELETE = 0x4c
KEY_RIGHT = 0x4f
KEY_LEFT = 0x50
KEY_DOWN = 0x51
KEY_UP = 0x52
LEFT_CTRL = 0b00000001
LEFT_SHIFT = 0b00000010
LEFT_ALT = 0b00000100
LEFT_GUI = 0b00001000
RIGHT_CTRL = 0b00010000
RIGHT_SHIFT = 0b00100000
RIGHT_ALT = 0b01000000
RIGHT_GUI = 0b10000000