cuprite 0.6.0 → 0.7.0

Sign up to get free protection for your applications and to get access to all the features.
@@ -1,50 +0,0 @@
1
- module Capybara::Cuprite
2
- class Browser
3
- module DOM
4
- def current_url
5
- evaluate_in(execution_context_id, "window.top.location.href")
6
- end
7
-
8
- def title
9
- evaluate_in(execution_context_id, "window.top.document.title")
10
- end
11
-
12
- def body
13
- evaluate("document.documentElement.outerHTML")
14
- end
15
-
16
- def all_text(node)
17
- evaluate_on(node: node, expr: "this.textContent")
18
- end
19
-
20
- def property(node, name)
21
- evaluate_on(node: node, expr: %Q(this["#{name}"]))
22
- end
23
-
24
- def attributes(node)
25
- value = evaluate_on(node: node, expr: "_cuprite.getAttributes(this)")
26
- JSON.parse(value)
27
- end
28
-
29
- def attribute(node, name)
30
- evaluate_on(node: node, expr: %Q(_cuprite.getAttribute(this, "#{name}")))
31
- end
32
-
33
- def value(node)
34
- evaluate_on(node: node, expr: "_cuprite.value(this)")
35
- end
36
-
37
- def visible?(node)
38
- evaluate_on(node: node, expr: "_cuprite.isVisible(this)")
39
- end
40
-
41
- def disabled?(node)
42
- evaluate_on(node: node, expr: "_cuprite.isDisabled(this)")
43
- end
44
-
45
- def path(node)
46
- evaluate_on(node: node, expr: "_cuprite.path(this)")
47
- end
48
- end
49
- end
50
- end
@@ -1,115 +0,0 @@
1
- module Capybara::Cuprite
2
- class Browser
3
- module Frame
4
- def execution_context_id
5
- @mutex.synchronize do
6
- if !@frame_stack.empty?
7
- @frames[@frame_stack.last]["execution_context_id"]
8
- else
9
- @execution_context_id
10
- end
11
- end
12
- end
13
-
14
- def frame_name
15
- evaluate("window.name")
16
- end
17
-
18
- def frame_url
19
- evaluate("window.location.href")
20
- end
21
-
22
- def frame_title
23
- evaluate("document.title")
24
- end
25
-
26
- def switch_to_frame(handle)
27
- case handle
28
- when Capybara::Node::Base
29
- @frame_stack << handle.native.node["frameId"]
30
- inject_extensions
31
- when :parent
32
- @frame_stack.pop
33
- when :top
34
- @frame_stack = []
35
- end
36
- end
37
-
38
- private
39
-
40
- def subscribe_events
41
- super if defined?(super)
42
-
43
- @client.subscribe("Page.frameAttached") do |params|
44
- @frames[params["frameId"]] = { "parent_id" => params["parentFrameId"] }
45
- end
46
-
47
- @client.subscribe("Page.frameStartedLoading") do |params|
48
- @waiting_frames << params["frameId"]
49
- @mutex.try_lock
50
- end
51
-
52
- @client.subscribe("Page.frameNavigated") do |params|
53
- id = params["frame"]["id"]
54
- if frame = @frames[id]
55
- frame.merge!(params["frame"].select { |k, v| k == "name" || k == "url" })
56
- end
57
- end
58
-
59
- @client.subscribe("Page.frameScheduledNavigation") do |params|
60
- # Trying to lock mutex if frame is the main frame
61
- @waiting_frames << params["frameId"]
62
- @mutex.try_lock
63
- end
64
-
65
- @client.subscribe("Page.frameStoppedLoading") do |params|
66
- # `DOM.performSearch` doesn't work without getting #document node first.
67
- # It returns node with nodeId 1 and nodeType 9 from which descend the
68
- # tree and we save it in a variable because if we call that again root
69
- # node will change the id and all subsequent nodes have to change id too.
70
- # `command` is not allowed in the block as it will deadlock the process.
71
- if params["frameId"] == @frame_id
72
- signal if @waiting_frames.empty?
73
- @client.command("DOM.getDocument", depth: 0)
74
- end
75
-
76
- if @waiting_frames.include?(params["frameId"])
77
- @waiting_frames.delete(params["frameId"])
78
- signal if @waiting_frames.empty?
79
- end
80
- end
81
-
82
- @client.subscribe("Runtime.executionContextCreated") do |params|
83
- frame_id = params.dig("context", "auxData", "frameId")
84
- execution_context_id = params.dig("context", "id")
85
-
86
- # Remember the very first frame since it's the main one
87
- @frame_id ||= frame_id
88
- @execution_context_id ||= execution_context_id
89
-
90
- if @frames[frame_id]
91
- @frames[frame_id].merge!("execution_context_id" => execution_context_id)
92
- else
93
- @frames[frame_id] = { "execution_context_id" => execution_context_id }
94
- end
95
- end
96
-
97
- @client.subscribe("Runtime.executionContextDestroyed") do |params|
98
- execution_context_id = params["executionContextId"]
99
- id, frame = @frames.find { |_, p| p["execution_context_id"] == execution_context_id }
100
- frame["execution_context_id"] = nil if frame
101
-
102
- if @execution_context_id == execution_context_id
103
- @execution_context_id = nil
104
- end
105
- end
106
-
107
- @client.subscribe("Runtime.executionContextsCleared") do
108
- # If we didn't have time to set context id at the beginning we have
109
- # to set lock and release it when we set something.
110
- @execution_context_id = nil
111
- end
112
- end
113
- end
114
- end
115
- end
@@ -1,1341 +0,0 @@
1
- {
2
- "0": {
3
- "windowsVirtualKeyCode": 48,
4
- "key": "0",
5
- "code": "Digit0"
6
- },
7
- "1": {
8
- "windowsVirtualKeyCode": 49,
9
- "key": "1",
10
- "code": "Digit1"
11
- },
12
- "2": {
13
- "windowsVirtualKeyCode": 50,
14
- "key": "2",
15
- "code": "Digit2"
16
- },
17
- "3": {
18
- "windowsVirtualKeyCode": 51,
19
- "key": "3",
20
- "code": "Digit3"
21
- },
22
- "4": {
23
- "windowsVirtualKeyCode": 52,
24
- "key": "4",
25
- "code": "Digit4"
26
- },
27
- "5": {
28
- "windowsVirtualKeyCode": 53,
29
- "key": "5",
30
- "code": "Digit5"
31
- },
32
- "6": {
33
- "windowsVirtualKeyCode": 54,
34
- "key": "6",
35
- "code": "Digit6"
36
- },
37
- "7": {
38
- "windowsVirtualKeyCode": 55,
39
- "key": "7",
40
- "code": "Digit7"
41
- },
42
- "8": {
43
- "windowsVirtualKeyCode": 56,
44
- "key": "8",
45
- "code": "Digit8"
46
- },
47
- "9": {
48
- "windowsVirtualKeyCode": 57,
49
- "key": "9",
50
- "code": "Digit9"
51
- },
52
- "Power": {
53
- "key": "Power",
54
- "code": "Power"
55
- },
56
- "Eject": {
57
- "key": "Eject",
58
- "code": "Eject"
59
- },
60
- "Abort": {
61
- "windowsVirtualKeyCode": 3,
62
- "code": "Abort",
63
- "key": "Cancel"
64
- },
65
- "Help": {
66
- "windowsVirtualKeyCode": 6,
67
- "code": "Help",
68
- "key": "Help"
69
- },
70
- "Backspace": {
71
- "windowsVirtualKeyCode": 8,
72
- "code": "Backspace",
73
- "key": "Backspace"
74
- },
75
- "Tab": {
76
- "windowsVirtualKeyCode": 9,
77
- "code": "Tab",
78
- "key": "Tab"
79
- },
80
- "Numpad5": {
81
- "windowsVirtualKeyCode": 101,
82
- "shiftKeyCode": 12,
83
- "key": "Clear",
84
- "code": "Numpad5",
85
- "shiftKey": "5",
86
- "location": 3
87
- },
88
- "NumpadEnter": {
89
- "windowsVirtualKeyCode": 13,
90
- "code": "NumpadEnter",
91
- "key": "Enter",
92
- "text": "\r",
93
- "location": 3
94
- },
95
- "Enter": {
96
- "windowsVirtualKeyCode": 13,
97
- "code": "Enter",
98
- "key": "Enter",
99
- "text": "\r"
100
- },
101
- "\r": {
102
- "windowsVirtualKeyCode": 13,
103
- "code": "Enter",
104
- "key": "Enter",
105
- "text": "\r"
106
- },
107
- "\n": {
108
- "windowsVirtualKeyCode": 13,
109
- "code": "Enter",
110
- "key": "Enter",
111
- "text": "\r"
112
- },
113
- "ShiftLeft": {
114
- "windowsVirtualKeyCode": 16,
115
- "code": "ShiftLeft",
116
- "key": "Shift",
117
- "location": 1
118
- },
119
- "ShiftRight": {
120
- "windowsVirtualKeyCode": 16,
121
- "code": "ShiftRight",
122
- "key": "Shift",
123
- "location": 2
124
- },
125
- "ControlLeft": {
126
- "windowsVirtualKeyCode": 17,
127
- "code": "ControlLeft",
128
- "key": "Control",
129
- "location": 1
130
- },
131
- "ControlRight": {
132
- "windowsVirtualKeyCode": 17,
133
- "code": "ControlRight",
134
- "key": "Control",
135
- "location": 2
136
- },
137
- "AltLeft": {
138
- "windowsVirtualKeyCode": 18,
139
- "code": "AltLeft",
140
- "key": "Alt",
141
- "location": 1
142
- },
143
- "AltRight": {
144
- "windowsVirtualKeyCode": 18,
145
- "code": "AltRight",
146
- "key": "Alt",
147
- "location": 2
148
- },
149
- "Pause": {
150
- "windowsVirtualKeyCode": 19,
151
- "code": "Pause",
152
- "key": "Pause"
153
- },
154
- "CapsLock": {
155
- "windowsVirtualKeyCode": 20,
156
- "code": "CapsLock",
157
- "key": "CapsLock"
158
- },
159
- "Escape": {
160
- "windowsVirtualKeyCode": 27,
161
- "code": "Escape",
162
- "key": "Escape"
163
- },
164
- "Convert": {
165
- "windowsVirtualKeyCode": 28,
166
- "code": "Convert",
167
- "key": "Convert"
168
- },
169
- "NonConvert": {
170
- "windowsVirtualKeyCode": 29,
171
- "code": "NonConvert",
172
- "key": "NonConvert"
173
- },
174
- "Space": {
175
- "windowsVirtualKeyCode": 32,
176
- "code": "Space",
177
- "key": " ",
178
- "text": " "
179
- },
180
- "Numpad9": {
181
- "windowsVirtualKeyCode": 105,
182
- "shiftKeyCode": 33,
183
- "key": "PageUp",
184
- "code": "Numpad9",
185
- "shiftKey": "9",
186
- "location": 3
187
- },
188
- "PageUp": {
189
- "windowsVirtualKeyCode": 33,
190
- "code": "PageUp",
191
- "key": "PageUp"
192
- },
193
- "Numpad3": {
194
- "windowsVirtualKeyCode": 99,
195
- "shiftKeyCode": 34,
196
- "key": "PageDown",
197
- "code": "Numpad3",
198
- "shiftKey": "3",
199
- "location": 3
200
- },
201
- "PageDown": {
202
- "windowsVirtualKeyCode": 34,
203
- "code": "PageDown",
204
- "key": "PageDown"
205
- },
206
- "End": {
207
- "windowsVirtualKeyCode": 35,
208
- "code": "End",
209
- "key": "End"
210
- },
211
- "Numpad1": {
212
- "windowsVirtualKeyCode": 97,
213
- "shiftKeyCode": 35,
214
- "key": "End",
215
- "code": "Numpad1",
216
- "shiftKey": "1",
217
- "location": 3
218
- },
219
- "Home": {
220
- "windowsVirtualKeyCode": 36,
221
- "code": "Home",
222
- "key": "Home"
223
- },
224
- "Numpad7": {
225
- "windowsVirtualKeyCode": 103,
226
- "shiftKeyCode": 36,
227
- "key": "Home",
228
- "code": "Numpad7",
229
- "shiftKey": "7",
230
- "location": 3
231
- },
232
- "ArrowLeft": {
233
- "windowsVirtualKeyCode": 37,
234
- "code": "ArrowLeft",
235
- "key": "ArrowLeft"
236
- },
237
- "Numpad4": {
238
- "windowsVirtualKeyCode": 100,
239
- "shiftKeyCode": 37,
240
- "key": "ArrowLeft",
241
- "code": "Numpad4",
242
- "shiftKey": "4",
243
- "location": 3
244
- },
245
- "Numpad8": {
246
- "windowsVirtualKeyCode": 104,
247
- "shiftKeyCode": 38,
248
- "key": "ArrowUp",
249
- "code": "Numpad8",
250
- "shiftKey": "8",
251
- "location": 3
252
- },
253
- "ArrowUp": {
254
- "windowsVirtualKeyCode": 38,
255
- "code": "ArrowUp",
256
- "key": "ArrowUp"
257
- },
258
- "ArrowRight": {
259
- "windowsVirtualKeyCode": 39,
260
- "code": "ArrowRight",
261
- "key": "ArrowRight"
262
- },
263
- "Numpad6": {
264
- "windowsVirtualKeyCode": 102,
265
- "shiftKeyCode": 39,
266
- "key": "ArrowRight",
267
- "code": "Numpad6",
268
- "shiftKey": "6",
269
- "location": 3
270
- },
271
- "Numpad2": {
272
- "windowsVirtualKeyCode": 98,
273
- "shiftKeyCode": 40,
274
- "key": "ArrowDown",
275
- "code": "Numpad2",
276
- "shiftKey": "2",
277
- "location": 3
278
- },
279
- "ArrowDown": {
280
- "windowsVirtualKeyCode": 40,
281
- "code": "ArrowDown",
282
- "key": "ArrowDown"
283
- },
284
- "Select": {
285
- "windowsVirtualKeyCode": 41,
286
- "code": "Select",
287
- "key": "Select"
288
- },
289
- "Open": {
290
- "windowsVirtualKeyCode": 43,
291
- "code": "Open",
292
- "key": "Execute"
293
- },
294
- "PrintScreen": {
295
- "windowsVirtualKeyCode": 44,
296
- "code": "PrintScreen",
297
- "key": "PrintScreen"
298
- },
299
- "Insert": {
300
- "windowsVirtualKeyCode": 45,
301
- "code": "Insert",
302
- "key": "Insert"
303
- },
304
- "Numpad0": {
305
- "windowsVirtualKeyCode": 96,
306
- "shiftKeyCode": 45,
307
- "key": "Insert",
308
- "code": "Numpad0",
309
- "shiftKey": "0",
310
- "location": 3
311
- },
312
- "Delete": {
313
- "windowsVirtualKeyCode": 46,
314
- "code": "Delete",
315
- "key": "Delete"
316
- },
317
- "NumpadDecimal": {
318
- "windowsVirtualKeyCode": 110,
319
- "shiftKeyCode": 46,
320
- "code": "NumpadDecimal",
321
- "key": "\u0000",
322
- "shiftKey": ".",
323
- "location": 3
324
- },
325
- "Digit0": {
326
- "windowsVirtualKeyCode": 48,
327
- "code": "Digit0",
328
- "shiftKey": ")",
329
- "key": "0"
330
- },
331
- "Digit1": {
332
- "windowsVirtualKeyCode": 49,
333
- "code": "Digit1",
334
- "shiftKey": "!",
335
- "key": "1"
336
- },
337
- "Digit2": {
338
- "windowsVirtualKeyCode": 50,
339
- "code": "Digit2",
340
- "shiftKey": "@",
341
- "key": "2"
342
- },
343
- "Digit3": {
344
- "windowsVirtualKeyCode": 51,
345
- "code": "Digit3",
346
- "shiftKey": "#",
347
- "key": "3"
348
- },
349
- "Digit4": {
350
- "windowsVirtualKeyCode": 52,
351
- "code": "Digit4",
352
- "shiftKey": "$",
353
- "key": "4"
354
- },
355
- "Digit5": {
356
- "windowsVirtualKeyCode": 53,
357
- "code": "Digit5",
358
- "shiftKey": "%",
359
- "key": "5"
360
- },
361
- "Digit6": {
362
- "windowsVirtualKeyCode": 54,
363
- "code": "Digit6",
364
- "shiftKey": "^",
365
- "key": "6"
366
- },
367
- "Digit7": {
368
- "windowsVirtualKeyCode": 55,
369
- "code": "Digit7",
370
- "shiftKey": "&",
371
- "key": "7"
372
- },
373
- "Digit8": {
374
- "windowsVirtualKeyCode": 56,
375
- "code": "Digit8",
376
- "shiftKey": "*",
377
- "key": "8"
378
- },
379
- "Digit9": {
380
- "windowsVirtualKeyCode": 57,
381
- "code": "Digit9",
382
- "shiftKey": "(",
383
- "key": "9"
384
- },
385
- "KeyA": {
386
- "windowsVirtualKeyCode": 65,
387
- "code": "KeyA",
388
- "shiftKey": "A",
389
- "key": "a"
390
- },
391
- "KeyB": {
392
- "windowsVirtualKeyCode": 66,
393
- "code": "KeyB",
394
- "shiftKey": "B",
395
- "key": "b"
396
- },
397
- "KeyC": {
398
- "windowsVirtualKeyCode": 67,
399
- "code": "KeyC",
400
- "shiftKey": "C",
401
- "key": "c"
402
- },
403
- "KeyD": {
404
- "windowsVirtualKeyCode": 68,
405
- "code": "KeyD",
406
- "shiftKey": "D",
407
- "key": "d"
408
- },
409
- "KeyE": {
410
- "windowsVirtualKeyCode": 69,
411
- "code": "KeyE",
412
- "shiftKey": "E",
413
- "key": "e"
414
- },
415
- "KeyF": {
416
- "windowsVirtualKeyCode": 70,
417
- "code": "KeyF",
418
- "shiftKey": "F",
419
- "key": "f"
420
- },
421
- "KeyG": {
422
- "windowsVirtualKeyCode": 71,
423
- "code": "KeyG",
424
- "shiftKey": "G",
425
- "key": "g"
426
- },
427
- "KeyH": {
428
- "windowsVirtualKeyCode": 72,
429
- "code": "KeyH",
430
- "shiftKey": "H",
431
- "key": "h"
432
- },
433
- "KeyI": {
434
- "windowsVirtualKeyCode": 73,
435
- "code": "KeyI",
436
- "shiftKey": "I",
437
- "key": "i"
438
- },
439
- "KeyJ": {
440
- "windowsVirtualKeyCode": 74,
441
- "code": "KeyJ",
442
- "shiftKey": "J",
443
- "key": "j"
444
- },
445
- "KeyK": {
446
- "windowsVirtualKeyCode": 75,
447
- "code": "KeyK",
448
- "shiftKey": "K",
449
- "key": "k"
450
- },
451
- "KeyL": {
452
- "windowsVirtualKeyCode": 76,
453
- "code": "KeyL",
454
- "shiftKey": "L",
455
- "key": "l"
456
- },
457
- "KeyM": {
458
- "windowsVirtualKeyCode": 77,
459
- "code": "KeyM",
460
- "shiftKey": "M",
461
- "key": "m"
462
- },
463
- "KeyN": {
464
- "windowsVirtualKeyCode": 78,
465
- "code": "KeyN",
466
- "shiftKey": "N",
467
- "key": "n"
468
- },
469
- "KeyO": {
470
- "windowsVirtualKeyCode": 79,
471
- "code": "KeyO",
472
- "shiftKey": "O",
473
- "key": "o"
474
- },
475
- "KeyP": {
476
- "windowsVirtualKeyCode": 80,
477
- "code": "KeyP",
478
- "shiftKey": "P",
479
- "key": "p"
480
- },
481
- "KeyQ": {
482
- "windowsVirtualKeyCode": 81,
483
- "code": "KeyQ",
484
- "shiftKey": "Q",
485
- "key": "q"
486
- },
487
- "KeyR": {
488
- "windowsVirtualKeyCode": 82,
489
- "code": "KeyR",
490
- "shiftKey": "R",
491
- "key": "r"
492
- },
493
- "KeyS": {
494
- "windowsVirtualKeyCode": 83,
495
- "code": "KeyS",
496
- "shiftKey": "S",
497
- "key": "s"
498
- },
499
- "KeyT": {
500
- "windowsVirtualKeyCode": 84,
501
- "code": "KeyT",
502
- "shiftKey": "T",
503
- "key": "t"
504
- },
505
- "KeyU": {
506
- "windowsVirtualKeyCode": 85,
507
- "code": "KeyU",
508
- "shiftKey": "U",
509
- "key": "u"
510
- },
511
- "KeyV": {
512
- "windowsVirtualKeyCode": 86,
513
- "code": "KeyV",
514
- "shiftKey": "V",
515
- "key": "v"
516
- },
517
- "KeyW": {
518
- "windowsVirtualKeyCode": 87,
519
- "code": "KeyW",
520
- "shiftKey": "W",
521
- "key": "w"
522
- },
523
- "KeyX": {
524
- "windowsVirtualKeyCode": 88,
525
- "code": "KeyX",
526
- "shiftKey": "X",
527
- "key": "x"
528
- },
529
- "KeyY": {
530
- "windowsVirtualKeyCode": 89,
531
- "code": "KeyY",
532
- "shiftKey": "Y",
533
- "key": "y"
534
- },
535
- "KeyZ": {
536
- "windowsVirtualKeyCode": 90,
537
- "code": "KeyZ",
538
- "shiftKey": "Z",
539
- "key": "z"
540
- },
541
- "MetaLeft": {
542
- "windowsVirtualKeyCode": 91,
543
- "code": "MetaLeft",
544
- "key": "Meta",
545
- "location": 1
546
- },
547
- "MetaRight": {
548
- "windowsVirtualKeyCode": 92,
549
- "code": "MetaRight",
550
- "key": "Meta",
551
- "location": 2
552
- },
553
- "ContextMenu": {
554
- "windowsVirtualKeyCode": 93,
555
- "code": "ContextMenu",
556
- "key": "ContextMenu"
557
- },
558
- "NumpadMultiply": {
559
- "windowsVirtualKeyCode": 106,
560
- "code": "NumpadMultiply",
561
- "key": "*",
562
- "location": 3
563
- },
564
- "NumpadAdd": {
565
- "windowsVirtualKeyCode": 107,
566
- "code": "NumpadAdd",
567
- "key": "+",
568
- "location": 3
569
- },
570
- "NumpadSubtract": {
571
- "windowsVirtualKeyCode": 109,
572
- "code": "NumpadSubtract",
573
- "key": "-",
574
- "location": 3
575
- },
576
- "NumpadDivide": {
577
- "windowsVirtualKeyCode": 111,
578
- "code": "NumpadDivide",
579
- "key": "/",
580
- "location": 3
581
- },
582
- "F1": {
583
- "windowsVirtualKeyCode": 112,
584
- "code": "F1",
585
- "key": "F1"
586
- },
587
- "F2": {
588
- "windowsVirtualKeyCode": 113,
589
- "code": "F2",
590
- "key": "F2"
591
- },
592
- "F3": {
593
- "windowsVirtualKeyCode": 114,
594
- "code": "F3",
595
- "key": "F3"
596
- },
597
- "F4": {
598
- "windowsVirtualKeyCode": 115,
599
- "code": "F4",
600
- "key": "F4"
601
- },
602
- "F5": {
603
- "windowsVirtualKeyCode": 116,
604
- "code": "F5",
605
- "key": "F5"
606
- },
607
- "F6": {
608
- "windowsVirtualKeyCode": 117,
609
- "code": "F6",
610
- "key": "F6"
611
- },
612
- "F7": {
613
- "windowsVirtualKeyCode": 118,
614
- "code": "F7",
615
- "key": "F7"
616
- },
617
- "F8": {
618
- "windowsVirtualKeyCode": 119,
619
- "code": "F8",
620
- "key": "F8"
621
- },
622
- "F9": {
623
- "windowsVirtualKeyCode": 120,
624
- "code": "F9",
625
- "key": "F9"
626
- },
627
- "F10": {
628
- "windowsVirtualKeyCode": 121,
629
- "code": "F10",
630
- "key": "F10"
631
- },
632
- "F11": {
633
- "windowsVirtualKeyCode": 122,
634
- "code": "F11",
635
- "key": "F11"
636
- },
637
- "F12": {
638
- "windowsVirtualKeyCode": 123,
639
- "code": "F12",
640
- "key": "F12"
641
- },
642
- "F13": {
643
- "windowsVirtualKeyCode": 124,
644
- "code": "F13",
645
- "key": "F13"
646
- },
647
- "F14": {
648
- "windowsVirtualKeyCode": 125,
649
- "code": "F14",
650
- "key": "F14"
651
- },
652
- "F15": {
653
- "windowsVirtualKeyCode": 126,
654
- "code": "F15",
655
- "key": "F15"
656
- },
657
- "F16": {
658
- "windowsVirtualKeyCode": 127,
659
- "code": "F16",
660
- "key": "F16"
661
- },
662
- "F17": {
663
- "windowsVirtualKeyCode": 128,
664
- "code": "F17",
665
- "key": "F17"
666
- },
667
- "F18": {
668
- "windowsVirtualKeyCode": 129,
669
- "code": "F18",
670
- "key": "F18"
671
- },
672
- "F19": {
673
- "windowsVirtualKeyCode": 130,
674
- "code": "F19",
675
- "key": "F19"
676
- },
677
- "F20": {
678
- "windowsVirtualKeyCode": 131,
679
- "code": "F20",
680
- "key": "F20"
681
- },
682
- "F21": {
683
- "windowsVirtualKeyCode": 132,
684
- "code": "F21",
685
- "key": "F21"
686
- },
687
- "F22": {
688
- "windowsVirtualKeyCode": 133,
689
- "code": "F22",
690
- "key": "F22"
691
- },
692
- "F23": {
693
- "windowsVirtualKeyCode": 134,
694
- "code": "F23",
695
- "key": "F23"
696
- },
697
- "F24": {
698
- "windowsVirtualKeyCode": 135,
699
- "code": "F24",
700
- "key": "F24"
701
- },
702
- "NumLock": {
703
- "windowsVirtualKeyCode": 144,
704
- "code": "NumLock",
705
- "key": "NumLock"
706
- },
707
- "ScrollLock": {
708
- "windowsVirtualKeyCode": 145,
709
- "code": "ScrollLock",
710
- "key": "ScrollLock"
711
- },
712
- "AudioVolumeMute": {
713
- "windowsVirtualKeyCode": 173,
714
- "code": "AudioVolumeMute",
715
- "key": "AudioVolumeMute"
716
- },
717
- "AudioVolumeDown": {
718
- "windowsVirtualKeyCode": 174,
719
- "code": "AudioVolumeDown",
720
- "key": "AudioVolumeDown"
721
- },
722
- "AudioVolumeUp": {
723
- "windowsVirtualKeyCode": 175,
724
- "code": "AudioVolumeUp",
725
- "key": "AudioVolumeUp"
726
- },
727
- "MediaTrackNext": {
728
- "windowsVirtualKeyCode": 176,
729
- "code": "MediaTrackNext",
730
- "key": "MediaTrackNext"
731
- },
732
- "MediaTrackPrevious": {
733
- "windowsVirtualKeyCode": 177,
734
- "code": "MediaTrackPrevious",
735
- "key": "MediaTrackPrevious"
736
- },
737
- "MediaStop": {
738
- "windowsVirtualKeyCode": 178,
739
- "code": "MediaStop",
740
- "key": "MediaStop"
741
- },
742
- "MediaPlayPause": {
743
- "windowsVirtualKeyCode": 179,
744
- "code": "MediaPlayPause",
745
- "key": "MediaPlayPause"
746
- },
747
- "Semicolon": {
748
- "windowsVirtualKeyCode": 186,
749
- "code": "Semicolon",
750
- "shiftKey": ":",
751
- "key": ";"
752
- },
753
- "Equal": {
754
- "windowsVirtualKeyCode": 187,
755
- "code": "Equal",
756
- "shiftKey": "+",
757
- "key": "="
758
- },
759
- "NumpadEqual": {
760
- "windowsVirtualKeyCode": 187,
761
- "code": "NumpadEqual",
762
- "key": "=",
763
- "location": 3
764
- },
765
- "Comma": {
766
- "windowsVirtualKeyCode": 188,
767
- "code": "Comma",
768
- "shiftKey": "<",
769
- "key": ","
770
- },
771
- "Minus": {
772
- "windowsVirtualKeyCode": 189,
773
- "code": "Minus",
774
- "shiftKey": "_",
775
- "key": "-"
776
- },
777
- "Period": {
778
- "windowsVirtualKeyCode": 190,
779
- "code": "Period",
780
- "shiftKey": ">",
781
- "key": "."
782
- },
783
- "Slash": {
784
- "windowsVirtualKeyCode": 191,
785
- "code": "Slash",
786
- "shiftKey": "?",
787
- "key": "/"
788
- },
789
- "Backquote": {
790
- "windowsVirtualKeyCode": 192,
791
- "code": "Backquote",
792
- "shiftKey": "~",
793
- "key": "`"
794
- },
795
- "BracketLeft": {
796
- "windowsVirtualKeyCode": 219,
797
- "code": "BracketLeft",
798
- "shiftKey": "{",
799
- "key": "["
800
- },
801
- "Backslash": {
802
- "windowsVirtualKeyCode": 220,
803
- "code": "Backslash",
804
- "shiftKey": "|",
805
- "key": "\\"
806
- },
807
- "BracketRight": {
808
- "windowsVirtualKeyCode": 221,
809
- "code": "BracketRight",
810
- "shiftKey": "}",
811
- "key": "]"
812
- },
813
- "Quote": {
814
- "windowsVirtualKeyCode": 222,
815
- "code": "Quote",
816
- "shiftKey": "\"",
817
- "key": "'"
818
- },
819
- "AltGraph": {
820
- "windowsVirtualKeyCode": 225,
821
- "code": "AltGraph",
822
- "key": "AltGraph"
823
- },
824
- "Props": {
825
- "windowsVirtualKeyCode": 247,
826
- "code": "Props",
827
- "key": "CrSel"
828
- },
829
- "Cancel": {
830
- "windowsVirtualKeyCode": 3,
831
- "key": "Cancel",
832
- "code": "Abort"
833
- },
834
- "Clear": {
835
- "windowsVirtualKeyCode": 12,
836
- "key": "Clear",
837
- "code": "Numpad5",
838
- "location": 3
839
- },
840
- "Shift": {
841
- "windowsVirtualKeyCode": 16,
842
- "key": "Shift",
843
- "code": "ShiftLeft",
844
- "location": 1
845
- },
846
- "Control": {
847
- "windowsVirtualKeyCode": 17,
848
- "key": "Control",
849
- "code": "ControlLeft",
850
- "location": 1
851
- },
852
- "Alt": {
853
- "windowsVirtualKeyCode": 18,
854
- "key": "Alt",
855
- "code": "AltLeft",
856
- "location": 1
857
- },
858
- "Accept": {
859
- "windowsVirtualKeyCode": 30,
860
- "key": "Accept"
861
- },
862
- "ModeChange": {
863
- "windowsVirtualKeyCode": 31,
864
- "key": "ModeChange"
865
- },
866
- " ": {
867
- "windowsVirtualKeyCode": 32,
868
- "key": " ",
869
- "code": "Space"
870
- },
871
- "Print": {
872
- "windowsVirtualKeyCode": 42,
873
- "key": "Print"
874
- },
875
- "Execute": {
876
- "windowsVirtualKeyCode": 43,
877
- "key": "Execute",
878
- "code": "Open"
879
- },
880
- "\u0000": {
881
- "windowsVirtualKeyCode": 46,
882
- "key": "\u0000",
883
- "code": "NumpadDecimal",
884
- "location": 3
885
- },
886
- "a": {
887
- "windowsVirtualKeyCode": 65,
888
- "key": "a",
889
- "code": "KeyA"
890
- },
891
- "b": {
892
- "windowsVirtualKeyCode": 66,
893
- "key": "b",
894
- "code": "KeyB"
895
- },
896
- "c": {
897
- "windowsVirtualKeyCode": 67,
898
- "key": "c",
899
- "code": "KeyC"
900
- },
901
- "d": {
902
- "windowsVirtualKeyCode": 68,
903
- "key": "d",
904
- "code": "KeyD"
905
- },
906
- "e": {
907
- "windowsVirtualKeyCode": 69,
908
- "key": "e",
909
- "code": "KeyE"
910
- },
911
- "f": {
912
- "windowsVirtualKeyCode": 70,
913
- "key": "f",
914
- "code": "KeyF"
915
- },
916
- "g": {
917
- "windowsVirtualKeyCode": 71,
918
- "key": "g",
919
- "code": "KeyG"
920
- },
921
- "h": {
922
- "windowsVirtualKeyCode": 72,
923
- "key": "h",
924
- "code": "KeyH"
925
- },
926
- "i": {
927
- "windowsVirtualKeyCode": 73,
928
- "key": "i",
929
- "code": "KeyI"
930
- },
931
- "j": {
932
- "windowsVirtualKeyCode": 74,
933
- "key": "j",
934
- "code": "KeyJ"
935
- },
936
- "k": {
937
- "windowsVirtualKeyCode": 75,
938
- "key": "k",
939
- "code": "KeyK"
940
- },
941
- "l": {
942
- "windowsVirtualKeyCode": 76,
943
- "key": "l",
944
- "code": "KeyL"
945
- },
946
- "m": {
947
- "windowsVirtualKeyCode": 77,
948
- "key": "m",
949
- "code": "KeyM"
950
- },
951
- "n": {
952
- "windowsVirtualKeyCode": 78,
953
- "key": "n",
954
- "code": "KeyN"
955
- },
956
- "o": {
957
- "windowsVirtualKeyCode": 79,
958
- "key": "o",
959
- "code": "KeyO"
960
- },
961
- "p": {
962
- "windowsVirtualKeyCode": 80,
963
- "key": "p",
964
- "code": "KeyP"
965
- },
966
- "q": {
967
- "windowsVirtualKeyCode": 81,
968
- "key": "q",
969
- "code": "KeyQ"
970
- },
971
- "r": {
972
- "windowsVirtualKeyCode": 82,
973
- "key": "r",
974
- "code": "KeyR"
975
- },
976
- "s": {
977
- "windowsVirtualKeyCode": 83,
978
- "key": "s",
979
- "code": "KeyS"
980
- },
981
- "t": {
982
- "windowsVirtualKeyCode": 84,
983
- "key": "t",
984
- "code": "KeyT"
985
- },
986
- "u": {
987
- "windowsVirtualKeyCode": 85,
988
- "key": "u",
989
- "code": "KeyU"
990
- },
991
- "v": {
992
- "windowsVirtualKeyCode": 86,
993
- "key": "v",
994
- "code": "KeyV"
995
- },
996
- "w": {
997
- "windowsVirtualKeyCode": 87,
998
- "key": "w",
999
- "code": "KeyW"
1000
- },
1001
- "x": {
1002
- "windowsVirtualKeyCode": 88,
1003
- "key": "x",
1004
- "code": "KeyX"
1005
- },
1006
- "y": {
1007
- "windowsVirtualKeyCode": 89,
1008
- "key": "y",
1009
- "code": "KeyY"
1010
- },
1011
- "z": {
1012
- "windowsVirtualKeyCode": 90,
1013
- "key": "z",
1014
- "code": "KeyZ"
1015
- },
1016
- "Meta": {
1017
- "windowsVirtualKeyCode": 91,
1018
- "key": "Meta",
1019
- "code": "MetaLeft",
1020
- "location": 1
1021
- },
1022
- "*": {
1023
- "windowsVirtualKeyCode": 106,
1024
- "key": "*",
1025
- "code": "NumpadMultiply",
1026
- "location": 3
1027
- },
1028
- "+": {
1029
- "windowsVirtualKeyCode": 107,
1030
- "key": "+",
1031
- "code": "NumpadAdd",
1032
- "location": 3
1033
- },
1034
- "-": {
1035
- "windowsVirtualKeyCode": 109,
1036
- "key": "-",
1037
- "code": "NumpadSubtract",
1038
- "location": 3
1039
- },
1040
- "/": {
1041
- "windowsVirtualKeyCode": 111,
1042
- "key": "/",
1043
- "code": "NumpadDivide",
1044
- "location": 3
1045
- },
1046
- ";": {
1047
- "windowsVirtualKeyCode": 186,
1048
- "key": ";",
1049
- "code": "Semicolon"
1050
- },
1051
- "=": {
1052
- "windowsVirtualKeyCode": 187,
1053
- "key": "=",
1054
- "code": "Equal"
1055
- },
1056
- ",": {
1057
- "windowsVirtualKeyCode": 188,
1058
- "key": ",",
1059
- "code": "Comma"
1060
- },
1061
- ".": {
1062
- "windowsVirtualKeyCode": 190,
1063
- "key": ".",
1064
- "code": "Period"
1065
- },
1066
- "`": {
1067
- "windowsVirtualKeyCode": 192,
1068
- "key": "`",
1069
- "code": "Backquote"
1070
- },
1071
- "[": {
1072
- "windowsVirtualKeyCode": 219,
1073
- "key": "[",
1074
- "code": "BracketLeft"
1075
- },
1076
- "\\": {
1077
- "windowsVirtualKeyCode": 220,
1078
- "key": "\\",
1079
- "code": "Backslash"
1080
- },
1081
- "]": {
1082
- "windowsVirtualKeyCode": 221,
1083
- "key": "]",
1084
- "code": "BracketRight"
1085
- },
1086
- "'": {
1087
- "windowsVirtualKeyCode": 222,
1088
- "key": "'",
1089
- "code": "Quote"
1090
- },
1091
- "Attn": {
1092
- "windowsVirtualKeyCode": 246,
1093
- "key": "Attn"
1094
- },
1095
- "CrSel": {
1096
- "windowsVirtualKeyCode": 247,
1097
- "key": "CrSel",
1098
- "code": "Props"
1099
- },
1100
- "ExSel": {
1101
- "windowsVirtualKeyCode": 248,
1102
- "key": "ExSel"
1103
- },
1104
- "EraseEof": {
1105
- "windowsVirtualKeyCode": 249,
1106
- "key": "EraseEof"
1107
- },
1108
- "Play": {
1109
- "windowsVirtualKeyCode": 250,
1110
- "key": "Play"
1111
- },
1112
- "ZoomOut": {
1113
- "windowsVirtualKeyCode": 251,
1114
- "key": "ZoomOut"
1115
- },
1116
- ")": {
1117
- "windowsVirtualKeyCode": 48,
1118
- "key": ")",
1119
- "code": "Digit0"
1120
- },
1121
- "!": {
1122
- "windowsVirtualKeyCode": 49,
1123
- "key": "!",
1124
- "code": "Digit1"
1125
- },
1126
- "@": {
1127
- "windowsVirtualKeyCode": 50,
1128
- "key": "@",
1129
- "code": "Digit2"
1130
- },
1131
- "#": {
1132
- "windowsVirtualKeyCode": 51,
1133
- "key": "#",
1134
- "code": "Digit3"
1135
- },
1136
- "$": {
1137
- "windowsVirtualKeyCode": 52,
1138
- "key": "$",
1139
- "code": "Digit4"
1140
- },
1141
- "%": {
1142
- "windowsVirtualKeyCode": 53,
1143
- "key": "%",
1144
- "code": "Digit5"
1145
- },
1146
- "^": {
1147
- "windowsVirtualKeyCode": 54,
1148
- "key": "^",
1149
- "code": "Digit6"
1150
- },
1151
- "&": {
1152
- "windowsVirtualKeyCode": 55,
1153
- "key": "&",
1154
- "code": "Digit7"
1155
- },
1156
- "(": {
1157
- "windowsVirtualKeyCode": 57,
1158
- "key": "(",
1159
- "code": "Digit9"
1160
- },
1161
- "A": {
1162
- "windowsVirtualKeyCode": 65,
1163
- "key": "A",
1164
- "code": "KeyA"
1165
- },
1166
- "B": {
1167
- "windowsVirtualKeyCode": 66,
1168
- "key": "B",
1169
- "code": "KeyB"
1170
- },
1171
- "C": {
1172
- "windowsVirtualKeyCode": 67,
1173
- "key": "C",
1174
- "code": "KeyC"
1175
- },
1176
- "D": {
1177
- "windowsVirtualKeyCode": 68,
1178
- "key": "D",
1179
- "code": "KeyD"
1180
- },
1181
- "E": {
1182
- "windowsVirtualKeyCode": 69,
1183
- "key": "E",
1184
- "code": "KeyE"
1185
- },
1186
- "F": {
1187
- "windowsVirtualKeyCode": 70,
1188
- "key": "F",
1189
- "code": "KeyF"
1190
- },
1191
- "G": {
1192
- "windowsVirtualKeyCode": 71,
1193
- "key": "G",
1194
- "code": "KeyG"
1195
- },
1196
- "H": {
1197
- "windowsVirtualKeyCode": 72,
1198
- "key": "H",
1199
- "code": "KeyH"
1200
- },
1201
- "I": {
1202
- "windowsVirtualKeyCode": 73,
1203
- "key": "I",
1204
- "code": "KeyI"
1205
- },
1206
- "J": {
1207
- "windowsVirtualKeyCode": 74,
1208
- "key": "J",
1209
- "code": "KeyJ"
1210
- },
1211
- "K": {
1212
- "windowsVirtualKeyCode": 75,
1213
- "key": "K",
1214
- "code": "KeyK"
1215
- },
1216
- "L": {
1217
- "windowsVirtualKeyCode": 76,
1218
- "key": "L",
1219
- "code": "KeyL"
1220
- },
1221
- "M": {
1222
- "windowsVirtualKeyCode": 77,
1223
- "key": "M",
1224
- "code": "KeyM"
1225
- },
1226
- "N": {
1227
- "windowsVirtualKeyCode": 78,
1228
- "key": "N",
1229
- "code": "KeyN"
1230
- },
1231
- "O": {
1232
- "windowsVirtualKeyCode": 79,
1233
- "key": "O",
1234
- "code": "KeyO"
1235
- },
1236
- "P": {
1237
- "windowsVirtualKeyCode": 80,
1238
- "key": "P",
1239
- "code": "KeyP"
1240
- },
1241
- "Q": {
1242
- "windowsVirtualKeyCode": 81,
1243
- "key": "Q",
1244
- "code": "KeyQ"
1245
- },
1246
- "R": {
1247
- "windowsVirtualKeyCode": 82,
1248
- "key": "R",
1249
- "code": "KeyR"
1250
- },
1251
- "S": {
1252
- "windowsVirtualKeyCode": 83,
1253
- "key": "S",
1254
- "code": "KeyS"
1255
- },
1256
- "T": {
1257
- "windowsVirtualKeyCode": 84,
1258
- "key": "T",
1259
- "code": "KeyT"
1260
- },
1261
- "U": {
1262
- "windowsVirtualKeyCode": 85,
1263
- "key": "U",
1264
- "code": "KeyU"
1265
- },
1266
- "V": {
1267
- "windowsVirtualKeyCode": 86,
1268
- "key": "V",
1269
- "code": "KeyV"
1270
- },
1271
- "W": {
1272
- "windowsVirtualKeyCode": 87,
1273
- "key": "W",
1274
- "code": "KeyW"
1275
- },
1276
- "X": {
1277
- "windowsVirtualKeyCode": 88,
1278
- "key": "X",
1279
- "code": "KeyX"
1280
- },
1281
- "Y": {
1282
- "windowsVirtualKeyCode": 89,
1283
- "key": "Y",
1284
- "code": "KeyY"
1285
- },
1286
- "Z": {
1287
- "windowsVirtualKeyCode": 90,
1288
- "key": "Z",
1289
- "code": "KeyZ"
1290
- },
1291
- ":": {
1292
- "windowsVirtualKeyCode": 186,
1293
- "key": ":",
1294
- "code": "Semicolon"
1295
- },
1296
- "<": {
1297
- "windowsVirtualKeyCode": 188,
1298
- "key": "<",
1299
- "code": "Comma"
1300
- },
1301
- "_": {
1302
- "windowsVirtualKeyCode": 189,
1303
- "key": "_",
1304
- "code": "Minus"
1305
- },
1306
- ">": {
1307
- "windowsVirtualKeyCode": 190,
1308
- "key": ">",
1309
- "code": "Period"
1310
- },
1311
- "?": {
1312
- "windowsVirtualKeyCode": 191,
1313
- "key": "?",
1314
- "code": "Slash"
1315
- },
1316
- "~": {
1317
- "windowsVirtualKeyCode": 192,
1318
- "key": "~",
1319
- "code": "Backquote"
1320
- },
1321
- "{": {
1322
- "windowsVirtualKeyCode": 219,
1323
- "key": "{",
1324
- "code": "BracketLeft"
1325
- },
1326
- "|": {
1327
- "windowsVirtualKeyCode": 220,
1328
- "key": "|",
1329
- "code": "Backslash"
1330
- },
1331
- "}": {
1332
- "windowsVirtualKeyCode": 221,
1333
- "key": "}",
1334
- "code": "BracketRight"
1335
- },
1336
- "\"": {
1337
- "windowsVirtualKeyCode": 222,
1338
- "key": "\"",
1339
- "code": "Quote"
1340
- }
1341
- }