-
-
Notifications
You must be signed in to change notification settings - Fork 425
/
Key.cs
530 lines (426 loc) · 13.9 KB
/
Key.cs
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
495
496
497
498
499
500
501
502
503
504
505
506
507
508
509
510
511
512
513
514
515
516
517
518
519
520
521
522
523
524
525
526
527
528
529
530
namespace PuppeteerSharp.Input
{
/// <summary>
/// Utility class to be used with <see cref="Keyboard"/> operations.
/// </summary>
public class Key
{
/// <summary>
/// Cancel key.
/// </summary>
public static readonly Key Cancel = new Key("Cancel");
/// <summary>
/// Help key.
/// </summary>
public static readonly Key Help = new Key("Help");
/// <summary>
/// Backspace key.
/// </summary>
public static readonly Key Backspace = new Key("Backspace");
/// <summary>
/// Tab key.
/// </summary>
public static readonly Key Tab = new Key("Tab");
/// <summary>
/// Clear key.
/// </summary>
public static readonly Key Clear = new Key("Clear");
/// <summary>
/// Enter key.
/// </summary>
public static readonly Key Enter = new Key("Enter");
/// <summary>
/// Shift key.
/// </summary>
public static readonly Key Shift = new Key("Shift");
/// <summary>
/// Control key.
/// </summary>
public static readonly Key Control = new Key("Control");
/// <summary>
/// Alt key.
/// </summary>
public static readonly Key Alt = new Key("Alt");
/// <summary>
/// Pause key.
/// </summary>
public static readonly Key Pause = new Key("Pause");
/// <summary>
/// CapsLock key.
/// </summary>
public static readonly Key CapsLock = new Key("CapsLock");
/// <summary>
/// Escape key.
/// </summary>
public static readonly Key Escape = new Key("Escape");
/// <summary>
/// Convert key.
/// </summary>
public static readonly Key Convert = new Key("Convert");
/// <summary>
/// NonConvert key.
/// </summary>
public static readonly Key NonConvert = new Key("NonConvert");
/// <summary>
/// Accept key.
/// </summary>
public static readonly Key Accept = new Key("Accept");
/// <summary>
/// ModeChange key.
/// </summary>
public static readonly Key ModeChange = new Key("ModeChange");
/// <summary>
/// PageUp key.
/// </summary>
public static readonly Key PageUp = new Key("PageUp");
/// <summary>
/// PageDown key.
/// </summary>
public static readonly Key PageDown = new Key("PageDown");
/// <summary>
/// End key.
/// </summary>
public static readonly Key End = new Key("End");
/// <summary>
/// Home key.
/// </summary>
public static readonly Key Home = new Key("Home");
/// <summary>
/// ArrowLeft key.
/// </summary>
public static readonly Key ArrowLeft = new Key("ArrowLeft");
/// <summary>
/// ArrowUp key.
/// </summary>
public static readonly Key ArrowUp = new Key("ArrowUp");
/// <summary>
/// ArrowRight key.
/// </summary>
public static readonly Key ArrowRight = new Key("ArrowRight");
/// <summary>
/// ArrowDown key.
/// </summary>
public static readonly Key ArrowDown = new Key("ArrowDown");
/// <summary>
/// Select key.
/// </summary>
public static readonly Key Select = new Key("Select");
/// <summary>
/// Print key.
/// </summary>
public static readonly Key Print = new Key("Print");
/// <summary>
/// Execute key.
/// </summary>
public static readonly Key Execute = new Key("Execute");
/// <summary>
/// PrintScreen key.
/// </summary>
public static readonly Key PrintScreen = new Key("PrintScreen");
/// <summary>
/// Insert key.
/// </summary>
public static readonly Key Insert = new Key("Insert");
/// <summary>
/// Delete key.
/// </summary>
public static readonly Key Delete = new Key("Delete");
/// <summary>
/// ')' key.
/// </summary>
public static readonly Key CloseParentheses = new Key(")");
/// <summary>
/// '!' key.
/// </summary>
public static readonly Key ExclamationMark = new Key("!");
/// <summary>
/// '@' key.
/// </summary>
public static readonly Key AtSign = new Key("@");
/// <summary>
/// '#' key.
/// </summary>
public static readonly Key NumberSign = new Key("#");
/// <summary>
/// '$' key.
/// </summary>
public static readonly Key DollarSign = new Key("$");
/// <summary>
/// '%' key.
/// </summary>
public static readonly Key Percent = new Key("%");
/// <summary>
/// '^' key.
/// </summary>
public static readonly Key Caret = new Key("^");
/// <summary>
/// <![CDATA['&']]> key.
/// </summary>
public static readonly Key Ampersand = new Key("&");
/// <summary>
/// Asterisk key.
/// </summary>
public static readonly Key Asterisk = new Key("*");
/// <summary>
/// '(' key.
/// </summary>
public static readonly Key OpenParentheses = new Key("(");
/// <summary>
/// Meta key.
/// </summary>
public static readonly Key Meta = new Key("Meta");
/// <summary>
/// ContextMenu key.
/// </summary>
public static readonly Key ContextMenu = new Key("ContextMenu");
/// <summary>
/// F1 key.
/// </summary>
public static readonly Key F1 = new Key("F1");
/// <summary>
/// F2 key.
/// </summary>
public static readonly Key F2 = new Key("F2");
/// <summary>
/// F3 key.
/// </summary>
public static readonly Key F3 = new Key("F3");
/// <summary>
/// F4 key.
/// </summary>
public static readonly Key F4 = new Key("F4");
/// <summary>
/// F5 key.
/// </summary>
public static readonly Key F5 = new Key("F5");
/// <summary>
/// F6 key.
/// </summary>
public static readonly Key F6 = new Key("F6");
/// <summary>
/// F7 key.
/// </summary>
public static readonly Key F7 = new Key("F7");
/// <summary>
/// F8 key.
/// </summary>
public static readonly Key F8 = new Key("F8");
/// <summary>
/// F9 key.
/// </summary>
public static readonly Key F9 = new Key("F9");
/// <summary>
/// F10 key.
/// </summary>
public static readonly Key F10 = new Key("F10");
/// <summary>
/// F11 key.
/// </summary>
public static readonly Key F12 = new Key("F12");
/// <summary>
/// F12 key.
/// </summary>
public static readonly Key F11 = new Key("F11");
/// <summary>
/// F13 key.
/// </summary>
public static readonly Key F13 = new Key("F13");
/// <summary>
/// F14 key.
/// </summary>
public static readonly Key F14 = new Key("F14");
/// <summary>
/// F15 key.
/// </summary>
public static readonly Key F15 = new Key("F15");
/// <summary>
/// F16 key.
/// </summary>
public static readonly Key F16 = new Key("F16");
/// <summary>
/// F17 key.
/// </summary>
public static readonly Key F17 = new Key("F17");
/// <summary>
/// F18 key.
/// </summary>
public static readonly Key F18 = new Key("F18");
/// <summary>
/// F19 key.
/// </summary>
public static readonly Key F19 = new Key("F19");
/// <summary>
/// F20 key.
/// </summary>
public static readonly Key F20 = new Key("F20");
/// <summary>
/// F21 key.
/// </summary>
public static readonly Key F21 = new Key("F21");
/// <summary>
/// F22 key.
/// </summary>
public static readonly Key F22 = new Key("F22");
/// <summary>
/// F23 key.
/// </summary>
public static readonly Key F23 = new Key("F23");
/// <summary>
/// F24 key.
/// </summary>
public static readonly Key F24 = new Key("F24");
/// <summary>
/// NumLock key.
/// </summary>
public static readonly Key NumLock = new Key("NumLock");
/// <summary>
/// ScrollLock key.
/// </summary>
public static readonly Key ScrollLock = new Key("ScrollLock");
/// <summary>
/// AudioVolumeMute key.
/// </summary>
public static readonly Key AudioVolumeMute = new Key("AudioVolumeMute");
/// <summary>
/// AudioVolumeDown key.
/// </summary>
public static readonly Key AudioVolumeDown = new Key("AudioVolumeDown");
/// <summary>
/// AudioVolumeUp key.
/// </summary>
public static readonly Key AudioVolumeUp = new Key("AudioVolumeUp");
/// <summary>
/// MediaTrackNext key.
/// </summary>
public static readonly Key MediaTrackNext = new Key("MediaTrackNext");
/// <summary>
/// MediaTrackPrevious key.
/// </summary>
public static readonly Key MediaTrackPrevious = new Key("MediaTrackPrevious");
/// <summary>
/// MediaStop key.
/// </summary>
public static readonly Key MediaStop = new Key("MediaStop");
/// <summary>
/// MediaPlayPause key.
/// </summary>
public static readonly Key MediaPlayPause = new Key("MediaPlayPause");
/// <summary>
/// ';' key.
/// </summary>
public static readonly Key Semicolon = new Key(";");
/// <summary>
/// ',' key.
/// </summary>
public static readonly Key Comma = new Key(",");
/// <summary>
/// '=' key.
/// </summary>
public static readonly Key EqualsSign = new Key("=");
/// <summary>
/// '+' key.
/// </summary>
public static readonly Key PlusSign = new Key("+");
/// <summary>
/// <![CDATA['<']]> key.
/// </summary>
public static readonly Key LesserThan = new Key("<");
/// <summary>
/// '-' key.
/// </summary>
public static readonly Key MinusSign = new Key("-");
/// <summary>
/// '_' key.
/// </summary>
public static readonly Key Underscore = new Key("_");
/// <summary>
/// '.' key.
/// </summary>
public static readonly Key Period = new Key(".");
/// <summary>
/// <![CDATA['>']]> key.
/// </summary>
public static readonly Key GreaterThan = new Key(">");
/// <summary>
/// <![CDATA['/']]>key.
/// </summary>
public static readonly Key Slash = new Key("/");
/// <summary>
/// '?' key.
/// </summary>
public static readonly Key QuestionMark = new Key("?");
/// <summary>
/// '`' key.
/// </summary>
public static readonly Key Backquote = new Key("`");
/// <summary>
/// '~' key.
/// </summary>
public static readonly Key Tilde = new Key("~");
/// <summary>
/// <![CDATA['[']]> key.
/// </summary>
public static readonly Key OpenSquareBrackets = new Key("[");
/// <summary>
/// '{' key.
/// </summary>
public static readonly Key OpenBrackets = new Key("{");
/// <summary>
/// <![CDATA[']']]> key.
/// </summary>
public static readonly Key CloseSquareBrackets = new Key("]");
/// <summary>
/// '|' key.
/// </summary>
public static readonly Key Pipe = new Key("|");
/// <summary>
/// '}' key.
/// </summary>
public static readonly Key CloseBrackets = new Key("}");
/// <summary>
/// '\' key.
/// </summary>
public static readonly Key Backslash = new Key("\\");
/// <summary>
/// AltGraph key.
/// </summary>
public static readonly Key AltGraph = new Key("AltGraph");
/// <summary>
/// Attn key.
/// </summary>
public static readonly Key Attn = new Key("Attn");
/// <summary>
/// CrSel key.
/// </summary>
public static readonly Key CrSel = new Key("CrSel");
/// <summary>
/// ExSel key.
/// </summary>
public static readonly Key ExSel = new Key("ExSel");
/// <summary>
/// EraseEof key.
/// </summary>
public static readonly Key EraseEof = new Key("EraseEof");
/// <summary>
/// Play key.
/// </summary>
public static readonly Key Play = new Key("Play");
/// <summary>
/// ZoomOut key.
/// </summary>
public static readonly Key ZoomOut = new Key("ZoomOut");
private readonly string _value;
private Key(string value) => _value = value;
/// <summary>
/// Converts the <paramref name="key"/> to its underlining string value.
/// </summary>
/// <param name="key">The key.</param>
[System.Diagnostics.CodeAnalysis.SuppressMessage("Design", "CA1062:Validate arguments of public methods", Justification = "Exceptions should not be raised in this type of method.")]
public static implicit operator string(Key key)
{
return key._value;
}
/// <inheritdoc />
public override string ToString() => _value;
}
}