This repository has been archived by the owner on Jul 30, 2022. It is now read-only.
-
Notifications
You must be signed in to change notification settings - Fork 1
/
keys.py
292 lines (278 loc) · 6.14 KB
/
keys.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
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
143
144
145
146
147
148
149
150
151
152
153
154
155
156
157
158
159
160
161
162
163
164
165
166
167
168
169
170
171
172
173
174
175
176
177
178
179
180
181
182
183
184
185
186
187
188
189
190
191
192
193
194
195
196
197
198
199
200
201
202
203
204
205
206
207
208
209
210
211
212
213
214
215
216
217
218
219
220
221
222
223
224
225
226
227
228
229
230
231
232
233
234
235
236
237
238
239
240
241
242
243
244
245
246
247
248
249
250
251
252
253
254
255
256
257
258
259
260
261
262
263
264
265
266
267
268
269
270
271
272
273
274
275
276
277
278
279
280
281
282
283
284
285
286
287
288
289
290
291
292
import enum
__all__ = ["KeyBinds"]
class KeyBinds(enum.Enum):
"""https://docs.unrealengine.com/udk/Three/KeyBinds.html#Mappable%20keys"""
# make variants return their value, not their name
def __str__(self) -> str:
return str(self.value)
#
# Function keys
#
# Function one.
F1 = "F1"
# Function two.
F2 = "F2"
# Function three.
F3 = "F3"
# Function four.
F4 = "F4"
# Function five.
F5 = "F5"
# Function six.
F6 = "F6"
# Function seven.
F7 = "F7"
# Function eight.
F8 = "F8"
# Function nine.
F9 = "F9"
# Function ten.
F10 = "F10"
# Function eleven.
F11 = "F11"
# Function twelve.
F12 = "F12"
#
# Alphanumerical keys
#
# Letter A.
A = "A"
# Letter B.
B = "B"
# Letter C.
C = "C"
# Letter D.
D = "D"
# Letter E.
E = "E"
# Letter F.
F = "F"
# Letter G.
G = "G"
# Letter H.
H = "H"
# Letter I.
I = "I" # noqa: E741
# Letter J.
J = "J"
# Letter K.
K = "K"
# Letter L.
L = "L"
# Letter M.
M = "M"
# Letter N.
N = "N"
# Letter O.
O = "O" # noqa: E741
# Letter P.
P = "P"
# Letter Q.
Q = "Q"
# Letter R.
R = "R"
# Letter S.
S = "S"
# Letter T.
T = "T"
# Letter U.
U = "U"
# Letter V.
V = "V"
# Letter W.
W = "W"
# Letter X.
X = "X"
# Letter Y.
Y = "Y"
# Letter Z.
Z = "Z"
#
# Special keys
#
# Escape.
Escape = "Escape"
# Tab.
Tab = "Tab"
# ~.
Tilde = "Tilde"
# Scroll lock.
ScrollLock = "ScrollLock"
# Pause.
Pause = "Pause"
# One.
One = "one"
# Two.
Two = "two"
# Three.
Three = "three"
# Four.
Four = "four"
# Five.
Five = "five"
# Six.
Six = "six"
# Seven.
Seven = "seven"
# Eight.
Eight = "eight"
# Nine.
Nine = "nine"
# Zero.
Zero = "zero"
# _.
Underscore = "Underscore"
# =.
Equals = "Equals"
# \.
Backslash = "Backslash"
# [.
LeftBracket = "LeftBracket"
# ].
RightBracket = "RightBracket"
# Enter or Numpad enter.
Enter = "Enter"
# Caps lock.
CapsLock = "CapsLock"
# ;.
Semicolon = "Semicolon"
# '.
Quote = "Quote"
# Left shift.
LeftShift = "LeftShift"
# ,.
Comma = "Comma"
# ..
Period = "Period"
# /.
Slash = "Slash"
# Right Shift
RightShift = "RightShift"
# Left control.
LeftControl = "LeftControl"
# Left alt.
LeftAlt = "LeftAlt"
# Space bar.
SpaceBar = "SpaceBar"
# Right alt.
RightAlt = "RightAlt"
# Right control.
RightControl = "RightControl"
# Left.
Left = "Left"
# Up.
Up = "Up"
# Down.
Down = "Down"
# Right.
Right = "Right"
# Home.
Home = "Home"
# End.
End = "End"
# Insert.
Insert = "Insert"
# Page up.
PageUp = "PageUp"
# Delete.
Delete = "Delete"
# Page down.
PageDown = "PageDown"
# Num lock.
NumLock = "NumLock"
# Numpad /.
Divide = "Divide"
# Numpad *.
Multiply = "Multiply"
# Numpad -.
Subtract = "Subtract"
# Numpad +.
Add = "Add"
# Numpad one.
NumPadOne = "NumPadOne"
# Numpad two.
NumPadTwo = "NumPadTwo"
# Numpad three.
NumPadThree = "NumPadThree"
# Numpad four.
NumPadFour = "NumPadFour"
# Numpad five.
NumPadFive = "NumPadFive"
# Numpad six.
NumPadSix = "NumPadSix"
# Numpad seven.
NumPadSeven = "NumPadSeven"
# Numpad eight.
NumPadEight = "NumPadEight"
# Numpad nine.
NumPadNine = "NumPadNine"
# Numpad zero.
NumPadZero = "NumPadZero"
# Numpad decimal.
NumPadDecimal = "Decimal"
#
# Mouse
#
# Left mouse button.
LeftMouseButton = "LeftMouseButton"
# Right mouse button.
RightMouseButton = "RightMouseButton"
# Primary mouse thumb button.
ThumbMouseButton = "ThumbMouseButton"
# Secondary mouse thumb button.
ThumbMouseButton2 = "ThumbMouseButton2"
# Mouse wheel scrolling up.
MouseScrollUp = "MouseScrollUp"
# Mouse wheel scrolling down.
MouseScrollDown = "MouseScrollDown"
# Mouse movement on the X axis.
MouseX = "MouseX"
# Mouse movement on the Y axis.
MouseY = "MouseY"
#
# XBox360 Controller
#
# Left thumb stick when pressed as a button.
GamePad_LeftThumbStick = "XboxTypeS_LeftThumbStick"
# Right thumb stick when pressed as a button.
GamePad_RightThumbStick = "XboxTypeS_RightThumbStick"
# Directional pad up.
GamePad_DPad_Up = "XboxTypeS_DPad_Up"
# Directional pad left.
GamePad_DPad_Left = "XboxTypeS_DPad_Left"
# Directional pad right.
GamePad_DPad_Right = "XboxTypeS_DPad_Right"
# Directional pad down.
GamePad_DPad_Down = "XboxTypeS_DPad_Down"
# Back button.
GamePad_Back = "XboxTypeS_Back"
# Start button.
GamePad_Start = "XboxTypeS_Start"
# Y button.
GamePad_Y = "XboxTypeS_Y"
# X button.
GamePad_X = "XboxTypeS_X"
# B button.
GamePad_B = "XboxTypeS_B"
# A button.
GamePad_A = "XboxTypeS_A"
# Left shoulder button.
GamePad_LeftShoulder = "XboxTypeS_LeftShoulder"
# Right shoulder button.
GamePad_RightShoulder = "XboxTypeS_RightShoulder"
# Left trigger when pressed as a button.
GamePad_LeftTrigger = "XboxTypeS_LeftTrigger"
# Right trigger when pressed as a button.
GamePad_RightTrigger = "XboxTypeS_RightTrigger"
# Left trigger when semi depressed.
GamePad_LeftTriggerAxis = "XboxTypeS_LeftTriggerAxis"
# Right trigger when semi depressed.
GamePad_RightTriggerAxis = "XboxTypeS_RightTriggerAxis"
# Left thumb stick horizontal position when used as an analogue control.
GamePad_LeftX = "XboxTypeS_LeftX"
# Left thumb stick vertical position when used as an analogue control.
GamePad_LeftY = "XboxTypeS_LeftY"
# Right thumb stick horizontal position when used as an analogue control.
GamePad_RightX = "XboxTypeS_RightX"
# Right thumb stick vertical position when used as an analogue control.
GamePad_RightY = "XboxTypeS_RightY"