@rpascene/shared 0.30.8

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (177) hide show
  1. package/README.md +9 -0
  2. package/dist/es/baseDB.mjs +109 -0
  3. package/dist/es/build/copy-static.mjs +29 -0
  4. package/dist/es/common.mjs +37 -0
  5. package/dist/es/constants/example-code.mjs +202 -0
  6. package/dist/es/constants/index.mjs +74 -0
  7. package/dist/es/env/basic.mjs +6 -0
  8. package/dist/es/env/constants.mjs +97 -0
  9. package/dist/es/env/decide-model-config.mjs +172 -0
  10. package/dist/es/env/global-config-manager.mjs +82 -0
  11. package/dist/es/env/helper.mjs +45 -0
  12. package/dist/es/env/index.mjs +5 -0
  13. package/dist/es/env/init-debug.mjs +18 -0
  14. package/dist/es/env/model-config-manager.mjs +99 -0
  15. package/dist/es/env/parse.mjs +69 -0
  16. package/dist/es/env/types.mjs +265 -0
  17. package/dist/es/env/utils.mjs +18 -0
  18. package/dist/es/extractor/constants.mjs +2 -0
  19. package/dist/es/extractor/cs_postmessage.mjs +61 -0
  20. package/dist/es/extractor/customLocator.mjs +646 -0
  21. package/dist/es/extractor/debug.mjs +6 -0
  22. package/dist/es/extractor/dom-util.mjs +92 -0
  23. package/dist/es/extractor/index.mjs +7 -0
  24. package/dist/es/extractor/locator.mjs +95 -0
  25. package/dist/es/extractor/tree.mjs +81 -0
  26. package/dist/es/extractor/util.mjs +244 -0
  27. package/dist/es/extractor/web-extractor.mjs +361 -0
  28. package/dist/es/img/box-select.mjs +184 -0
  29. package/dist/es/img/draw-box.mjs +42 -0
  30. package/dist/es/img/get-jimp.mjs +10 -0
  31. package/dist/es/img/get-photon.mjs +19 -0
  32. package/dist/es/img/get-sharp.mjs +11 -0
  33. package/dist/es/img/index.mjs +5 -0
  34. package/dist/es/img/info.mjs +32 -0
  35. package/dist/es/img/transform.mjs +192 -0
  36. package/dist/es/index.mjs +3 -0
  37. package/dist/es/logger.mjs +61 -0
  38. package/dist/es/node/fs.mjs +44 -0
  39. package/dist/es/node/index.mjs +1 -0
  40. package/dist/es/polyfills/async-hooks.mjs +2 -0
  41. package/dist/es/polyfills/index.mjs +1 -0
  42. package/dist/es/types/index.mjs +3 -0
  43. package/dist/es/us-keyboard-layout.mjs +1414 -0
  44. package/dist/es/us-keyboard-layout.mjs.LICENSE.txt +5 -0
  45. package/dist/es/utils.mjs +66 -0
  46. package/dist/lib/baseDB.js +149 -0
  47. package/dist/lib/build/copy-static.js +77 -0
  48. package/dist/lib/common.js +93 -0
  49. package/dist/lib/constants/example-code.js +239 -0
  50. package/dist/lib/constants/index.js +153 -0
  51. package/dist/lib/env/basic.js +40 -0
  52. package/dist/lib/env/constants.js +143 -0
  53. package/dist/lib/env/decide-model-config.js +212 -0
  54. package/dist/lib/env/global-config-manager.js +116 -0
  55. package/dist/lib/env/helper.js +85 -0
  56. package/dist/lib/env/index.js +94 -0
  57. package/dist/lib/env/init-debug.js +52 -0
  58. package/dist/lib/env/model-config-manager.js +133 -0
  59. package/dist/lib/env/parse.js +106 -0
  60. package/dist/lib/env/types.js +650 -0
  61. package/dist/lib/env/utils.js +61 -0
  62. package/dist/lib/extractor/constants.js +42 -0
  63. package/dist/lib/extractor/cs_postmessage.js +98 -0
  64. package/dist/lib/extractor/customLocator.js +698 -0
  65. package/dist/lib/extractor/debug.js +12 -0
  66. package/dist/lib/extractor/dom-util.js +150 -0
  67. package/dist/lib/extractor/index.js +153 -0
  68. package/dist/lib/extractor/locator.js +141 -0
  69. package/dist/lib/extractor/tree.js +127 -0
  70. package/dist/lib/extractor/util.js +335 -0
  71. package/dist/lib/extractor/web-extractor.js +407 -0
  72. package/dist/lib/img/box-select.js +232 -0
  73. package/dist/lib/img/draw-box.js +89 -0
  74. package/dist/lib/img/get-jimp.js +72 -0
  75. package/dist/lib/img/get-photon.js +76 -0
  76. package/dist/lib/img/get-sharp.js +63 -0
  77. package/dist/lib/img/index.js +102 -0
  78. package/dist/lib/img/info.js +86 -0
  79. package/dist/lib/img/transform.js +279 -0
  80. package/dist/lib/index.js +43 -0
  81. package/dist/lib/logger.js +114 -0
  82. package/dist/lib/node/fs.js +97 -0
  83. package/dist/lib/node/index.js +60 -0
  84. package/dist/lib/polyfills/async-hooks.js +36 -0
  85. package/dist/lib/polyfills/index.js +60 -0
  86. package/dist/lib/types/index.js +37 -0
  87. package/dist/lib/us-keyboard-layout.js +1457 -0
  88. package/dist/lib/us-keyboard-layout.js.LICENSE.txt +5 -0
  89. package/dist/lib/utils.js +136 -0
  90. package/dist/types/baseDB.d.ts +25 -0
  91. package/dist/types/build/copy-static.d.ts +31 -0
  92. package/dist/types/common.d.ts +12 -0
  93. package/dist/types/constants/example-code.d.ts +2 -0
  94. package/dist/types/constants/index.d.ts +23 -0
  95. package/dist/types/env/basic.d.ts +6 -0
  96. package/dist/types/env/constants.d.ts +40 -0
  97. package/dist/types/env/decide-model-config.d.ts +14 -0
  98. package/dist/types/env/global-config-manager.d.ts +32 -0
  99. package/dist/types/env/helper.d.ts +6 -0
  100. package/dist/types/env/index.d.ts +4 -0
  101. package/dist/types/env/init-debug.d.ts +1 -0
  102. package/dist/types/env/model-config-manager.d.ts +24 -0
  103. package/dist/types/env/parse.d.ts +12 -0
  104. package/dist/types/env/types.d.ts +295 -0
  105. package/dist/types/env/utils.d.ts +7 -0
  106. package/dist/types/extractor/constants.d.ts +1 -0
  107. package/dist/types/extractor/cs_postmessage.d.ts +2 -0
  108. package/dist/types/extractor/customLocator.d.ts +69 -0
  109. package/dist/types/extractor/debug.d.ts +1 -0
  110. package/dist/types/extractor/dom-util.d.ts +26 -0
  111. package/dist/types/extractor/index.d.ts +36 -0
  112. package/dist/types/extractor/locator.d.ts +7 -0
  113. package/dist/types/extractor/tree.d.ts +9 -0
  114. package/dist/types/extractor/util.d.ts +43 -0
  115. package/dist/types/extractor/web-extractor.d.ts +19 -0
  116. package/dist/types/img/box-select.d.ts +25 -0
  117. package/dist/types/img/draw-box.d.ts +15 -0
  118. package/dist/types/img/get-jimp.d.ts +2 -0
  119. package/dist/types/img/get-photon.d.ts +8 -0
  120. package/dist/types/img/get-sharp.d.ts +3 -0
  121. package/dist/types/img/index.d.ts +4 -0
  122. package/dist/types/img/info.d.ts +29 -0
  123. package/dist/types/img/transform.d.ts +88 -0
  124. package/dist/types/index.d.ts +3 -0
  125. package/dist/types/logger.d.ts +4 -0
  126. package/dist/types/node/fs.d.ts +15 -0
  127. package/dist/types/node/index.d.ts +1 -0
  128. package/dist/types/polyfills/async-hooks.d.ts +6 -0
  129. package/dist/types/polyfills/index.d.ts +4 -0
  130. package/dist/types/types/index.d.ts +37 -0
  131. package/dist/types/us-keyboard-layout.d.ts +32 -0
  132. package/dist/types/utils.d.ts +22 -0
  133. package/package.json +102 -0
  134. package/src/baseDB.ts +158 -0
  135. package/src/build/copy-static.ts +62 -0
  136. package/src/common.ts +67 -0
  137. package/src/constants/example-code.ts +202 -0
  138. package/src/constants/index.ts +81 -0
  139. package/src/env/basic.ts +12 -0
  140. package/src/env/constants.ts +291 -0
  141. package/src/env/decide-model-config.ts +319 -0
  142. package/src/env/global-config-manager.ts +174 -0
  143. package/src/env/helper.ts +80 -0
  144. package/src/env/index.ts +4 -0
  145. package/src/env/init-debug.ts +29 -0
  146. package/src/env/model-config-manager.ts +145 -0
  147. package/src/env/parse.ts +131 -0
  148. package/src/env/types.ts +573 -0
  149. package/src/env/utils.ts +39 -0
  150. package/src/extractor/constants.ts +5 -0
  151. package/src/extractor/cs_postmessage.ts +101 -0
  152. package/src/extractor/customLocator.ts +1138 -0
  153. package/src/extractor/debug.ts +10 -0
  154. package/src/extractor/dom-util.ts +141 -0
  155. package/src/extractor/index.ts +54 -0
  156. package/src/extractor/locator.ts +179 -0
  157. package/src/extractor/tree.ts +179 -0
  158. package/src/extractor/util.ts +468 -0
  159. package/src/extractor/web-extractor.ts +559 -0
  160. package/src/img/box-select.ts +346 -0
  161. package/src/img/draw-box.ts +60 -0
  162. package/src/img/get-jimp.ts +12 -0
  163. package/src/img/get-photon.ts +48 -0
  164. package/src/img/get-sharp.ts +18 -0
  165. package/src/img/index.ts +24 -0
  166. package/src/img/info.ts +79 -0
  167. package/src/img/jimp.d.ts +4 -0
  168. package/src/img/transform.ts +396 -0
  169. package/src/index.ts +6 -0
  170. package/src/logger.ts +93 -0
  171. package/src/node/fs.ts +84 -0
  172. package/src/node/index.ts +1 -0
  173. package/src/polyfills/async-hooks.ts +6 -0
  174. package/src/polyfills/index.ts +4 -0
  175. package/src/types/index.ts +53 -0
  176. package/src/us-keyboard-layout.ts +723 -0
  177. package/src/utils.ts +127 -0
@@ -0,0 +1,1457 @@
1
+ /*! For license information please see us-keyboard-layout.js.LICENSE.txt */
2
+ "use strict";
3
+ var __webpack_require__ = {};
4
+ (()=>{
5
+ __webpack_require__.d = (exports1, definition)=>{
6
+ for(var key in definition)if (__webpack_require__.o(definition, key) && !__webpack_require__.o(exports1, key)) Object.defineProperty(exports1, key, {
7
+ enumerable: true,
8
+ get: definition[key]
9
+ });
10
+ };
11
+ })();
12
+ (()=>{
13
+ __webpack_require__.o = (obj, prop)=>Object.prototype.hasOwnProperty.call(obj, prop);
14
+ })();
15
+ (()=>{
16
+ __webpack_require__.r = (exports1)=>{
17
+ if ('undefined' != typeof Symbol && Symbol.toStringTag) Object.defineProperty(exports1, Symbol.toStringTag, {
18
+ value: 'Module'
19
+ });
20
+ Object.defineProperty(exports1, '__esModule', {
21
+ value: true
22
+ });
23
+ };
24
+ })();
25
+ var __webpack_exports__ = {};
26
+ __webpack_require__.r(__webpack_exports__);
27
+ __webpack_require__.d(__webpack_exports__, {
28
+ _keyDefinitions: ()=>_keyDefinitions,
29
+ getKeyDefinition: ()=>getKeyDefinition,
30
+ isMac: ()=>isMac,
31
+ transformHotkeyInput: ()=>transformHotkeyInput
32
+ });
33
+ /**
34
+ * @license
35
+ * Copyright 2017 Google Inc.
36
+ * SPDX-License-Identifier: Apache-2.0
37
+ */ const _keyDefinitions = {
38
+ 0: {
39
+ keyCode: 48,
40
+ key: '0',
41
+ code: 'Digit0'
42
+ },
43
+ 1: {
44
+ keyCode: 49,
45
+ key: '1',
46
+ code: 'Digit1'
47
+ },
48
+ 2: {
49
+ keyCode: 50,
50
+ key: '2',
51
+ code: 'Digit2'
52
+ },
53
+ 3: {
54
+ keyCode: 51,
55
+ key: '3',
56
+ code: 'Digit3'
57
+ },
58
+ 4: {
59
+ keyCode: 52,
60
+ key: '4',
61
+ code: 'Digit4'
62
+ },
63
+ 5: {
64
+ keyCode: 53,
65
+ key: '5',
66
+ code: 'Digit5'
67
+ },
68
+ 6: {
69
+ keyCode: 54,
70
+ key: '6',
71
+ code: 'Digit6'
72
+ },
73
+ 7: {
74
+ keyCode: 55,
75
+ key: '7',
76
+ code: 'Digit7'
77
+ },
78
+ 8: {
79
+ keyCode: 56,
80
+ key: '8',
81
+ code: 'Digit8'
82
+ },
83
+ 9: {
84
+ keyCode: 57,
85
+ key: '9',
86
+ code: 'Digit9'
87
+ },
88
+ Power: {
89
+ key: 'Power',
90
+ code: 'Power'
91
+ },
92
+ Eject: {
93
+ key: 'Eject',
94
+ code: 'Eject'
95
+ },
96
+ Abort: {
97
+ keyCode: 3,
98
+ code: 'Abort',
99
+ key: 'Cancel'
100
+ },
101
+ Help: {
102
+ keyCode: 6,
103
+ code: 'Help',
104
+ key: 'Help'
105
+ },
106
+ Backspace: {
107
+ keyCode: 8,
108
+ code: 'Backspace',
109
+ key: 'Backspace'
110
+ },
111
+ Tab: {
112
+ keyCode: 9,
113
+ code: 'Tab',
114
+ key: 'Tab'
115
+ },
116
+ Numpad5: {
117
+ keyCode: 12,
118
+ shiftKeyCode: 101,
119
+ key: 'Clear',
120
+ code: 'Numpad5',
121
+ shiftKey: '5',
122
+ location: 3
123
+ },
124
+ NumpadEnter: {
125
+ keyCode: 13,
126
+ code: 'NumpadEnter',
127
+ key: 'Enter',
128
+ text: '\r',
129
+ location: 3
130
+ },
131
+ Enter: {
132
+ keyCode: 13,
133
+ code: 'Enter',
134
+ key: 'Enter',
135
+ text: '\r'
136
+ },
137
+ '\r': {
138
+ keyCode: 13,
139
+ code: 'Enter',
140
+ key: 'Enter',
141
+ text: '\r'
142
+ },
143
+ '\n': {
144
+ keyCode: 13,
145
+ code: 'Enter',
146
+ key: 'Enter',
147
+ text: '\r'
148
+ },
149
+ ShiftLeft: {
150
+ keyCode: 16,
151
+ code: 'ShiftLeft',
152
+ key: 'Shift',
153
+ location: 1
154
+ },
155
+ ShiftRight: {
156
+ keyCode: 16,
157
+ code: 'ShiftRight',
158
+ key: 'Shift',
159
+ location: 2
160
+ },
161
+ ControlLeft: {
162
+ keyCode: 17,
163
+ code: 'ControlLeft',
164
+ key: 'Control',
165
+ location: 1
166
+ },
167
+ ControlRight: {
168
+ keyCode: 17,
169
+ code: 'ControlRight',
170
+ key: 'Control',
171
+ location: 2
172
+ },
173
+ AltLeft: {
174
+ keyCode: 18,
175
+ code: 'AltLeft',
176
+ key: 'Alt',
177
+ location: 1
178
+ },
179
+ AltRight: {
180
+ keyCode: 18,
181
+ code: 'AltRight',
182
+ key: 'Alt',
183
+ location: 2
184
+ },
185
+ Pause: {
186
+ keyCode: 19,
187
+ code: 'Pause',
188
+ key: 'Pause'
189
+ },
190
+ CapsLock: {
191
+ keyCode: 20,
192
+ code: 'CapsLock',
193
+ key: 'CapsLock'
194
+ },
195
+ Escape: {
196
+ keyCode: 27,
197
+ code: 'Escape',
198
+ key: 'Escape'
199
+ },
200
+ Convert: {
201
+ keyCode: 28,
202
+ code: 'Convert',
203
+ key: 'Convert'
204
+ },
205
+ NonConvert: {
206
+ keyCode: 29,
207
+ code: 'NonConvert',
208
+ key: 'NonConvert'
209
+ },
210
+ Space: {
211
+ keyCode: 32,
212
+ code: 'Space',
213
+ key: ' '
214
+ },
215
+ Numpad9: {
216
+ keyCode: 33,
217
+ shiftKeyCode: 105,
218
+ key: 'PageUp',
219
+ code: 'Numpad9',
220
+ shiftKey: '9',
221
+ location: 3
222
+ },
223
+ PageUp: {
224
+ keyCode: 33,
225
+ code: 'PageUp',
226
+ key: 'PageUp'
227
+ },
228
+ Numpad3: {
229
+ keyCode: 34,
230
+ shiftKeyCode: 99,
231
+ key: 'PageDown',
232
+ code: 'Numpad3',
233
+ shiftKey: '3',
234
+ location: 3
235
+ },
236
+ PageDown: {
237
+ keyCode: 34,
238
+ code: 'PageDown',
239
+ key: 'PageDown'
240
+ },
241
+ End: {
242
+ keyCode: 35,
243
+ code: 'End',
244
+ key: 'End'
245
+ },
246
+ Numpad1: {
247
+ keyCode: 35,
248
+ shiftKeyCode: 97,
249
+ key: 'End',
250
+ code: 'Numpad1',
251
+ shiftKey: '1',
252
+ location: 3
253
+ },
254
+ Home: {
255
+ keyCode: 36,
256
+ code: 'Home',
257
+ key: 'Home'
258
+ },
259
+ Numpad7: {
260
+ keyCode: 36,
261
+ shiftKeyCode: 103,
262
+ key: 'Home',
263
+ code: 'Numpad7',
264
+ shiftKey: '7',
265
+ location: 3
266
+ },
267
+ ArrowLeft: {
268
+ keyCode: 37,
269
+ code: 'ArrowLeft',
270
+ key: 'ArrowLeft'
271
+ },
272
+ Numpad4: {
273
+ keyCode: 37,
274
+ shiftKeyCode: 100,
275
+ key: 'ArrowLeft',
276
+ code: 'Numpad4',
277
+ shiftKey: '4',
278
+ location: 3
279
+ },
280
+ Numpad8: {
281
+ keyCode: 38,
282
+ shiftKeyCode: 104,
283
+ key: 'ArrowUp',
284
+ code: 'Numpad8',
285
+ shiftKey: '8',
286
+ location: 3
287
+ },
288
+ ArrowUp: {
289
+ keyCode: 38,
290
+ code: 'ArrowUp',
291
+ key: 'ArrowUp'
292
+ },
293
+ ArrowRight: {
294
+ keyCode: 39,
295
+ code: 'ArrowRight',
296
+ key: 'ArrowRight'
297
+ },
298
+ Numpad6: {
299
+ keyCode: 39,
300
+ shiftKeyCode: 102,
301
+ key: 'ArrowRight',
302
+ code: 'Numpad6',
303
+ shiftKey: '6',
304
+ location: 3
305
+ },
306
+ Numpad2: {
307
+ keyCode: 40,
308
+ shiftKeyCode: 98,
309
+ key: 'ArrowDown',
310
+ code: 'Numpad2',
311
+ shiftKey: '2',
312
+ location: 3
313
+ },
314
+ ArrowDown: {
315
+ keyCode: 40,
316
+ code: 'ArrowDown',
317
+ key: 'ArrowDown'
318
+ },
319
+ Select: {
320
+ keyCode: 41,
321
+ code: 'Select',
322
+ key: 'Select'
323
+ },
324
+ Open: {
325
+ keyCode: 43,
326
+ code: 'Open',
327
+ key: 'Execute'
328
+ },
329
+ PrintScreen: {
330
+ keyCode: 44,
331
+ code: 'PrintScreen',
332
+ key: 'PrintScreen'
333
+ },
334
+ Insert: {
335
+ keyCode: 45,
336
+ code: 'Insert',
337
+ key: 'Insert'
338
+ },
339
+ Numpad0: {
340
+ keyCode: 45,
341
+ shiftKeyCode: 96,
342
+ key: 'Insert',
343
+ code: 'Numpad0',
344
+ shiftKey: '0',
345
+ location: 3
346
+ },
347
+ Delete: {
348
+ keyCode: 46,
349
+ code: 'Delete',
350
+ key: 'Delete'
351
+ },
352
+ NumpadDecimal: {
353
+ keyCode: 46,
354
+ shiftKeyCode: 110,
355
+ code: 'NumpadDecimal',
356
+ key: '\u0000',
357
+ shiftKey: '.',
358
+ location: 3
359
+ },
360
+ Digit0: {
361
+ keyCode: 48,
362
+ code: 'Digit0',
363
+ shiftKey: ')',
364
+ key: '0'
365
+ },
366
+ Digit1: {
367
+ keyCode: 49,
368
+ code: 'Digit1',
369
+ shiftKey: '!',
370
+ key: '1'
371
+ },
372
+ Digit2: {
373
+ keyCode: 50,
374
+ code: 'Digit2',
375
+ shiftKey: '@',
376
+ key: '2'
377
+ },
378
+ Digit3: {
379
+ keyCode: 51,
380
+ code: 'Digit3',
381
+ shiftKey: '#',
382
+ key: '3'
383
+ },
384
+ Digit4: {
385
+ keyCode: 52,
386
+ code: 'Digit4',
387
+ shiftKey: '$',
388
+ key: '4'
389
+ },
390
+ Digit5: {
391
+ keyCode: 53,
392
+ code: 'Digit5',
393
+ shiftKey: '%',
394
+ key: '5'
395
+ },
396
+ Digit6: {
397
+ keyCode: 54,
398
+ code: 'Digit6',
399
+ shiftKey: '^',
400
+ key: '6'
401
+ },
402
+ Digit7: {
403
+ keyCode: 55,
404
+ code: 'Digit7',
405
+ shiftKey: '&',
406
+ key: '7'
407
+ },
408
+ Digit8: {
409
+ keyCode: 56,
410
+ code: 'Digit8',
411
+ shiftKey: '*',
412
+ key: '8'
413
+ },
414
+ Digit9: {
415
+ keyCode: 57,
416
+ code: 'Digit9',
417
+ shiftKey: '(',
418
+ key: '9'
419
+ },
420
+ KeyA: {
421
+ keyCode: 65,
422
+ code: 'KeyA',
423
+ shiftKey: 'A',
424
+ key: 'a'
425
+ },
426
+ KeyB: {
427
+ keyCode: 66,
428
+ code: 'KeyB',
429
+ shiftKey: 'B',
430
+ key: 'b'
431
+ },
432
+ KeyC: {
433
+ keyCode: 67,
434
+ code: 'KeyC',
435
+ shiftKey: 'C',
436
+ key: 'c'
437
+ },
438
+ KeyD: {
439
+ keyCode: 68,
440
+ code: 'KeyD',
441
+ shiftKey: 'D',
442
+ key: 'd'
443
+ },
444
+ KeyE: {
445
+ keyCode: 69,
446
+ code: 'KeyE',
447
+ shiftKey: 'E',
448
+ key: 'e'
449
+ },
450
+ KeyF: {
451
+ keyCode: 70,
452
+ code: 'KeyF',
453
+ shiftKey: 'F',
454
+ key: 'f'
455
+ },
456
+ KeyG: {
457
+ keyCode: 71,
458
+ code: 'KeyG',
459
+ shiftKey: 'G',
460
+ key: 'g'
461
+ },
462
+ KeyH: {
463
+ keyCode: 72,
464
+ code: 'KeyH',
465
+ shiftKey: 'H',
466
+ key: 'h'
467
+ },
468
+ KeyI: {
469
+ keyCode: 73,
470
+ code: 'KeyI',
471
+ shiftKey: 'I',
472
+ key: 'i'
473
+ },
474
+ KeyJ: {
475
+ keyCode: 74,
476
+ code: 'KeyJ',
477
+ shiftKey: 'J',
478
+ key: 'j'
479
+ },
480
+ KeyK: {
481
+ keyCode: 75,
482
+ code: 'KeyK',
483
+ shiftKey: 'K',
484
+ key: 'k'
485
+ },
486
+ KeyL: {
487
+ keyCode: 76,
488
+ code: 'KeyL',
489
+ shiftKey: 'L',
490
+ key: 'l'
491
+ },
492
+ KeyM: {
493
+ keyCode: 77,
494
+ code: 'KeyM',
495
+ shiftKey: 'M',
496
+ key: 'm'
497
+ },
498
+ KeyN: {
499
+ keyCode: 78,
500
+ code: 'KeyN',
501
+ shiftKey: 'N',
502
+ key: 'n'
503
+ },
504
+ KeyO: {
505
+ keyCode: 79,
506
+ code: 'KeyO',
507
+ shiftKey: 'O',
508
+ key: 'o'
509
+ },
510
+ KeyP: {
511
+ keyCode: 80,
512
+ code: 'KeyP',
513
+ shiftKey: 'P',
514
+ key: 'p'
515
+ },
516
+ KeyQ: {
517
+ keyCode: 81,
518
+ code: 'KeyQ',
519
+ shiftKey: 'Q',
520
+ key: 'q'
521
+ },
522
+ KeyR: {
523
+ keyCode: 82,
524
+ code: 'KeyR',
525
+ shiftKey: 'R',
526
+ key: 'r'
527
+ },
528
+ KeyS: {
529
+ keyCode: 83,
530
+ code: 'KeyS',
531
+ shiftKey: 'S',
532
+ key: 's'
533
+ },
534
+ KeyT: {
535
+ keyCode: 84,
536
+ code: 'KeyT',
537
+ shiftKey: 'T',
538
+ key: 't'
539
+ },
540
+ KeyU: {
541
+ keyCode: 85,
542
+ code: 'KeyU',
543
+ shiftKey: 'U',
544
+ key: 'u'
545
+ },
546
+ KeyV: {
547
+ keyCode: 86,
548
+ code: 'KeyV',
549
+ shiftKey: 'V',
550
+ key: 'v'
551
+ },
552
+ KeyW: {
553
+ keyCode: 87,
554
+ code: 'KeyW',
555
+ shiftKey: 'W',
556
+ key: 'w'
557
+ },
558
+ KeyX: {
559
+ keyCode: 88,
560
+ code: 'KeyX',
561
+ shiftKey: 'X',
562
+ key: 'x'
563
+ },
564
+ KeyY: {
565
+ keyCode: 89,
566
+ code: 'KeyY',
567
+ shiftKey: 'Y',
568
+ key: 'y'
569
+ },
570
+ KeyZ: {
571
+ keyCode: 90,
572
+ code: 'KeyZ',
573
+ shiftKey: 'Z',
574
+ key: 'z'
575
+ },
576
+ MetaLeft: {
577
+ keyCode: 91,
578
+ code: 'MetaLeft',
579
+ key: 'Meta',
580
+ location: 1
581
+ },
582
+ MetaRight: {
583
+ keyCode: 92,
584
+ code: 'MetaRight',
585
+ key: 'Meta',
586
+ location: 2
587
+ },
588
+ ContextMenu: {
589
+ keyCode: 93,
590
+ code: 'ContextMenu',
591
+ key: 'ContextMenu'
592
+ },
593
+ NumpadMultiply: {
594
+ keyCode: 106,
595
+ code: 'NumpadMultiply',
596
+ key: '*',
597
+ location: 3
598
+ },
599
+ NumpadAdd: {
600
+ keyCode: 107,
601
+ code: 'NumpadAdd',
602
+ key: '+',
603
+ location: 3
604
+ },
605
+ NumpadSubtract: {
606
+ keyCode: 109,
607
+ code: 'NumpadSubtract',
608
+ key: '-',
609
+ location: 3
610
+ },
611
+ NumpadDivide: {
612
+ keyCode: 111,
613
+ code: 'NumpadDivide',
614
+ key: '/',
615
+ location: 3
616
+ },
617
+ F1: {
618
+ keyCode: 112,
619
+ code: 'F1',
620
+ key: 'F1'
621
+ },
622
+ F2: {
623
+ keyCode: 113,
624
+ code: 'F2',
625
+ key: 'F2'
626
+ },
627
+ F3: {
628
+ keyCode: 114,
629
+ code: 'F3',
630
+ key: 'F3'
631
+ },
632
+ F4: {
633
+ keyCode: 115,
634
+ code: 'F4',
635
+ key: 'F4'
636
+ },
637
+ F5: {
638
+ keyCode: 116,
639
+ code: 'F5',
640
+ key: 'F5'
641
+ },
642
+ F6: {
643
+ keyCode: 117,
644
+ code: 'F6',
645
+ key: 'F6'
646
+ },
647
+ F7: {
648
+ keyCode: 118,
649
+ code: 'F7',
650
+ key: 'F7'
651
+ },
652
+ F8: {
653
+ keyCode: 119,
654
+ code: 'F8',
655
+ key: 'F8'
656
+ },
657
+ F9: {
658
+ keyCode: 120,
659
+ code: 'F9',
660
+ key: 'F9'
661
+ },
662
+ F10: {
663
+ keyCode: 121,
664
+ code: 'F10',
665
+ key: 'F10'
666
+ },
667
+ F11: {
668
+ keyCode: 122,
669
+ code: 'F11',
670
+ key: 'F11'
671
+ },
672
+ F12: {
673
+ keyCode: 123,
674
+ code: 'F12',
675
+ key: 'F12'
676
+ },
677
+ F13: {
678
+ keyCode: 124,
679
+ code: 'F13',
680
+ key: 'F13'
681
+ },
682
+ F14: {
683
+ keyCode: 125,
684
+ code: 'F14',
685
+ key: 'F14'
686
+ },
687
+ F15: {
688
+ keyCode: 126,
689
+ code: 'F15',
690
+ key: 'F15'
691
+ },
692
+ F16: {
693
+ keyCode: 127,
694
+ code: 'F16',
695
+ key: 'F16'
696
+ },
697
+ F17: {
698
+ keyCode: 128,
699
+ code: 'F17',
700
+ key: 'F17'
701
+ },
702
+ F18: {
703
+ keyCode: 129,
704
+ code: 'F18',
705
+ key: 'F18'
706
+ },
707
+ F19: {
708
+ keyCode: 130,
709
+ code: 'F19',
710
+ key: 'F19'
711
+ },
712
+ F20: {
713
+ keyCode: 131,
714
+ code: 'F20',
715
+ key: 'F20'
716
+ },
717
+ F21: {
718
+ keyCode: 132,
719
+ code: 'F21',
720
+ key: 'F21'
721
+ },
722
+ F22: {
723
+ keyCode: 133,
724
+ code: 'F22',
725
+ key: 'F22'
726
+ },
727
+ F23: {
728
+ keyCode: 134,
729
+ code: 'F23',
730
+ key: 'F23'
731
+ },
732
+ F24: {
733
+ keyCode: 135,
734
+ code: 'F24',
735
+ key: 'F24'
736
+ },
737
+ NumLock: {
738
+ keyCode: 144,
739
+ code: 'NumLock',
740
+ key: 'NumLock'
741
+ },
742
+ ScrollLock: {
743
+ keyCode: 145,
744
+ code: 'ScrollLock',
745
+ key: 'ScrollLock'
746
+ },
747
+ AudioVolumeMute: {
748
+ keyCode: 173,
749
+ code: 'AudioVolumeMute',
750
+ key: 'AudioVolumeMute'
751
+ },
752
+ AudioVolumeDown: {
753
+ keyCode: 174,
754
+ code: 'AudioVolumeDown',
755
+ key: 'AudioVolumeDown'
756
+ },
757
+ AudioVolumeUp: {
758
+ keyCode: 175,
759
+ code: 'AudioVolumeUp',
760
+ key: 'AudioVolumeUp'
761
+ },
762
+ MediaTrackNext: {
763
+ keyCode: 176,
764
+ code: 'MediaTrackNext',
765
+ key: 'MediaTrackNext'
766
+ },
767
+ MediaTrackPrevious: {
768
+ keyCode: 177,
769
+ code: 'MediaTrackPrevious',
770
+ key: 'MediaTrackPrevious'
771
+ },
772
+ MediaStop: {
773
+ keyCode: 178,
774
+ code: 'MediaStop',
775
+ key: 'MediaStop'
776
+ },
777
+ MediaPlayPause: {
778
+ keyCode: 179,
779
+ code: 'MediaPlayPause',
780
+ key: 'MediaPlayPause'
781
+ },
782
+ Semicolon: {
783
+ keyCode: 186,
784
+ code: 'Semicolon',
785
+ shiftKey: ':',
786
+ key: ';'
787
+ },
788
+ Equal: {
789
+ keyCode: 187,
790
+ code: 'Equal',
791
+ shiftKey: '+',
792
+ key: '='
793
+ },
794
+ NumpadEqual: {
795
+ keyCode: 187,
796
+ code: 'NumpadEqual',
797
+ key: '=',
798
+ location: 3
799
+ },
800
+ Comma: {
801
+ keyCode: 188,
802
+ code: 'Comma',
803
+ shiftKey: '<',
804
+ key: ','
805
+ },
806
+ Minus: {
807
+ keyCode: 189,
808
+ code: 'Minus',
809
+ shiftKey: '_',
810
+ key: '-'
811
+ },
812
+ Period: {
813
+ keyCode: 190,
814
+ code: 'Period',
815
+ shiftKey: '>',
816
+ key: '.'
817
+ },
818
+ Slash: {
819
+ keyCode: 191,
820
+ code: 'Slash',
821
+ shiftKey: '?',
822
+ key: '/'
823
+ },
824
+ Backquote: {
825
+ keyCode: 192,
826
+ code: 'Backquote',
827
+ shiftKey: '~',
828
+ key: '`'
829
+ },
830
+ BracketLeft: {
831
+ keyCode: 219,
832
+ code: 'BracketLeft',
833
+ shiftKey: '{',
834
+ key: '['
835
+ },
836
+ Backslash: {
837
+ keyCode: 220,
838
+ code: 'Backslash',
839
+ shiftKey: '|',
840
+ key: '\\'
841
+ },
842
+ BracketRight: {
843
+ keyCode: 221,
844
+ code: 'BracketRight',
845
+ shiftKey: '}',
846
+ key: ']'
847
+ },
848
+ Quote: {
849
+ keyCode: 222,
850
+ code: 'Quote',
851
+ shiftKey: '"',
852
+ key: "'"
853
+ },
854
+ AltGraph: {
855
+ keyCode: 225,
856
+ code: 'AltGraph',
857
+ key: 'AltGraph'
858
+ },
859
+ Props: {
860
+ keyCode: 247,
861
+ code: 'Props',
862
+ key: 'CrSel'
863
+ },
864
+ Cancel: {
865
+ keyCode: 3,
866
+ key: 'Cancel',
867
+ code: 'Abort'
868
+ },
869
+ Clear: {
870
+ keyCode: 12,
871
+ key: 'Clear',
872
+ code: 'Numpad5',
873
+ location: 3
874
+ },
875
+ Shift: {
876
+ keyCode: 16,
877
+ key: 'Shift',
878
+ code: 'ShiftLeft',
879
+ location: 1
880
+ },
881
+ Control: {
882
+ keyCode: 17,
883
+ key: 'Control',
884
+ code: 'ControlLeft',
885
+ location: 1
886
+ },
887
+ Alt: {
888
+ keyCode: 18,
889
+ key: 'Alt',
890
+ code: 'AltLeft',
891
+ location: 1
892
+ },
893
+ Accept: {
894
+ keyCode: 30,
895
+ key: 'Accept'
896
+ },
897
+ ModeChange: {
898
+ keyCode: 31,
899
+ key: 'ModeChange'
900
+ },
901
+ ' ': {
902
+ keyCode: 32,
903
+ key: ' ',
904
+ code: 'Space'
905
+ },
906
+ Print: {
907
+ keyCode: 42,
908
+ key: 'Print'
909
+ },
910
+ Execute: {
911
+ keyCode: 43,
912
+ key: 'Execute',
913
+ code: 'Open'
914
+ },
915
+ '\u0000': {
916
+ keyCode: 46,
917
+ key: '\u0000',
918
+ code: 'NumpadDecimal',
919
+ location: 3
920
+ },
921
+ a: {
922
+ keyCode: 65,
923
+ key: 'a',
924
+ code: 'KeyA'
925
+ },
926
+ b: {
927
+ keyCode: 66,
928
+ key: 'b',
929
+ code: 'KeyB'
930
+ },
931
+ c: {
932
+ keyCode: 67,
933
+ key: 'c',
934
+ code: 'KeyC'
935
+ },
936
+ d: {
937
+ keyCode: 68,
938
+ key: 'd',
939
+ code: 'KeyD'
940
+ },
941
+ e: {
942
+ keyCode: 69,
943
+ key: 'e',
944
+ code: 'KeyE'
945
+ },
946
+ f: {
947
+ keyCode: 70,
948
+ key: 'f',
949
+ code: 'KeyF'
950
+ },
951
+ g: {
952
+ keyCode: 71,
953
+ key: 'g',
954
+ code: 'KeyG'
955
+ },
956
+ h: {
957
+ keyCode: 72,
958
+ key: 'h',
959
+ code: 'KeyH'
960
+ },
961
+ i: {
962
+ keyCode: 73,
963
+ key: 'i',
964
+ code: 'KeyI'
965
+ },
966
+ j: {
967
+ keyCode: 74,
968
+ key: 'j',
969
+ code: 'KeyJ'
970
+ },
971
+ k: {
972
+ keyCode: 75,
973
+ key: 'k',
974
+ code: 'KeyK'
975
+ },
976
+ l: {
977
+ keyCode: 76,
978
+ key: 'l',
979
+ code: 'KeyL'
980
+ },
981
+ m: {
982
+ keyCode: 77,
983
+ key: 'm',
984
+ code: 'KeyM'
985
+ },
986
+ n: {
987
+ keyCode: 78,
988
+ key: 'n',
989
+ code: 'KeyN'
990
+ },
991
+ o: {
992
+ keyCode: 79,
993
+ key: 'o',
994
+ code: 'KeyO'
995
+ },
996
+ p: {
997
+ keyCode: 80,
998
+ key: 'p',
999
+ code: 'KeyP'
1000
+ },
1001
+ q: {
1002
+ keyCode: 81,
1003
+ key: 'q',
1004
+ code: 'KeyQ'
1005
+ },
1006
+ r: {
1007
+ keyCode: 82,
1008
+ key: 'r',
1009
+ code: 'KeyR'
1010
+ },
1011
+ s: {
1012
+ keyCode: 83,
1013
+ key: 's',
1014
+ code: 'KeyS'
1015
+ },
1016
+ t: {
1017
+ keyCode: 84,
1018
+ key: 't',
1019
+ code: 'KeyT'
1020
+ },
1021
+ u: {
1022
+ keyCode: 85,
1023
+ key: 'u',
1024
+ code: 'KeyU'
1025
+ },
1026
+ v: {
1027
+ keyCode: 86,
1028
+ key: 'v',
1029
+ code: 'KeyV'
1030
+ },
1031
+ w: {
1032
+ keyCode: 87,
1033
+ key: 'w',
1034
+ code: 'KeyW'
1035
+ },
1036
+ x: {
1037
+ keyCode: 88,
1038
+ key: 'x',
1039
+ code: 'KeyX'
1040
+ },
1041
+ y: {
1042
+ keyCode: 89,
1043
+ key: 'y',
1044
+ code: 'KeyY'
1045
+ },
1046
+ z: {
1047
+ keyCode: 90,
1048
+ key: 'z',
1049
+ code: 'KeyZ'
1050
+ },
1051
+ Meta: {
1052
+ keyCode: 91,
1053
+ key: 'Meta',
1054
+ code: 'MetaLeft',
1055
+ location: 1
1056
+ },
1057
+ '*': {
1058
+ keyCode: 106,
1059
+ key: '*',
1060
+ code: 'NumpadMultiply',
1061
+ location: 3
1062
+ },
1063
+ '+': {
1064
+ keyCode: 107,
1065
+ key: '+',
1066
+ code: 'NumpadAdd',
1067
+ location: 3
1068
+ },
1069
+ '-': {
1070
+ keyCode: 109,
1071
+ key: '-',
1072
+ code: 'NumpadSubtract',
1073
+ location: 3
1074
+ },
1075
+ '/': {
1076
+ keyCode: 111,
1077
+ key: '/',
1078
+ code: 'NumpadDivide',
1079
+ location: 3
1080
+ },
1081
+ ';': {
1082
+ keyCode: 186,
1083
+ key: ';',
1084
+ code: 'Semicolon'
1085
+ },
1086
+ '=': {
1087
+ keyCode: 187,
1088
+ key: '=',
1089
+ code: 'Equal'
1090
+ },
1091
+ ',': {
1092
+ keyCode: 188,
1093
+ key: ',',
1094
+ code: 'Comma'
1095
+ },
1096
+ '.': {
1097
+ keyCode: 190,
1098
+ key: '.',
1099
+ code: 'Period'
1100
+ },
1101
+ '`': {
1102
+ keyCode: 192,
1103
+ key: '`',
1104
+ code: 'Backquote'
1105
+ },
1106
+ '[': {
1107
+ keyCode: 219,
1108
+ key: '[',
1109
+ code: 'BracketLeft'
1110
+ },
1111
+ '\\': {
1112
+ keyCode: 220,
1113
+ key: '\\',
1114
+ code: 'Backslash'
1115
+ },
1116
+ ']': {
1117
+ keyCode: 221,
1118
+ key: ']',
1119
+ code: 'BracketRight'
1120
+ },
1121
+ "'": {
1122
+ keyCode: 222,
1123
+ key: "'",
1124
+ code: 'Quote'
1125
+ },
1126
+ Attn: {
1127
+ keyCode: 246,
1128
+ key: 'Attn'
1129
+ },
1130
+ CrSel: {
1131
+ keyCode: 247,
1132
+ key: 'CrSel',
1133
+ code: 'Props'
1134
+ },
1135
+ ExSel: {
1136
+ keyCode: 248,
1137
+ key: 'ExSel'
1138
+ },
1139
+ EraseEof: {
1140
+ keyCode: 249,
1141
+ key: 'EraseEof'
1142
+ },
1143
+ Play: {
1144
+ keyCode: 250,
1145
+ key: 'Play'
1146
+ },
1147
+ ZoomOut: {
1148
+ keyCode: 251,
1149
+ key: 'ZoomOut'
1150
+ },
1151
+ ')': {
1152
+ keyCode: 48,
1153
+ key: ')',
1154
+ code: 'Digit0'
1155
+ },
1156
+ '!': {
1157
+ keyCode: 49,
1158
+ key: '!',
1159
+ code: 'Digit1'
1160
+ },
1161
+ '@': {
1162
+ keyCode: 50,
1163
+ key: '@',
1164
+ code: 'Digit2'
1165
+ },
1166
+ '#': {
1167
+ keyCode: 51,
1168
+ key: '#',
1169
+ code: 'Digit3'
1170
+ },
1171
+ $: {
1172
+ keyCode: 52,
1173
+ key: '$',
1174
+ code: 'Digit4'
1175
+ },
1176
+ '%': {
1177
+ keyCode: 53,
1178
+ key: '%',
1179
+ code: 'Digit5'
1180
+ },
1181
+ '^': {
1182
+ keyCode: 54,
1183
+ key: '^',
1184
+ code: 'Digit6'
1185
+ },
1186
+ '&': {
1187
+ keyCode: 55,
1188
+ key: '&',
1189
+ code: 'Digit7'
1190
+ },
1191
+ '(': {
1192
+ keyCode: 57,
1193
+ key: '(',
1194
+ code: 'Digit9'
1195
+ },
1196
+ A: {
1197
+ keyCode: 65,
1198
+ key: 'A',
1199
+ code: 'KeyA'
1200
+ },
1201
+ B: {
1202
+ keyCode: 66,
1203
+ key: 'B',
1204
+ code: 'KeyB'
1205
+ },
1206
+ C: {
1207
+ keyCode: 67,
1208
+ key: 'C',
1209
+ code: 'KeyC'
1210
+ },
1211
+ D: {
1212
+ keyCode: 68,
1213
+ key: 'D',
1214
+ code: 'KeyD'
1215
+ },
1216
+ E: {
1217
+ keyCode: 69,
1218
+ key: 'E',
1219
+ code: 'KeyE'
1220
+ },
1221
+ F: {
1222
+ keyCode: 70,
1223
+ key: 'F',
1224
+ code: 'KeyF'
1225
+ },
1226
+ G: {
1227
+ keyCode: 71,
1228
+ key: 'G',
1229
+ code: 'KeyG'
1230
+ },
1231
+ H: {
1232
+ keyCode: 72,
1233
+ key: 'H',
1234
+ code: 'KeyH'
1235
+ },
1236
+ I: {
1237
+ keyCode: 73,
1238
+ key: 'I',
1239
+ code: 'KeyI'
1240
+ },
1241
+ J: {
1242
+ keyCode: 74,
1243
+ key: 'J',
1244
+ code: 'KeyJ'
1245
+ },
1246
+ K: {
1247
+ keyCode: 75,
1248
+ key: 'K',
1249
+ code: 'KeyK'
1250
+ },
1251
+ L: {
1252
+ keyCode: 76,
1253
+ key: 'L',
1254
+ code: 'KeyL'
1255
+ },
1256
+ M: {
1257
+ keyCode: 77,
1258
+ key: 'M',
1259
+ code: 'KeyM'
1260
+ },
1261
+ N: {
1262
+ keyCode: 78,
1263
+ key: 'N',
1264
+ code: 'KeyN'
1265
+ },
1266
+ O: {
1267
+ keyCode: 79,
1268
+ key: 'O',
1269
+ code: 'KeyO'
1270
+ },
1271
+ P: {
1272
+ keyCode: 80,
1273
+ key: 'P',
1274
+ code: 'KeyP'
1275
+ },
1276
+ Q: {
1277
+ keyCode: 81,
1278
+ key: 'Q',
1279
+ code: 'KeyQ'
1280
+ },
1281
+ R: {
1282
+ keyCode: 82,
1283
+ key: 'R',
1284
+ code: 'KeyR'
1285
+ },
1286
+ S: {
1287
+ keyCode: 83,
1288
+ key: 'S',
1289
+ code: 'KeyS'
1290
+ },
1291
+ T: {
1292
+ keyCode: 84,
1293
+ key: 'T',
1294
+ code: 'KeyT'
1295
+ },
1296
+ U: {
1297
+ keyCode: 85,
1298
+ key: 'U',
1299
+ code: 'KeyU'
1300
+ },
1301
+ V: {
1302
+ keyCode: 86,
1303
+ key: 'V',
1304
+ code: 'KeyV'
1305
+ },
1306
+ W: {
1307
+ keyCode: 87,
1308
+ key: 'W',
1309
+ code: 'KeyW'
1310
+ },
1311
+ X: {
1312
+ keyCode: 88,
1313
+ key: 'X',
1314
+ code: 'KeyX'
1315
+ },
1316
+ Y: {
1317
+ keyCode: 89,
1318
+ key: 'Y',
1319
+ code: 'KeyY'
1320
+ },
1321
+ Z: {
1322
+ keyCode: 90,
1323
+ key: 'Z',
1324
+ code: 'KeyZ'
1325
+ },
1326
+ ':': {
1327
+ keyCode: 186,
1328
+ key: ':',
1329
+ code: 'Semicolon'
1330
+ },
1331
+ '<': {
1332
+ keyCode: 188,
1333
+ key: '<',
1334
+ code: 'Comma'
1335
+ },
1336
+ _: {
1337
+ keyCode: 189,
1338
+ key: '_',
1339
+ code: 'Minus'
1340
+ },
1341
+ '>': {
1342
+ keyCode: 190,
1343
+ key: '>',
1344
+ code: 'Period'
1345
+ },
1346
+ '?': {
1347
+ keyCode: 191,
1348
+ key: '?',
1349
+ code: 'Slash'
1350
+ },
1351
+ '~': {
1352
+ keyCode: 192,
1353
+ key: '~',
1354
+ code: 'Backquote'
1355
+ },
1356
+ '{': {
1357
+ keyCode: 219,
1358
+ key: '{',
1359
+ code: 'BracketLeft'
1360
+ },
1361
+ '|': {
1362
+ keyCode: 220,
1363
+ key: '|',
1364
+ code: 'Backslash'
1365
+ },
1366
+ '}': {
1367
+ keyCode: 221,
1368
+ key: '}',
1369
+ code: 'BracketRight'
1370
+ },
1371
+ '"': {
1372
+ keyCode: 222,
1373
+ key: '"',
1374
+ code: 'Quote'
1375
+ },
1376
+ SoftLeft: {
1377
+ key: 'SoftLeft',
1378
+ code: 'SoftLeft',
1379
+ location: 4
1380
+ },
1381
+ SoftRight: {
1382
+ key: 'SoftRight',
1383
+ code: 'SoftRight',
1384
+ location: 4
1385
+ },
1386
+ Camera: {
1387
+ keyCode: 44,
1388
+ key: 'Camera',
1389
+ code: 'Camera',
1390
+ location: 4
1391
+ },
1392
+ Call: {
1393
+ key: 'Call',
1394
+ code: 'Call',
1395
+ location: 4
1396
+ },
1397
+ EndCall: {
1398
+ keyCode: 95,
1399
+ key: 'EndCall',
1400
+ code: 'EndCall',
1401
+ location: 4
1402
+ },
1403
+ VolumeDown: {
1404
+ keyCode: 182,
1405
+ key: 'VolumeDown',
1406
+ code: 'VolumeDown',
1407
+ location: 4
1408
+ },
1409
+ VolumeUp: {
1410
+ keyCode: 183,
1411
+ key: 'VolumeUp',
1412
+ code: 'VolumeUp',
1413
+ location: 4
1414
+ }
1415
+ };
1416
+ const lowerCaseKeyDefinitions = Object.entries(_keyDefinitions).reduce((acc, [key, definition])=>{
1417
+ const lowerKey = key.toLowerCase();
1418
+ if (lowerKey !== key) acc[lowerKey] = definition;
1419
+ return acc;
1420
+ }, {});
1421
+ const getKeyDefinition = (key)=>{
1422
+ const lowerKey = key.toLowerCase();
1423
+ if (lowerCaseKeyDefinitions[lowerKey]) return lowerCaseKeyDefinitions[lowerKey].key;
1424
+ return key;
1425
+ };
1426
+ const isMac = 'undefined' != typeof window ? /Mac|iPod|iPhone|iPad/.test(window.navigator.platform) : 'darwin' === process.platform;
1427
+ const keyMap = {
1428
+ return: _keyDefinitions.Enter.key,
1429
+ enter: _keyDefinitions.Enter.key,
1430
+ ctrl: isMac ? _keyDefinitions.Meta.key : _keyDefinitions.Control.key,
1431
+ shift: _keyDefinitions.Shift.key,
1432
+ alt: _keyDefinitions.Alt.key,
1433
+ space: _keyDefinitions.Space.key,
1434
+ 'page down': _keyDefinitions.PageDown.key,
1435
+ pagedown: _keyDefinitions.PageDown.key,
1436
+ 'page up': _keyDefinitions.PageUp.key,
1437
+ pageup: _keyDefinitions.PageUp.key
1438
+ };
1439
+ function transformHotkeyInput(keyInput) {
1440
+ if (keyMap[keyInput.toLowerCase()]) return [
1441
+ getKeyDefinition(keyMap[keyInput.toLowerCase()])
1442
+ ];
1443
+ return keyInput.split(' ').map((key)=>getKeyDefinition(keyMap[key.toLowerCase()] || key));
1444
+ }
1445
+ exports._keyDefinitions = __webpack_exports__._keyDefinitions;
1446
+ exports.getKeyDefinition = __webpack_exports__.getKeyDefinition;
1447
+ exports.isMac = __webpack_exports__.isMac;
1448
+ exports.transformHotkeyInput = __webpack_exports__.transformHotkeyInput;
1449
+ for(var __webpack_i__ in __webpack_exports__)if (-1 === [
1450
+ "_keyDefinitions",
1451
+ "getKeyDefinition",
1452
+ "isMac",
1453
+ "transformHotkeyInput"
1454
+ ].indexOf(__webpack_i__)) exports[__webpack_i__] = __webpack_exports__[__webpack_i__];
1455
+ Object.defineProperty(exports, '__esModule', {
1456
+ value: true
1457
+ });