-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathKeycodes.cs
More file actions
494 lines (485 loc) · 14.4 KB
/
Copy pathKeycodes.cs
File metadata and controls
494 lines (485 loc) · 14.4 KB
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
293
294
295
296
297
298
299
300
301
302
303
304
305
306
307
308
309
310
311
312
313
314
315
316
317
318
319
320
321
322
323
324
325
326
327
328
329
330
331
332
333
334
335
336
337
338
339
340
341
342
343
344
345
346
347
348
349
350
351
352
353
354
355
356
357
358
359
360
361
362
363
364
365
366
367
368
369
370
371
372
373
374
375
376
377
378
379
380
381
382
383
384
385
386
387
388
389
390
391
392
393
394
395
396
397
398
399
400
401
402
403
404
405
406
407
408
409
410
411
412
413
414
415
416
417
418
419
420
421
422
423
424
425
426
427
428
429
430
431
432
433
434
435
436
437
438
439
440
441
442
443
444
445
446
447
448
449
450
451
452
453
454
455
456
457
458
459
460
461
462
463
464
465
466
467
468
469
470
471
472
473
474
475
476
477
478
479
480
481
482
483
484
485
486
487
488
489
490
491
492
493
494
using System.Collections.Generic;
using System.Windows.Input;
namespace GenshinConfigurator
{
internal class Keycodes
{
public static int AXIS_COUNT = 4;
public static List<string> gamepad_axes = new List<string>
{
"Left Stick X",
"Left Stick Y",
"Right Stick X",
"Right Stick Y",
"LT",
"RT"
};
public static List<string> xbox_gamepad_Key = new List<string>
{
"LT",
"RT",
"A",
"B",
"X",
"Y",
"LB",
"RB",
"Back",
"Start",
"Left Stick Button",
"Right Stick Button",
"D-Pad Up",
"D-Pad Right",
"D-Pad Down",
"D-Pad Left",
"Left Stick",
"Right Stick",
"Guide"
};
public static List<string> dualshock4_gamepad_Key = new List<string>
{
"L2",
"R2",
"Cross",
"Circle",
"Square",
"Triangle",
"L1",
"R1",
"Share",
"Options",
"PS Button",
"Touchpad Button",
"Left Stick Button",
"Right Stick Button",
"D-Pad Up",
"D-Pad Right",
"D-Pad Down",
"D-Pad Left",
"Left Stick",
"Right Stick"
};
public static List<string> dualsense_gamepad_Key = new List<string>
{
"LT",
"RT",
"Cross",
"Circle",
"Square",
"Triangle",
"L1",
"R1",
"Create",
"Options",
"PS Button",
"Touchpad Button",
"Left Stick Button",
"Right Stick Button",
"D-Pad Up",
"D-Pad Right",
"D-Pad Down",
"D-Pad Left",
"Left Stick",
"Right Stick",
"Mute"
};
public static List<string> mouse_axes = new List<string>
{
// 0 - 2
"Mouse Horizontal",
"Mouse Vertical",
"Mouse Wheel"
};
public static List<string> mouse_Key = new List<string>
{
// 3 - 9
"Left Mouse Button",
"Right Mouse Button",
"Middle Mouse Button",
"Mouse 4",
"Mouse 5",
"Mouse 6",
"Mouse 7"
};
public static Dictionary<int,string> actions = new Dictionary<int, string>
{
{ 0, "Side Movement" },
{ 1, "Forward Movement"},
{ 2, "Map" },
{ 3, "Character List" },
{ 4, "Inventory" },
{ 5, "Menu (Gamepad)" },
{ 6, "Quest List" },
{ 7, "Char 1" },
{ 8, "Char 2" },
{ 9, "Char 3" },
{ 10, "Adventurer Handbook" },
// 11 - 14 resets themselves, when game is opened
{ 15, "Jump" },
{ 16, "Attack" },
{ 17, "Elemental Skill" },
{ 18, "Quest Transport?" },
{ 19, "Item Info" },
{ 20, "Elemental Burst" },
{ 21, "Sprint" },
{ 22, "Use/Talk" },
{ 23, "Move Forward: Show?" },
{ 24, "Move Left: Show?" },
{ 25, "Move Right: Show?" },
{ 26, "Move Back: Show?" },
{ 27, "Aim Mode" },
{ 28, "Aim Button" },
{ 29, "Move?" },
{ 30, "Camera: Horizontal view" },
{ 31, "Camera: Vertical view" },
{ 32, "View?" },
{ 33, "Quick Wheel" },
{ 34, "Top Menu: Left" },
{ 35, "Top Menu: Right" },
// 36 - 39 resets themselves
{ 40, "Menu Select" },
{ 41, "Auxiliary Action" },
{ 42, "Menu/Back" },
{ 43, "D-Pad Up" },
{ 44, "D-Pad Right" },
{ 45, "D-Pad Down" },
{ 46, "D-Pad Left" },
{ 47, "Menu: Up" },
{ 48, "Menu: Right" },
{ 49, "Menu: Down" },
{ 50, "Menu: Left" },
{ 51, "Less" },
{ 52, "More" },
{ 53, "Cancel Climb" },
{ 54, "Camera: View distance" },
{ 55, "Walk/Run" },
{ 56, "Show Cursor" },
{ 57, "Elemental Sight" },
{ 58, "Debug Menu" },
{ 59, "Right Stick Up?" },
{ 60, "Right Stick Right?" },
{ 61, "Right Stick Down?" },
{ 62, "Right Stick Left?" },
{ 63, "Secondary Action" },
{ 64, "Right Stick Vertical?" },
{ 65, "Co-Op" },
{ 66, "Char 4" },
{ 67, "Lock Item / Mark" },
{ 68, "Right Stick Horizontal?" },
{ 69, "Left Stick Horzontal?" },
{ 70, "Left Stick Vertical?" },
{ 71, "Menu Right?" },
{ 72, "Menu Down?" },
{ 73, "Wish" },
{ 75, "Chat" },
{ 76, "Notification Details" },
{ 77, "Environment Info" },
{ 78, "Char 5" },
{ 79, "Adventurer Handbook?" },
{ 80, "Navigation" },
{ 81, "Tutorial" },
{ 82, "Events" },
{ 83, "Battle Pass" },
{ 84, "Abandon Challenge" },
{ 85, "Abandon Challenge (Gamepad)" },
{ 86, "Photo: Hide UI" },
{ 87, "Gadget" },
{ 88, "Interaction (some modes)" },
{ 89, "Extra Up?" },
{ 90, "Extra Down?" },
{ 91, "Extra Left?" },
{ 92, "Extra Right?" },
{ 94, "Music: Left Up" },
{ 95, "Music: Left Right" },
{ 96, "Music: Left Down" },
{ 97, "Music: Left Left" },
{ 98, "Music: Right Up" },
{ 99, "Music: Right Right" },
{ 100, "Music: Right Down" },
{ 101, "Music: Right Left" },
{ 102, "Music: Note 1-1" },
{ 103, "Music: Note 1-2" },
{ 104, "Music: Note 1-3" },
{ 105, "Music: Note 1-4" },
{ 106, "Music: Note 1-5" },
{ 107, "Music: Note 1-6" },
{ 108, "Music: Note 1-7" },
{ 109, "Music: Note 2-1" },
{ 110, "Music: Note 2-2" },
{ 111, "Music: Note 2-3" },
{ 112, "Music: Note 2-4" },
{ 113, "Music: Note 2-5" },
{ 114, "Music: Note 2-6" },
{ 115, "Music: Note 2-7" },
{ 116, "Music: Note 3-1" },
{ 117, "Music: Note 3-2" },
{ 118, "Music: Note 3-3" },
{ 119, "Music: Note 3-4" },
{ 120, "Music: Note 3-5" },
{ 121, "Music: Note 3-6" },
{ 122, "Music: Note 3-7" },
{ 124, "F1?" },
{ 125, "F2?" },
{ 126, "F3?" },
{ 127, "Return?" },
{ 128, "Left Stick Move?" },
{ 129, "Pot Tasks" },
{ 130, "Pot Edit" },
{ 131, "Party Setup?" },
{ 132, "Friends" },
{ 133, "Pot Object: Turn Up?" },
{ 134, "Pot Object: Turn Down?" },
{ 135, "Pot Object: Turn Left?" },
{ 136, "Pot Object: Turn Right?" },
{ 137, "Right Stick Move?" },
{ 138, "LMB?" },
{ 139, "RMB?" },
{ 141, "Create Custom Suite?" },
};
public static Dictionary<int,string> keynames = new Dictionary<int, string>
{
{ 0, "None" },
{ 55, "Backspace" },
{ 56, "Tab" },
{ 57, "Clear" },
{ 58, "Enter" },
{ 59, "Pause" },
{ 60, "ESC" },
{ 54, "Space" },
{ 66, "'" },
{ 78, "=" },
{ 71, "," },
{ 72, "-" },
{ 73, "." },
{ 74, "/" },
{ 27, "0" },
{ 28, "1" },
{ 29, "2" },
{ 30, "3" },
{ 31, "4" },
{ 32, "5" },
{ 33, "6" },
{ 34, "7" },
{ 35, "8" },
{ 36, "9" },
{ 76, ";" },
{ 82, "[" },
{ 83, "\\" },
{ 84, "]" },
{ 87, "~" },
{ 1, "A" },
{ 2, "B" },
{ 3, "C" },
{ 4, "D" },
{ 5, "E" },
{ 6, "F" },
{ 7, "G" },
{ 8, "H" },
{ 9, "I" },
{ 10, "J" },
{ 11, "K" },
{ 12, "L" },
{ 13, "M" },
{ 14, "N" },
{ 15, "O" },
{ 16, "P" },
{ 17, "Q" },
{ 18, "R" },
{ 19, "S" },
{ 20, "T" },
{ 21, "U" },
{ 22, "V" },
{ 23, "W" },
{ 24, "X" },
{ 25, "Y" },
{ 26, "Z" },
{ 88, "Delete" },
{ 37, "Numpad 0" },
{ 38, "Numpad 1" },
{ 39, "Numpad 2" },
{ 40, "Numpad 3" },
{ 41, "Numpad 4" },
{ 42, "Numpad 5" },
{ 43, "Numpad 6" },
{ 44, "Numpad 7" },
{ 45, "Numpad 8" },
{ 46, "Numpad 9" },
{ 47, "Numpad ." },
{ 48, "Numpad /" },
{ 49, "Numpad *" },
{ 50, "Numpad -" },
{ 51, "Numpad +" },
{ 89, "Arrow Up" },
{ 90, "Arrow Down" },
{ 91, "Arrow Right" },
{ 92, "Arrow Left" },
{ 93, "Insert" },
{ 94, "Home" },
{ 95, "End" },
{ 96, "Page Up" },
{ 97, "Page Down" },
{ 98, "F1" },
{ 99, "F2" },
{ 100, "F3" },
{ 101, "F4" },
{ 102, "F5" },
{ 103, "F6" },
{ 104, "F7" },
{ 105, "F8" },
{ 106, "F9" },
{ 107, "F10" },
{ 108, "F11" },
{ 109, "F12" },
{ 110, "F13" },
{ 111, "F14" },
{ 112, "F15" },
{ 113, "NumLock" },
{ 114, "CapsLock" },
{ 115, "ScrollLock" },
{ 116, "Right Shift" },
{ 117, "Left Shift" },
{ 118, "Right Ctrl" },
{ 119, "Left Ctrl" },
{ 120, "Right Alt" },
{ 121, "Left Alt" },
{ 125, "Right Win" },
{ 124, "Left Win" },
{ 127, "Help" },
{ 128, "Print" }
};
public static Dictionary<Key, int> keyboard = new Dictionary<Key, int>
{
{ Key.None, 0 },
{ Key.Back, 55 },
{ Key.Tab, 56 },
{ Key.Clear, 57 },
{ Key.Enter, 58 },
{ Key.Pause, 59 },
{ Key.Escape, 60 },
{ Key.Space, 54 },
// ! // Better to be mapped via 0-9 + Shift
// "
// #
// $
{ Key.OemQuotes, 66 },
// (
// )
// *
{ Key.OemPlus, 78 },
{ Key.OemComma, 71 },
{ Key.OemMinus, 72 },
{ Key.OemPeriod, 73 },
{ Key.OemQuestion, 74 },
{ Key.D0, 27 },
{ Key.D1, 28 },
{ Key.D2, 29 },
{ Key.D3, 30 },
{ Key.D4, 31 },
{ Key.D5, 32 },
{ Key.D6, 33 },
{ Key.D7, 34 },
{ Key.D8, 35 },
{ Key.D9, 36 },
// :
{ Key.OemSemicolon, 76 },
// <
// =
// >
// ?
// @
{ Key.OemOpenBrackets, 82 },
{ Key.OemBackslash, 83 },
{ Key.OemCloseBrackets, 84 },
// ^
// _
{ Key.OemTilde, 87 },
{ Key.A, 1 },
{ Key.B, 2 },
{ Key.C, 3 },
{ Key.D, 4 },
{ Key.E, 5 },
{ Key.F, 6 },
{ Key.G, 7 },
{ Key.H, 8 },
{ Key.I, 9 },
{ Key.J, 10 },
{ Key.K, 11 },
{ Key.L, 12 },
{ Key.M, 13 },
{ Key.N, 14 },
{ Key.O, 15 },
{ Key.P, 16 },
{ Key.Q, 17 },
{ Key.R, 18 },
{ Key.S, 19 },
{ Key.T, 20 },
{ Key.U, 21 },
{ Key.V, 22 },
{ Key.W, 23 },
{ Key.X, 24 },
{ Key.Y, 25 },
{ Key.Z, 26 },
{ Key.Delete, 88 },
{ Key.NumPad0, 37 },
{ Key.NumPad1, 38 },
{ Key.NumPad2, 39 },
{ Key.NumPad3, 40 },
{ Key.NumPad4, 41 },
{ Key.NumPad5, 42 },
{ Key.NumPad6, 43 },
{ Key.NumPad7, 44 },
{ Key.NumPad8, 45 },
{ Key.NumPad9, 46 },
{ Key.Decimal, 47 },
{ Key.Divide, 48 },
{ Key.Multiply, 49 },
{ Key.Subtract, 50 },
{ Key.Add, 51 },
//{ Key.NumpadEnter, 271 }, // No such key, hard to distinguish
//{ Key.NumpadEqual, 272 }, // Unavailable for some reason
{ Key.Up, 89 },
{ Key.Down, 90 },
{ Key.Right, 91 },
{ Key.Left, 92 },
{ Key.Insert, 93 },
{ Key.Home, 94 },
{ Key.End, 95 },
{ Key.PageUp, 96 },
{ Key.PageDown, 97 },
{ Key.F1, 98 },
{ Key.F2, 99 },
{ Key.F3, 100 },
{ Key.F4, 101 },
{ Key.F5, 102 },
{ Key.F6, 103 },
{ Key.F7, 104 },
{ Key.F8, 105 },
{ Key.F9, 106 },
{ Key.F10, 107 },
{ Key.F11, 108 },
{ Key.F12, 109 },
{ Key.F13, 110 },
{ Key.F14, 111 },
{ Key.F15, 112 },
{ Key.NumLock, 113 },
{ Key.CapsLock, 114 },
{ Key.Scroll, 115 },
{ Key.RightShift, 116 },
{ Key.LeftShift, 117 },
{ Key.RightCtrl, 118 },
{ Key.LeftCtrl, 119 },
{ Key.RightAlt, 120 },
{ Key.LeftAlt, 121 },
// RCommand
// LCommand
{ Key.LWin, 124 },
{ Key.RWin, 125 },
// Alt Gr
{ Key.Help, 127 },
{ Key.Print, 128 },
// SysRq
// Break
// Menu
};
}
}