@@ -46,31 +46,58 @@ class Keycode:
46
46
"""
47
47
48
48
A = 0x04
49
+ """``a`` and ``A``"""
49
50
B = 0x05
51
+ """``b`` and ``B``"""
50
52
C = 0x06
53
+ """``c`` and ``C``"""
51
54
D = 0x07
55
+ """``d`` and ``D``"""
52
56
E = 0x08
57
+ """``e`` and ``E``"""
53
58
F = 0x09
59
+ """``f`` and ``F``"""
54
60
G = 0x0A
61
+ """``g`` and ``G``"""
55
62
H = 0x0B
63
+ """``h`` and ``H``"""
56
64
I = 0x0C
65
+ """``i`` and ``I``"""
57
66
J = 0x0D
67
+ """``j`` and ``J``"""
58
68
K = 0x0E
69
+ """``k`` and ``K``"""
59
70
L = 0x0F
71
+ """``l`` and ``L``"""
60
72
M = 0x10
73
+ """``m`` and ``M``"""
61
74
N = 0x11
75
+ """``n`` and ``N``"""
62
76
O = 0x12
77
+ """``o`` and ``O``"""
63
78
P = 0x13
79
+ """``p`` and ``P``"""
64
80
Q = 0x14
81
+ """``q`` and ``Q``"""
65
82
R = 0x15
83
+ """``r`` and ``R``"""
66
84
S = 0x16
85
+ """``s`` and ``S``"""
67
86
T = 0x17
87
+ """``t`` and ``T``"""
68
88
U = 0x18
89
+ """``u`` and ``U``"""
69
90
V = 0x19
91
+ """``v`` and ``V``"""
70
92
W = 0x1A
93
+ """``w`` and ``W``"""
71
94
X = 0x1B
95
+ """``x`` and ``X``"""
72
96
Y = 0x1C
97
+ """``y`` and ``Y``"""
73
98
Z = 0x1D
99
+ """``z`` and ``Z``"""
100
+
74
101
ONE = 0x1E
75
102
"""``1`` and ``!``"""
76
103
TWO = 0x1F
@@ -102,6 +129,9 @@ class Keycode:
102
129
TAB = 0x2B
103
130
"""Tab and Backtab"""
104
131
SPACEBAR = 0x2C
132
+ """Spacebar"""
133
+ SPACE = SPACEBAR
134
+ """Alias for SPACEBAR"""
105
135
MINUS = 0x2D
106
136
"""``-` and ``_``"""
107
137
EQUALS = 0x2E
@@ -128,6 +158,7 @@ class Keycode:
128
158
"""``/`` and ``?``"""
129
159
130
160
CAPS_LOCK = 0x39
161
+ """Caps Lock"""
131
162
132
163
F1 = 0x3A
133
164
"""Function key F1"""
@@ -157,33 +188,44 @@ class Keycode:
157
188
PRINT_SCREEN = 0x46
158
189
"""Print Screen (SysRq)"""
159
190
SCROLL_LOCK = 0x47
191
+ """Scroll Lock"""
160
192
PAUSE = 0x48
161
193
"""Pause (Break)"""
162
194
163
195
INSERT = 0x49
196
+ """Insert"""
164
197
HOME = 0x4A
198
+ """Home (often moves to beginning of line)"""
165
199
PAGE_UP = 0x4B
200
+ """Go back one page"""
166
201
DELETE = 0x4C
167
- """Delete forward. """
202
+ """Delete forward"""
168
203
END = 0x4D
204
+ """End (often moves to end of line)"""
169
205
PAGE_DOWN = 0x4E
206
+ """Go forward one page"""
170
207
171
208
RIGHT_ARROW = 0x4F
172
- """Moves the cursor right. """
209
+ """Move the cursor right"""
173
210
LEFT_ARROW = 0x50
174
- """Moves the cursor left. """
211
+ """Move the cursor left"""
175
212
DOWN_ARROW = 0x51
176
- """Moves the cursor down. """
213
+ """Move the cursor down"""
177
214
UP_ARROW = 0x52
178
- """Moves the cursor up. """
215
+ """Move the cursor up"""
179
216
180
217
KEYPAD_NUMLOCK = 0x53
181
218
"""Num Lock (Clear on Mac)"""
182
219
KEYPAD_FORWARD_SLASH = 0x54
220
+ """Keypad ``/``"""
183
221
KEYPAD_ASTERISK = 0x55
222
+ """Keypad ``*``"""
184
223
KEYPAD_MINUS = 0x56
224
+ """Keyapd ``-``"""
185
225
KEYPAD_PLUS = 0x57
226
+ """Keypad ``+``"""
186
227
KEYPAD_ENTER = 0x58
228
+ """Keypad Enter"""
187
229
KEYPAD_ONE = 0x59
188
230
"""Keypad ``1`` and End"""
189
231
KEYPAD_TWO = 0x5A
@@ -193,6 +235,7 @@ class Keycode:
193
235
KEYPAD_FOUR = 0x5C
194
236
"""Keypad ``4`` and Left Arrow"""
195
237
KEYPAD_FIVE = 0x5D
238
+ """Keypad ``5``"""
196
239
KEYPAD_SIX = 0x5E
197
240
"""Keypad ``6`` and Right Arrow"""
198
241
KEYPAD_SEVEN = 0x5F
@@ -209,7 +252,7 @@ class Keycode:
209
252
"""Keypad ``\\ `` and ``|`` (Non-US)"""
210
253
211
254
APPLICATION = 0x65
212
- """Application. Also known as the Menu key (Windows). """
255
+ """Application: also known as the Menu key (Windows)"""
213
256
POWER = 0x66
214
257
"""Power (Mac)"""
215
258
KEYPAD_EQUALS = 0x67
@@ -230,29 +273,29 @@ class Keycode:
230
273
"""Function key F19 (Mac)"""
231
274
232
275
LEFT_CONTROL = 0xE0
233
- """Control modifier left of the spacebar. """
276
+ """Control modifier left of the spacebar"""
234
277
CONTROL = LEFT_CONTROL
235
- """Alias for LEFT_CONTROL. """
278
+ """Alias for LEFT_CONTROL"""
236
279
LEFT_SHIFT = 0xE1
237
- """Shift modifier left of the spacebar. """
280
+ """Shift modifier left of the spacebar"""
238
281
SHIFT = LEFT_SHIFT
239
- """Alias for LEFT_SHIFT. """
282
+ """Alias for LEFT_SHIFT"""
240
283
LEFT_ALT = 0xE2
241
- """Alt modifier left of the spacebar. """
284
+ """Alt modifier left of the spacebar"""
242
285
ALT = LEFT_ALT
243
- """Alias for LEFT_ALT. Alt is also known as Option (Mac). """
286
+ """Alias for LEFT_ALT; Alt is also known as Option (Mac)"""
244
287
LEFT_GUI = 0xE3
245
- """GUI modifier left of the spacebar. """
288
+ """GUI modifier left of the spacebar"""
246
289
GUI = LEFT_GUI
247
- """Alias for LEFT_GUI. GUI is also known as the Windows key, Command (Mac), or Meta. """
290
+ """Alias for LEFT_GUI; GUI is also known as the Windows key, Command (Mac), or Meta"""
248
291
RIGHT_CONTROL = 0xE4
249
- """Control modifier right of the spacebar. """
292
+ """Control modifier right of the spacebar"""
250
293
RIGHT_SHIFT = 0xE5
251
- """Shift modifier right of the spacebar. """
294
+ """Shift modifier right of the spacebar"""
252
295
RIGHT_ALT = 0xE6
253
- """Alt modifier right of the spacebar. """
296
+ """Alt modifier right of the spacebar"""
254
297
RIGHT_GUI = 0xE7
255
- """GUI modifier right of the spacebar. """
298
+ """GUI modifier right of the spacebar"""
256
299
257
300
@classmethod
258
301
def modifier_bit (cls , keycode ):
0 commit comments