@thienvu18/designable-shared 2.0.1 → 2.0.2
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.
- package/esm/animation.d.ts +8 -2
- package/esm/animation.js +29 -30
- package/esm/array.d.ts +163 -37
- package/esm/array.js +104 -87
- package/esm/clone.d.ts +4 -4
- package/esm/clone.js +79 -86
- package/esm/compose.d.ts +3 -1
- package/esm/compose.js +6 -6
- package/esm/coordinate.d.ts +120 -76
- package/esm/coordinate.js +480 -411
- package/esm/element.d.ts +11 -6
- package/esm/element.js +123 -125
- package/esm/event.d.ts +162 -75
- package/esm/event.js +197 -197
- package/esm/globalThisPolyfill.d.ts +1 -1
- package/esm/globalThisPolyfill.js +14 -17
- package/esm/index.d.ts +17 -17
- package/esm/index.js +17 -17
- package/esm/instanceof.d.ts +1 -1
- package/esm/instanceof.js +9 -10
- package/esm/keycode.d.ts +145 -145
- package/esm/keycode.js +149 -149
- package/esm/lru.d.ts +50 -47
- package/esm/lru.js +236 -245
- package/esm/observer.d.ts +7 -7
- package/esm/observer.js +37 -40
- package/esm/request-idle.d.ts +9 -6
- package/esm/request-idle.js +6 -6
- package/esm/scroller.d.ts +24 -8
- package/esm/scroller.js +78 -75
- package/esm/subscribable.d.ts +10 -10
- package/esm/subscribable.js +39 -40
- package/esm/types.d.ts +13 -13
- package/esm/types.js +19 -20
- package/esm/uid.d.ts +1 -1
- package/esm/uid.js +7 -7
- package/lib/animation.d.ts +8 -2
- package/lib/animation.js +34 -35
- package/lib/array.d.ts +163 -37
- package/lib/array.js +129 -101
- package/lib/clone.d.ts +4 -4
- package/lib/clone.js +84 -91
- package/lib/compose.d.ts +3 -1
- package/lib/compose.js +10 -10
- package/lib/coordinate.d.ts +120 -76
- package/lib/coordinate.js +538 -440
- package/lib/element.d.ts +11 -6
- package/lib/element.js +139 -133
- package/lib/event.d.ts +162 -75
- package/lib/event.js +206 -202
- package/lib/globalThisPolyfill.d.ts +1 -1
- package/lib/globalThisPolyfill.js +17 -20
- package/lib/index.d.ts +17 -17
- package/lib/index.js +49 -33
- package/lib/instanceof.d.ts +1 -1
- package/lib/instanceof.js +13 -14
- package/lib/keycode.d.ts +145 -145
- package/lib/keycode.js +153 -153
- package/lib/lru.d.ts +50 -47
- package/lib/lru.js +240 -249
- package/lib/observer.d.ts +7 -7
- package/lib/observer.js +41 -44
- package/lib/request-idle.d.ts +9 -6
- package/lib/request-idle.js +14 -11
- package/lib/scroller.d.ts +24 -8
- package/lib/scroller.js +89 -81
- package/lib/subscribable.d.ts +10 -10
- package/lib/subscribable.js +43 -44
- package/lib/types.d.ts +13 -13
- package/lib/types.js +40 -28
- package/lib/uid.d.ts +1 -1
- package/lib/uid.js +11 -11
- package/package.json +1 -1
package/lib/keycode.d.ts
CHANGED
|
@@ -1,147 +1,147 @@
|
|
|
1
1
|
export declare enum KeyCode {
|
|
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
|
-
|
|
2
|
+
Backspace = 'Backspace',
|
|
3
|
+
Tab = 'Tab',
|
|
4
|
+
Enter = 'Enter',
|
|
5
|
+
Shift = 'Shift',
|
|
6
|
+
Control = 'Control',
|
|
7
|
+
Alt = 'Alt',
|
|
8
|
+
CapsLock = 'CapsLock',
|
|
9
|
+
Escape = 'Escape',
|
|
10
|
+
Space = ' ',
|
|
11
|
+
PageUp = 'PageUp',
|
|
12
|
+
PageDown = 'PageDown',
|
|
13
|
+
End = 'End',
|
|
14
|
+
Home = 'Home',
|
|
15
|
+
ArrowLeft = 'ArrowLeft',
|
|
16
|
+
ArrowUp = 'ArrowUp',
|
|
17
|
+
ArrowRight = 'ArrowRight',
|
|
18
|
+
ArrowDown = 'ArrowDown',
|
|
19
|
+
Left = 'Left',
|
|
20
|
+
Up = 'Up',
|
|
21
|
+
Right = 'Right',
|
|
22
|
+
Down = 'Down',
|
|
23
|
+
Insert = 'Insert',
|
|
24
|
+
Delete = 'Delete',
|
|
25
|
+
Zero = '0',
|
|
26
|
+
ClosedParen = ')',
|
|
27
|
+
One = '1',
|
|
28
|
+
ExclamationMark = '!',
|
|
29
|
+
Two = '2',
|
|
30
|
+
AtSign = '@',
|
|
31
|
+
Three = '3',
|
|
32
|
+
PoundSign = '\u00A3',
|
|
33
|
+
Hash = '#',
|
|
34
|
+
Four = '4',
|
|
35
|
+
DollarSign = '$',
|
|
36
|
+
Five = '5',
|
|
37
|
+
PercentSign = '%',
|
|
38
|
+
Six = '6',
|
|
39
|
+
Caret = '^',
|
|
40
|
+
Hat = '^',
|
|
41
|
+
Seven = '7',
|
|
42
|
+
Ampersand = '&',
|
|
43
|
+
Eight = '8',
|
|
44
|
+
Star = '*',
|
|
45
|
+
Asterisk = '*',
|
|
46
|
+
Nine = '9',
|
|
47
|
+
OpenParen = '(',
|
|
48
|
+
a = 'a',
|
|
49
|
+
b = 'b',
|
|
50
|
+
c = 'c',
|
|
51
|
+
d = 'd',
|
|
52
|
+
e = 'e',
|
|
53
|
+
f = 'f',
|
|
54
|
+
g = 'g',
|
|
55
|
+
h = 'h',
|
|
56
|
+
i = 'i',
|
|
57
|
+
j = 'j',
|
|
58
|
+
k = 'k',
|
|
59
|
+
l = 'l',
|
|
60
|
+
m = 'm',
|
|
61
|
+
n = 'n',
|
|
62
|
+
o = 'o',
|
|
63
|
+
p = 'p',
|
|
64
|
+
q = 'q',
|
|
65
|
+
r = 'r',
|
|
66
|
+
s = 's',
|
|
67
|
+
t = 't',
|
|
68
|
+
u = 'u',
|
|
69
|
+
v = 'v',
|
|
70
|
+
w = 'w',
|
|
71
|
+
x = 'x',
|
|
72
|
+
y = 'y',
|
|
73
|
+
z = 'z',
|
|
74
|
+
A = 'A',
|
|
75
|
+
B = 'B',
|
|
76
|
+
C = 'C',
|
|
77
|
+
D = 'D',
|
|
78
|
+
E = 'E',
|
|
79
|
+
F = 'F',
|
|
80
|
+
G = 'G',
|
|
81
|
+
H = 'H',
|
|
82
|
+
I = 'I',
|
|
83
|
+
J = 'J',
|
|
84
|
+
K = 'K',
|
|
85
|
+
L = 'L',
|
|
86
|
+
M = 'M',
|
|
87
|
+
N = 'N',
|
|
88
|
+
O = 'O',
|
|
89
|
+
P = 'P',
|
|
90
|
+
Q = 'Q',
|
|
91
|
+
R = 'R',
|
|
92
|
+
S = 'S',
|
|
93
|
+
T = 'T',
|
|
94
|
+
U = 'U',
|
|
95
|
+
V = 'V',
|
|
96
|
+
W = 'W',
|
|
97
|
+
X = 'X',
|
|
98
|
+
Y = 'Y',
|
|
99
|
+
Z = 'Z',
|
|
100
|
+
Meta = 'Meta',
|
|
101
|
+
LeftWindowKey = 'Meta',
|
|
102
|
+
RightWindowKey = 'Meta',
|
|
103
|
+
Numpad0 = '0',
|
|
104
|
+
Numpad1 = '1',
|
|
105
|
+
Numpad2 = '2',
|
|
106
|
+
Numpad3 = '3',
|
|
107
|
+
Numpad4 = '4',
|
|
108
|
+
Numpad5 = '5',
|
|
109
|
+
Numpad6 = '6',
|
|
110
|
+
Numpad7 = '7',
|
|
111
|
+
Numpad8 = '8',
|
|
112
|
+
Numpad9 = '9',
|
|
113
|
+
Multiply = '*',
|
|
114
|
+
Add = '+',
|
|
115
|
+
Subtract = '-',
|
|
116
|
+
DecimalPoint = '.',
|
|
117
|
+
MSDecimalPoint = 'Decimal',
|
|
118
|
+
Divide = '/',
|
|
119
|
+
F1 = 'F1',
|
|
120
|
+
F2 = 'F2',
|
|
121
|
+
F3 = 'F3',
|
|
122
|
+
F4 = 'F4',
|
|
123
|
+
F5 = 'F5',
|
|
124
|
+
F6 = 'F6',
|
|
125
|
+
F7 = 'F7',
|
|
126
|
+
F8 = 'F8',
|
|
127
|
+
F9 = 'F9',
|
|
128
|
+
F10 = 'F10',
|
|
129
|
+
F11 = 'F11',
|
|
130
|
+
F12 = 'F12',
|
|
131
|
+
NumLock = 'NumLock',
|
|
132
|
+
ScrollLock = 'ScrollLock',
|
|
133
|
+
SemiColon = ';',
|
|
134
|
+
Equals = '=',
|
|
135
|
+
Comma = ',',
|
|
136
|
+
Dash = '-',
|
|
137
|
+
Period = '.',
|
|
138
|
+
UnderScore = '_',
|
|
139
|
+
PlusSign = '+',
|
|
140
|
+
ForwardSlash = '/',
|
|
141
|
+
Tilde = '~',
|
|
142
|
+
GraveAccent = '`',
|
|
143
|
+
OpenBracket = '[',
|
|
144
|
+
ClosedBracket = ']',
|
|
145
|
+
Quote = "'",
|
|
146
146
|
}
|
|
147
|
-
export declare const getKeyCodeFromEvent: (event: KeyboardEvent) => KeyCode
|
|
147
|
+
export declare const getKeyCodeFromEvent: (event: KeyboardEvent) => KeyCode
|
package/lib/keycode.js
CHANGED
|
@@ -1,154 +1,154 @@
|
|
|
1
|
-
|
|
2
|
-
Object.defineProperty(exports,
|
|
3
|
-
exports.getKeyCodeFromEvent = exports.KeyCode = void 0
|
|
4
|
-
var KeyCode
|
|
5
|
-
(function (KeyCode) {
|
|
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
|
-
})(KeyCode || (exports.KeyCode = KeyCode = {}))
|
|
1
|
+
'use strict'
|
|
2
|
+
Object.defineProperty(exports, '__esModule', { value: true })
|
|
3
|
+
exports.getKeyCodeFromEvent = exports.KeyCode = void 0
|
|
4
|
+
var KeyCode
|
|
5
|
+
;(function (KeyCode) {
|
|
6
|
+
KeyCode['Backspace'] = 'Backspace'
|
|
7
|
+
KeyCode['Tab'] = 'Tab'
|
|
8
|
+
KeyCode['Enter'] = 'Enter'
|
|
9
|
+
KeyCode['Shift'] = 'Shift'
|
|
10
|
+
KeyCode['Control'] = 'Control'
|
|
11
|
+
KeyCode['Alt'] = 'Alt'
|
|
12
|
+
KeyCode['CapsLock'] = 'CapsLock'
|
|
13
|
+
KeyCode['Escape'] = 'Escape'
|
|
14
|
+
KeyCode['Space'] = ' '
|
|
15
|
+
KeyCode['PageUp'] = 'PageUp'
|
|
16
|
+
KeyCode['PageDown'] = 'PageDown'
|
|
17
|
+
KeyCode['End'] = 'End'
|
|
18
|
+
KeyCode['Home'] = 'Home'
|
|
19
|
+
KeyCode['ArrowLeft'] = 'ArrowLeft'
|
|
20
|
+
KeyCode['ArrowUp'] = 'ArrowUp'
|
|
21
|
+
KeyCode['ArrowRight'] = 'ArrowRight'
|
|
22
|
+
KeyCode['ArrowDown'] = 'ArrowDown'
|
|
23
|
+
KeyCode['Left'] = 'Left'
|
|
24
|
+
KeyCode['Up'] = 'Up'
|
|
25
|
+
KeyCode['Right'] = 'Right'
|
|
26
|
+
KeyCode['Down'] = 'Down'
|
|
27
|
+
KeyCode['Insert'] = 'Insert'
|
|
28
|
+
KeyCode['Delete'] = 'Delete'
|
|
29
|
+
KeyCode['Zero'] = '0'
|
|
30
|
+
KeyCode['ClosedParen'] = ')'
|
|
31
|
+
KeyCode['One'] = '1'
|
|
32
|
+
KeyCode['ExclamationMark'] = '!'
|
|
33
|
+
KeyCode['Two'] = '2'
|
|
34
|
+
KeyCode['AtSign'] = '@'
|
|
35
|
+
KeyCode['Three'] = '3'
|
|
36
|
+
KeyCode['PoundSign'] = '\u00A3'
|
|
37
|
+
KeyCode['Hash'] = '#'
|
|
38
|
+
KeyCode['Four'] = '4'
|
|
39
|
+
KeyCode['DollarSign'] = '$'
|
|
40
|
+
KeyCode['Five'] = '5'
|
|
41
|
+
KeyCode['PercentSign'] = '%'
|
|
42
|
+
KeyCode['Six'] = '6'
|
|
43
|
+
KeyCode['Caret'] = '^'
|
|
44
|
+
KeyCode['Hat'] = '^'
|
|
45
|
+
KeyCode['Seven'] = '7'
|
|
46
|
+
KeyCode['Ampersand'] = '&'
|
|
47
|
+
KeyCode['Eight'] = '8'
|
|
48
|
+
KeyCode['Star'] = '*'
|
|
49
|
+
KeyCode['Asterisk'] = '*'
|
|
50
|
+
KeyCode['Nine'] = '9'
|
|
51
|
+
KeyCode['OpenParen'] = '('
|
|
52
|
+
KeyCode['a'] = 'a'
|
|
53
|
+
KeyCode['b'] = 'b'
|
|
54
|
+
KeyCode['c'] = 'c'
|
|
55
|
+
KeyCode['d'] = 'd'
|
|
56
|
+
KeyCode['e'] = 'e'
|
|
57
|
+
KeyCode['f'] = 'f'
|
|
58
|
+
KeyCode['g'] = 'g'
|
|
59
|
+
KeyCode['h'] = 'h'
|
|
60
|
+
KeyCode['i'] = 'i'
|
|
61
|
+
KeyCode['j'] = 'j'
|
|
62
|
+
KeyCode['k'] = 'k'
|
|
63
|
+
KeyCode['l'] = 'l'
|
|
64
|
+
KeyCode['m'] = 'm'
|
|
65
|
+
KeyCode['n'] = 'n'
|
|
66
|
+
KeyCode['o'] = 'o'
|
|
67
|
+
KeyCode['p'] = 'p'
|
|
68
|
+
KeyCode['q'] = 'q'
|
|
69
|
+
KeyCode['r'] = 'r'
|
|
70
|
+
KeyCode['s'] = 's'
|
|
71
|
+
KeyCode['t'] = 't'
|
|
72
|
+
KeyCode['u'] = 'u'
|
|
73
|
+
KeyCode['v'] = 'v'
|
|
74
|
+
KeyCode['w'] = 'w'
|
|
75
|
+
KeyCode['x'] = 'x'
|
|
76
|
+
KeyCode['y'] = 'y'
|
|
77
|
+
KeyCode['z'] = 'z'
|
|
78
|
+
KeyCode['A'] = 'A'
|
|
79
|
+
KeyCode['B'] = 'B'
|
|
80
|
+
KeyCode['C'] = 'C'
|
|
81
|
+
KeyCode['D'] = 'D'
|
|
82
|
+
KeyCode['E'] = 'E'
|
|
83
|
+
KeyCode['F'] = 'F'
|
|
84
|
+
KeyCode['G'] = 'G'
|
|
85
|
+
KeyCode['H'] = 'H'
|
|
86
|
+
KeyCode['I'] = 'I'
|
|
87
|
+
KeyCode['J'] = 'J'
|
|
88
|
+
KeyCode['K'] = 'K'
|
|
89
|
+
KeyCode['L'] = 'L'
|
|
90
|
+
KeyCode['M'] = 'M'
|
|
91
|
+
KeyCode['N'] = 'N'
|
|
92
|
+
KeyCode['O'] = 'O'
|
|
93
|
+
KeyCode['P'] = 'P'
|
|
94
|
+
KeyCode['Q'] = 'Q'
|
|
95
|
+
KeyCode['R'] = 'R'
|
|
96
|
+
KeyCode['S'] = 'S'
|
|
97
|
+
KeyCode['T'] = 'T'
|
|
98
|
+
KeyCode['U'] = 'U'
|
|
99
|
+
KeyCode['V'] = 'V'
|
|
100
|
+
KeyCode['W'] = 'W'
|
|
101
|
+
KeyCode['X'] = 'X'
|
|
102
|
+
KeyCode['Y'] = 'Y'
|
|
103
|
+
KeyCode['Z'] = 'Z'
|
|
104
|
+
KeyCode['Meta'] = 'Meta'
|
|
105
|
+
KeyCode['LeftWindowKey'] = 'Meta'
|
|
106
|
+
KeyCode['RightWindowKey'] = 'Meta'
|
|
107
|
+
KeyCode['Numpad0'] = '0'
|
|
108
|
+
KeyCode['Numpad1'] = '1'
|
|
109
|
+
KeyCode['Numpad2'] = '2'
|
|
110
|
+
KeyCode['Numpad3'] = '3'
|
|
111
|
+
KeyCode['Numpad4'] = '4'
|
|
112
|
+
KeyCode['Numpad5'] = '5'
|
|
113
|
+
KeyCode['Numpad6'] = '6'
|
|
114
|
+
KeyCode['Numpad7'] = '7'
|
|
115
|
+
KeyCode['Numpad8'] = '8'
|
|
116
|
+
KeyCode['Numpad9'] = '9'
|
|
117
|
+
KeyCode['Multiply'] = '*'
|
|
118
|
+
KeyCode['Add'] = '+'
|
|
119
|
+
KeyCode['Subtract'] = '-'
|
|
120
|
+
KeyCode['DecimalPoint'] = '.'
|
|
121
|
+
KeyCode['MSDecimalPoint'] = 'Decimal'
|
|
122
|
+
KeyCode['Divide'] = '/'
|
|
123
|
+
KeyCode['F1'] = 'F1'
|
|
124
|
+
KeyCode['F2'] = 'F2'
|
|
125
|
+
KeyCode['F3'] = 'F3'
|
|
126
|
+
KeyCode['F4'] = 'F4'
|
|
127
|
+
KeyCode['F5'] = 'F5'
|
|
128
|
+
KeyCode['F6'] = 'F6'
|
|
129
|
+
KeyCode['F7'] = 'F7'
|
|
130
|
+
KeyCode['F8'] = 'F8'
|
|
131
|
+
KeyCode['F9'] = 'F9'
|
|
132
|
+
KeyCode['F10'] = 'F10'
|
|
133
|
+
KeyCode['F11'] = 'F11'
|
|
134
|
+
KeyCode['F12'] = 'F12'
|
|
135
|
+
KeyCode['NumLock'] = 'NumLock'
|
|
136
|
+
KeyCode['ScrollLock'] = 'ScrollLock'
|
|
137
|
+
KeyCode['SemiColon'] = ';'
|
|
138
|
+
KeyCode['Equals'] = '='
|
|
139
|
+
KeyCode['Comma'] = ','
|
|
140
|
+
KeyCode['Dash'] = '-'
|
|
141
|
+
KeyCode['Period'] = '.'
|
|
142
|
+
KeyCode['UnderScore'] = '_'
|
|
143
|
+
KeyCode['PlusSign'] = '+'
|
|
144
|
+
KeyCode['ForwardSlash'] = '/'
|
|
145
|
+
KeyCode['Tilde'] = '~'
|
|
146
|
+
KeyCode['GraveAccent'] = '`'
|
|
147
|
+
KeyCode['OpenBracket'] = '['
|
|
148
|
+
KeyCode['ClosedBracket'] = ']'
|
|
149
|
+
KeyCode['Quote'] = "'"
|
|
150
|
+
})(KeyCode || (exports.KeyCode = KeyCode = {}))
|
|
151
151
|
const getKeyCodeFromEvent = (event) => {
|
|
152
|
-
|
|
153
|
-
}
|
|
154
|
-
exports.getKeyCodeFromEvent = getKeyCodeFromEvent
|
|
152
|
+
return event.key
|
|
153
|
+
}
|
|
154
|
+
exports.getKeyCodeFromEvent = getKeyCodeFromEvent
|