@keymanapp/common-types 18.0.41-alpha → 18.0.46-alpha
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/build/src/consts/virtual-key-constants.d.ts +191 -191
- package/build/src/consts/virtual-key-constants.js +221 -221
- package/build/src/consts/virtual-key-constants.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.d.ts +5 -5
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js +72 -72
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-reader.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.d.ts +28 -28
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js +120 -120
- package/build/src/keyman-touch-layout/keyman-touch-layout-file-writer.js.map +1 -1
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.d.ts +95 -95
- package/build/src/keyman-touch-layout/keyman-touch-layout-file.js +52 -52
- package/build/src/kmx/element-string.d.ts +23 -23
- package/build/src/kmx/element-string.js +125 -125
- package/build/src/kmx/element-string.js.map +1 -1
- package/build/src/kmx/keyman-targets.d.ts +20 -20
- package/build/src/kmx/keyman-targets.js +79 -79
- package/build/src/kmx/keyman-targets.js.map +1 -1
- package/build/src/kmx/kmx-builder.d.ts +32 -32
- package/build/src/kmx/kmx-builder.js +189 -189
- package/build/src/kmx/kmx-builder.js.map +1 -1
- package/build/src/kmx/kmx-file-reader.d.ts +13 -13
- package/build/src/kmx/kmx-file-reader.js +134 -134
- package/build/src/kmx/kmx-file-reader.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-disp.d.ts +18 -18
- package/build/src/kmx/kmx-plus-builder/build-disp.js +27 -27
- package/build/src/kmx/kmx-plus-builder/build-disp.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-elem.d.ts +28 -28
- package/build/src/kmx/kmx-plus-builder/build-elem.js +89 -89
- package/build/src/kmx/kmx-plus-builder/build-elem.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-keys.d.ts +56 -56
- package/build/src/kmx/kmx-plus-builder/build-keys.js +107 -107
- package/build/src/kmx/kmx-plus-builder/build-keys.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-layr.d.ts +53 -53
- package/build/src/kmx/kmx-plus-builder/build-layr.js +101 -101
- package/build/src/kmx/kmx-plus-builder/build-layr.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-list.d.ts +35 -35
- package/build/src/kmx/kmx-plus-builder/build-list.js +66 -66
- package/build/src/kmx/kmx-plus-builder/build-list.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-loca.d.ts +11 -11
- package/build/src/kmx/kmx-plus-builder/build-loca.js +21 -21
- package/build/src/kmx/kmx-plus-builder/build-loca.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-meta.d.ts +16 -16
- package/build/src/kmx/kmx-plus-builder/build-meta.js +20 -20
- package/build/src/kmx/kmx-plus-builder/build-sect.d.ts +15 -15
- package/build/src/kmx/kmx-plus-builder/build-sect.js +15 -15
- package/build/src/kmx/kmx-plus-builder/build-sect.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-strs.d.ts +22 -22
- package/build/src/kmx/kmx-plus-builder/build-strs.js +46 -46
- package/build/src/kmx/kmx-plus-builder/build-strs.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-tran.d.ts +32 -32
- package/build/src/kmx/kmx-plus-builder/build-tran.js +69 -69
- package/build/src/kmx/kmx-plus-builder/build-tran.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-uset.d.ts +30 -30
- package/build/src/kmx/kmx-plus-builder/build-uset.js +60 -60
- package/build/src/kmx/kmx-plus-builder/build-uset.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/build-vars.d.ts +21 -21
- package/build/src/kmx/kmx-plus-builder/build-vars.js +48 -48
- package/build/src/kmx/kmx-plus-builder/build-vars.js.map +1 -1
- package/build/src/kmx/kmx-plus-builder/builder-section.d.ts +9 -9
- package/build/src/kmx/kmx-plus-builder/builder-section.js +2 -2
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.d.ts +42 -42
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js +137 -137
- package/build/src/kmx/kmx-plus-builder/kmx-plus-builder.js.map +1 -1
- package/build/src/kmx/kmx-plus.d.ts +322 -322
- package/build/src/kmx/kmx-plus.js +830 -830
- package/build/src/kmx/kmx-plus.js.map +1 -1
- package/build/src/kmx/kmx.d.ts +233 -233
- package/build/src/kmx/kmx.js +302 -302
- package/build/src/kmx/kmx.js.map +1 -1
- package/build/src/kmx/string-list.d.ts +35 -35
- package/build/src/kmx/string-list.js +88 -88
- package/build/src/kmx/string-list.js.map +1 -1
- package/build/src/kpj/keyman-developer-project.d.ts +78 -78
- package/build/src/kpj/keyman-developer-project.js +195 -195
- package/build/src/kpj/keyman-developer-project.js.map +1 -1
- package/build/src/kpj/kpj-file-reader.d.ts +18 -18
- package/build/src/kpj/kpj-file-reader.js +119 -119
- package/build/src/kpj/kpj-file-reader.js.map +1 -1
- package/build/src/kpj/kpj-file.d.ts +39 -39
- package/build/src/kpj/kpj-file.js +10 -10
- package/build/src/kvk/kvk-file-reader.d.ts +4 -4
- package/build/src/kvk/kvk-file-reader.js +37 -37
- package/build/src/kvk/kvk-file-reader.js.map +1 -1
- package/build/src/kvk/kvk-file-writer.d.ts +19 -19
- package/build/src/kvk/kvk-file-writer.js +77 -77
- package/build/src/kvk/kvk-file-writer.js.map +1 -1
- package/build/src/kvk/kvk-file.d.ts +66 -66
- package/build/src/kvk/kvk-file.d.ts.map +1 -1
- package/build/src/kvk/kvk-file.js +90 -90
- package/build/src/kvk/kvk-file.js.map +1 -1
- package/build/src/kvk/kvks-file-reader.d.ts +23 -23
- package/build/src/kvk/kvks-file-reader.js +175 -175
- package/build/src/kvk/kvks-file-reader.js.map +1 -1
- package/build/src/kvk/kvks-file-writer.d.ts +6 -6
- package/build/src/kvk/kvks-file-writer.js +106 -106
- package/build/src/kvk/kvks-file-writer.js.map +1 -1
- package/build/src/kvk/kvks-file.d.ts +43 -43
- package/build/src/kvk/kvks-file.js +9 -9
- package/build/src/kvk/visual-keyboard.d.ts +44 -44
- package/build/src/kvk/visual-keyboard.js +75 -75
- package/build/src/kvk/visual-keyboard.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.d.ts +60 -60
- package/build/src/ldml-keyboard/ldml-keyboard-testdata-xml.js +19 -19
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.d.ts +95 -95
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js +409 -409
- package/build/src/ldml-keyboard/ldml-keyboard-xml-reader.js.map +1 -1
- package/build/src/ldml-keyboard/ldml-keyboard-xml.d.ts +170 -170
- package/build/src/ldml-keyboard/ldml-keyboard-xml.js +55 -55
- package/build/src/ldml-keyboard/pattern-parser.d.ts +201 -201
- package/build/src/ldml-keyboard/pattern-parser.js +490 -490
- package/build/src/ldml-keyboard/pattern-parser.js.map +1 -1
- package/build/src/ldml-keyboard/unicodeset-parser-api.d.ts +37 -37
- package/build/src/ldml-keyboard/unicodeset-parser-api.js +27 -27
- package/build/src/main.d.ts +33 -33
- package/build/src/main.js +32 -32
- package/build/src/package/kmp-json-file.d.ts +115 -115
- package/build/src/package/kmp-json-file.js +1 -1
- package/build/src/package/kps-file.d.ts +175 -175
- package/build/src/package/kps-file.js +15 -15
- package/build/src/schema-validators.d.ts +13 -13
- package/build/src/schema-validators.js +25 -25
- package/build/src/schemas/displaymap.schema.d.ts +57 -57
- package/build/src/schemas/displaymap.schema.js +35 -35
- package/build/src/schemas/displaymap.schema.validator.d.mts +2 -2
- package/build/src/schemas/displaymap.schema.validator.mjs +266 -266
- package/build/src/schemas/displaymap.schema.validator.mjs.map +1 -1
- package/build/src/schemas/keyboard_info.schema.d.ts +209 -209
- package/build/src/schemas/keyboard_info.schema.js +98 -98
- package/build/src/schemas/keyboard_info.schema.validator.d.mts +2 -2
- package/build/src/schemas/keyboard_info.schema.validator.mjs +1160 -1160
- package/build/src/schemas/keyboard_info.schema.validator.mjs.map +1 -1
- package/build/src/schemas/keyman-touch-layout.clean.spec.d.ts +227 -227
- package/build/src/schemas/keyman-touch-layout.clean.spec.js +151 -151
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.d.mts +2 -2
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs +1094 -1094
- package/build/src/schemas/keyman-touch-layout.clean.spec.validator.mjs.map +1 -1
- package/build/src/schemas/keyman-touch-layout.spec.d.ts +229 -229
- package/build/src/schemas/keyman-touch-layout.spec.js +140 -140
- package/build/src/schemas/keyman-touch-layout.spec.validator.d.mts +2 -2
- package/build/src/schemas/keyman-touch-layout.spec.validator.mjs +1436 -1436
- package/build/src/schemas/keyman-touch-layout.spec.validator.mjs.map +1 -1
- package/build/src/schemas/kmp.schema.d.ts +324 -324
- package/build/src/schemas/kmp.schema.js +353 -353
- package/build/src/schemas/kmp.schema.validator.d.mts +2 -2
- package/build/src/schemas/kmp.schema.validator.mjs +1627 -1627
- package/build/src/schemas/kmp.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kpj-9.0.schema.d.ts +152 -152
- package/build/src/schemas/kpj-9.0.schema.js +131 -131
- package/build/src/schemas/kpj-9.0.schema.validator.d.mts +2 -2
- package/build/src/schemas/kpj-9.0.schema.validator.mjs +655 -655
- package/build/src/schemas/kpj-9.0.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kpj.schema.d.ts +122 -122
- package/build/src/schemas/kpj.schema.js +129 -129
- package/build/src/schemas/kpj.schema.validator.d.mts +2 -2
- package/build/src/schemas/kpj.schema.validator.mjs +515 -515
- package/build/src/schemas/kpj.schema.validator.mjs.map +1 -1
- package/build/src/schemas/kvks.schema.d.ts +160 -160
- package/build/src/schemas/kvks.schema.js +182 -182
- package/build/src/schemas/kvks.schema.validator.d.mts +2 -2
- package/build/src/schemas/kvks.schema.validator.mjs +625 -625
- package/build/src/schemas/kvks.schema.validator.mjs.map +1 -1
- package/build/src/schemas/ldml-keyboard3.schema.d.ts +635 -635
- package/build/src/schemas/ldml-keyboard3.schema.js +696 -696
- package/build/src/schemas/ldml-keyboard3.schema.validator.d.mts +2 -2
- package/build/src/schemas/ldml-keyboard3.schema.validator.mjs +3117 -3117
- package/build/src/schemas/ldml-keyboard3.schema.validator.mjs.map +1 -1
- package/build/src/schemas/ldml-keyboardtest3.schema.d.ts +192 -192
- package/build/src/schemas/ldml-keyboardtest3.schema.js +225 -225
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.d.mts +2 -2
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs +744 -744
- package/build/src/schemas/ldml-keyboardtest3.schema.validator.mjs.map +1 -1
- package/build/src/schemas.d.ts +2300 -2300
- package/build/src/schemas.js +23 -23
- package/build/src/util/common-events.d.ts +44 -44
- package/build/src/util/common-events.js +26 -26
- package/build/src/util/compiler-interfaces.d.ts +371 -371
- package/build/src/util/compiler-interfaces.d.ts.map +1 -1
- package/build/src/util/compiler-interfaces.js +380 -380
- package/build/src/util/compiler-interfaces.js.map +1 -1
- package/build/src/util/errors.d.ts +5 -5
- package/build/src/util/errors.js +5 -5
- package/build/src/util/file-types.d.ts +93 -93
- package/build/src/util/file-types.d.ts.map +1 -1
- package/build/src/util/file-types.js +142 -142
- package/build/src/util/file-types.js.map +1 -1
- package/build/src/util/util.d.ts +98 -98
- package/build/src/util/util.js +368 -368
- package/build/src/util/util.js.map +1 -1
- package/package.json +3 -3
|
@@ -1,223 +1,223 @@
|
|
|
1
|
-
// Define standard keycode numbers (exposed for use by other modules)
|
|
2
|
-
// TODO-LDML: merge with common\web\keyboard-processor\src\text\codes.ts
|
|
3
|
-
/**
|
|
4
|
-
* May include non-US virtual key codes
|
|
5
|
-
*/
|
|
1
|
+
// Define standard keycode numbers (exposed for use by other modules)
|
|
2
|
+
// TODO-LDML: merge with common\web\keyboard-processor\src\text\codes.ts
|
|
3
|
+
/**
|
|
4
|
+
* May include non-US virtual key codes
|
|
5
|
+
*/
|
|
6
6
|
|
|
7
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
8
|
-
export const USVirtualKeyCodes = {
|
|
9
|
-
K_BKSP: 8,
|
|
10
|
-
K_TAB: 9,
|
|
11
|
-
K_ENTER: 13,
|
|
12
|
-
K_SHIFT: 16,
|
|
13
|
-
K_CONTROL: 17,
|
|
14
|
-
K_ALT: 18,
|
|
15
|
-
K_PAUSE: 19,
|
|
16
|
-
K_CAPS: 20,
|
|
17
|
-
K_ESC: 27,
|
|
18
|
-
K_SPACE: 32,
|
|
19
|
-
K_PGUP: 33,
|
|
20
|
-
K_PGDN: 34,
|
|
21
|
-
K_END: 35,
|
|
22
|
-
K_HOME: 36,
|
|
23
|
-
K_LEFT: 37,
|
|
24
|
-
K_UP: 38,
|
|
25
|
-
K_RIGHT: 39,
|
|
26
|
-
K_DOWN: 40,
|
|
27
|
-
K_SEL: 41,
|
|
28
|
-
K_PRINT: 42,
|
|
29
|
-
K_EXEC: 43,
|
|
30
|
-
K_INS: 45,
|
|
31
|
-
K_DEL: 46,
|
|
32
|
-
K_HELP: 47,
|
|
33
|
-
K_0: 48,
|
|
34
|
-
K_1: 49,
|
|
35
|
-
K_2: 50,
|
|
36
|
-
K_3: 51,
|
|
37
|
-
K_4: 52,
|
|
38
|
-
K_5: 53,
|
|
39
|
-
K_6: 54,
|
|
40
|
-
K_7: 55,
|
|
41
|
-
K_8: 56,
|
|
42
|
-
K_9: 57,
|
|
43
|
-
K_A: 65,
|
|
44
|
-
K_B: 66,
|
|
45
|
-
K_C: 67,
|
|
46
|
-
K_D: 68,
|
|
47
|
-
K_E: 69,
|
|
48
|
-
K_F: 70,
|
|
49
|
-
K_G: 71,
|
|
50
|
-
K_H: 72,
|
|
51
|
-
K_I: 73,
|
|
52
|
-
K_J: 74,
|
|
53
|
-
K_K: 75,
|
|
54
|
-
K_L: 76,
|
|
55
|
-
K_M: 77,
|
|
56
|
-
K_N: 78,
|
|
57
|
-
K_O: 79,
|
|
58
|
-
K_P: 80,
|
|
59
|
-
K_Q: 81,
|
|
60
|
-
K_R: 82,
|
|
61
|
-
K_S: 83,
|
|
62
|
-
K_T: 84,
|
|
63
|
-
K_U: 85,
|
|
64
|
-
K_V: 86,
|
|
65
|
-
K_W: 87,
|
|
66
|
-
K_X: 88,
|
|
67
|
-
K_Y: 89,
|
|
68
|
-
K_Z: 90,
|
|
69
|
-
K_NP0: 96,
|
|
70
|
-
K_NP1: 97,
|
|
71
|
-
K_NP2: 98,
|
|
72
|
-
K_NP3: 99,
|
|
73
|
-
K_NP4: 100,
|
|
74
|
-
K_NP5: 101,
|
|
75
|
-
K_NP6: 102,
|
|
76
|
-
K_NP7: 103,
|
|
77
|
-
K_NP8: 104,
|
|
78
|
-
K_NP9: 105,
|
|
79
|
-
K_NPSTAR: 106,
|
|
80
|
-
K_NPPLUS: 107,
|
|
81
|
-
K_SEPARATOR: 108,
|
|
82
|
-
K_NPMINUS: 109,
|
|
83
|
-
K_NPDOT: 110,
|
|
84
|
-
K_NPSLASH: 111,
|
|
85
|
-
K_F1: 112,
|
|
86
|
-
K_F2: 113,
|
|
87
|
-
K_F3: 114,
|
|
88
|
-
K_F4: 115,
|
|
89
|
-
K_F5: 116,
|
|
90
|
-
K_F6: 117,
|
|
91
|
-
K_F7: 118,
|
|
92
|
-
K_F8: 119,
|
|
93
|
-
K_F9: 120,
|
|
94
|
-
K_F10: 121,
|
|
95
|
-
K_F11: 122,
|
|
96
|
-
K_F12: 123,
|
|
97
|
-
K_NUMLOCK: 144,
|
|
98
|
-
K_SCROLL: 145,
|
|
99
|
-
K_LSHIFT: 160,
|
|
100
|
-
K_RSHIFT: 161,
|
|
101
|
-
K_LCONTROL: 162,
|
|
102
|
-
K_RCONTROL: 163,
|
|
103
|
-
K_LALT: 164,
|
|
104
|
-
K_RALT: 165,
|
|
105
|
-
K_COLON: 186,
|
|
106
|
-
K_EQUAL: 187,
|
|
107
|
-
K_COMMA: 188,
|
|
108
|
-
K_HYPHEN: 189,
|
|
109
|
-
K_PERIOD: 190,
|
|
110
|
-
K_SLASH: 191,
|
|
111
|
-
K_BKQUOTE: 192,
|
|
112
|
-
K_LBRKT: 219,
|
|
113
|
-
/**
|
|
114
|
-
* == K_OEM_5, 0xDC
|
|
115
|
-
*/
|
|
116
|
-
K_BKSLASH: 220,
|
|
117
|
-
K_RBRKT: 221,
|
|
118
|
-
K_QUOTE: 222,
|
|
119
|
-
/**
|
|
120
|
-
* ISO B00, key to right of left shift, not on US keyboard,
|
|
121
|
-
* 0xE2, K_OEM_102
|
|
122
|
-
*/
|
|
123
|
-
K_oE2: 226,
|
|
124
|
-
K_OE2: 226,
|
|
125
|
-
K_oC1: 193,
|
|
126
|
-
K_OC1: 193,
|
|
127
|
-
'K_?C1': 193,
|
|
128
|
-
'k_?C1': 193,
|
|
129
|
-
K_oDF: 0xDF,
|
|
130
|
-
K_ODF: 0xDF,
|
|
131
|
-
/*K_LOPT:50001,
|
|
132
|
-
K_ROPT:50002,
|
|
133
|
-
K_NUMERALS:50003,
|
|
134
|
-
K_SYMBOLS:50004,
|
|
135
|
-
K_CURRENCIES:50005,
|
|
136
|
-
K_UPPER:50006,
|
|
137
|
-
K_LOWER:50007,
|
|
138
|
-
K_ALPHA:50008,
|
|
139
|
-
K_SHIFTED:50009,
|
|
140
|
-
K_ALTGR:50010,
|
|
141
|
-
K_TABBACK:50011,
|
|
142
|
-
K_TABFWD:50012*/
|
|
143
|
-
};
|
|
144
|
-
const k = USVirtualKeyCodes;
|
|
145
|
-
/** Map a CLDR scancode to a US VKey ala USVirtualKeyCodes */
|
|
146
|
-
export const CLDRScanToUSVirtualKeyCodes = {
|
|
147
|
-
0x02: k.K_1,
|
|
148
|
-
0x03: k.K_2,
|
|
149
|
-
0x04: k.K_3,
|
|
150
|
-
0x05: k.K_4,
|
|
151
|
-
0x06: k.K_5,
|
|
152
|
-
0x07: k.K_6,
|
|
153
|
-
0x08: k.K_7,
|
|
154
|
-
0x09: k.K_8,
|
|
155
|
-
0x0A: k.K_9,
|
|
156
|
-
0x0B: k.K_0,
|
|
157
|
-
0x0C: k.K_HYPHEN,
|
|
158
|
-
0x0D: k.K_EQUAL,
|
|
159
|
-
0x10: k.K_Q,
|
|
160
|
-
0x11: k.K_W,
|
|
161
|
-
0x12: k.K_E,
|
|
162
|
-
0x13: k.K_R,
|
|
163
|
-
0x14: k.K_T,
|
|
164
|
-
0x15: k.K_Y,
|
|
165
|
-
0x16: k.K_U,
|
|
166
|
-
0x17: k.K_I,
|
|
167
|
-
0x18: k.K_O,
|
|
168
|
-
0x19: k.K_P,
|
|
169
|
-
0x1A: k.K_LBRKT,
|
|
170
|
-
0x1B: k.K_RBRKT,
|
|
171
|
-
0x1E: k.K_A,
|
|
172
|
-
0x1F: k.K_S,
|
|
173
|
-
0x20: k.K_D,
|
|
174
|
-
0x21: k.K_F,
|
|
175
|
-
0x22: k.K_G,
|
|
176
|
-
0x23: k.K_H,
|
|
177
|
-
0x24: k.K_J,
|
|
178
|
-
0x25: k.K_K,
|
|
179
|
-
0x26: k.K_L,
|
|
180
|
-
0x27: k.K_COLON,
|
|
181
|
-
0x28: k.K_QUOTE,
|
|
182
|
-
0x29: k.K_BKQUOTE,
|
|
183
|
-
0x2B: k.K_BKSLASH,
|
|
184
|
-
0x2C: k.K_Z,
|
|
185
|
-
0x2D: k.K_X,
|
|
186
|
-
0x2E: k.K_C,
|
|
187
|
-
0x2F: k.K_V,
|
|
188
|
-
0x30: k.K_B,
|
|
189
|
-
0x31: k.K_N,
|
|
190
|
-
0x32: k.K_M,
|
|
191
|
-
0x33: k.K_COMMA,
|
|
192
|
-
0x34: k.K_PERIOD,
|
|
193
|
-
0x35: k.K_SLASH,
|
|
194
|
-
0x39: k.K_SPACE,
|
|
195
|
-
0x56: k.K_oE2,
|
|
196
|
-
0x73: k.K_oC1,
|
|
197
|
-
0x7D: k.K_oE2, // << Same as 0x56; found on jis
|
|
198
|
-
};
|
|
199
|
-
/**
|
|
200
|
-
* Convert a scan code numerical KeyMap to VKeys
|
|
201
|
-
* @param scans keymap to convert
|
|
202
|
-
* @param badScans output: set of not-found scancodes
|
|
203
|
-
* @returns
|
|
204
|
-
*/
|
|
205
|
-
export function CLDRScanToKeyMap(scans, badScans) {
|
|
206
|
-
return scans.map((row) => row.map((scan) => CLDRScanToVkey(scan, badScans)));
|
|
207
|
-
}
|
|
208
|
-
/** Convert one scan code to vkey, or undefined */
|
|
209
|
-
export function CLDRScanToVkey(scan, badScans) {
|
|
210
|
-
/** typescript fun to index the scan table */
|
|
211
|
-
function hasScanCode(key) {
|
|
212
|
-
return key in CLDRScanToUSVirtualKeyCodes;
|
|
213
|
-
}
|
|
214
|
-
if (hasScanCode(scan)) {
|
|
215
|
-
return CLDRScanToUSVirtualKeyCodes[scan];
|
|
216
|
-
}
|
|
217
|
-
else {
|
|
218
|
-
badScans?.add(scan);
|
|
219
|
-
return undefined;
|
|
220
|
-
}
|
|
221
|
-
}
|
|
7
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="4a1d8553-f771-5f1a-8370-4b4e3597be2f")}catch(e){}}();
|
|
8
|
+
export const USVirtualKeyCodes = {
|
|
9
|
+
K_BKSP: 8,
|
|
10
|
+
K_TAB: 9,
|
|
11
|
+
K_ENTER: 13,
|
|
12
|
+
K_SHIFT: 16,
|
|
13
|
+
K_CONTROL: 17,
|
|
14
|
+
K_ALT: 18,
|
|
15
|
+
K_PAUSE: 19,
|
|
16
|
+
K_CAPS: 20,
|
|
17
|
+
K_ESC: 27,
|
|
18
|
+
K_SPACE: 32,
|
|
19
|
+
K_PGUP: 33,
|
|
20
|
+
K_PGDN: 34,
|
|
21
|
+
K_END: 35,
|
|
22
|
+
K_HOME: 36,
|
|
23
|
+
K_LEFT: 37,
|
|
24
|
+
K_UP: 38,
|
|
25
|
+
K_RIGHT: 39,
|
|
26
|
+
K_DOWN: 40,
|
|
27
|
+
K_SEL: 41,
|
|
28
|
+
K_PRINT: 42,
|
|
29
|
+
K_EXEC: 43,
|
|
30
|
+
K_INS: 45,
|
|
31
|
+
K_DEL: 46,
|
|
32
|
+
K_HELP: 47,
|
|
33
|
+
K_0: 48,
|
|
34
|
+
K_1: 49,
|
|
35
|
+
K_2: 50,
|
|
36
|
+
K_3: 51,
|
|
37
|
+
K_4: 52,
|
|
38
|
+
K_5: 53,
|
|
39
|
+
K_6: 54,
|
|
40
|
+
K_7: 55,
|
|
41
|
+
K_8: 56,
|
|
42
|
+
K_9: 57,
|
|
43
|
+
K_A: 65,
|
|
44
|
+
K_B: 66,
|
|
45
|
+
K_C: 67,
|
|
46
|
+
K_D: 68,
|
|
47
|
+
K_E: 69,
|
|
48
|
+
K_F: 70,
|
|
49
|
+
K_G: 71,
|
|
50
|
+
K_H: 72,
|
|
51
|
+
K_I: 73,
|
|
52
|
+
K_J: 74,
|
|
53
|
+
K_K: 75,
|
|
54
|
+
K_L: 76,
|
|
55
|
+
K_M: 77,
|
|
56
|
+
K_N: 78,
|
|
57
|
+
K_O: 79,
|
|
58
|
+
K_P: 80,
|
|
59
|
+
K_Q: 81,
|
|
60
|
+
K_R: 82,
|
|
61
|
+
K_S: 83,
|
|
62
|
+
K_T: 84,
|
|
63
|
+
K_U: 85,
|
|
64
|
+
K_V: 86,
|
|
65
|
+
K_W: 87,
|
|
66
|
+
K_X: 88,
|
|
67
|
+
K_Y: 89,
|
|
68
|
+
K_Z: 90,
|
|
69
|
+
K_NP0: 96,
|
|
70
|
+
K_NP1: 97,
|
|
71
|
+
K_NP2: 98,
|
|
72
|
+
K_NP3: 99,
|
|
73
|
+
K_NP4: 100,
|
|
74
|
+
K_NP5: 101,
|
|
75
|
+
K_NP6: 102,
|
|
76
|
+
K_NP7: 103,
|
|
77
|
+
K_NP8: 104,
|
|
78
|
+
K_NP9: 105,
|
|
79
|
+
K_NPSTAR: 106,
|
|
80
|
+
K_NPPLUS: 107,
|
|
81
|
+
K_SEPARATOR: 108,
|
|
82
|
+
K_NPMINUS: 109,
|
|
83
|
+
K_NPDOT: 110,
|
|
84
|
+
K_NPSLASH: 111,
|
|
85
|
+
K_F1: 112,
|
|
86
|
+
K_F2: 113,
|
|
87
|
+
K_F3: 114,
|
|
88
|
+
K_F4: 115,
|
|
89
|
+
K_F5: 116,
|
|
90
|
+
K_F6: 117,
|
|
91
|
+
K_F7: 118,
|
|
92
|
+
K_F8: 119,
|
|
93
|
+
K_F9: 120,
|
|
94
|
+
K_F10: 121,
|
|
95
|
+
K_F11: 122,
|
|
96
|
+
K_F12: 123,
|
|
97
|
+
K_NUMLOCK: 144,
|
|
98
|
+
K_SCROLL: 145,
|
|
99
|
+
K_LSHIFT: 160,
|
|
100
|
+
K_RSHIFT: 161,
|
|
101
|
+
K_LCONTROL: 162,
|
|
102
|
+
K_RCONTROL: 163,
|
|
103
|
+
K_LALT: 164,
|
|
104
|
+
K_RALT: 165,
|
|
105
|
+
K_COLON: 186,
|
|
106
|
+
K_EQUAL: 187,
|
|
107
|
+
K_COMMA: 188,
|
|
108
|
+
K_HYPHEN: 189,
|
|
109
|
+
K_PERIOD: 190,
|
|
110
|
+
K_SLASH: 191,
|
|
111
|
+
K_BKQUOTE: 192,
|
|
112
|
+
K_LBRKT: 219,
|
|
113
|
+
/**
|
|
114
|
+
* == K_OEM_5, 0xDC
|
|
115
|
+
*/
|
|
116
|
+
K_BKSLASH: 220,
|
|
117
|
+
K_RBRKT: 221,
|
|
118
|
+
K_QUOTE: 222,
|
|
119
|
+
/**
|
|
120
|
+
* ISO B00, key to right of left shift, not on US keyboard,
|
|
121
|
+
* 0xE2, K_OEM_102
|
|
122
|
+
*/
|
|
123
|
+
K_oE2: 226,
|
|
124
|
+
K_OE2: 226,
|
|
125
|
+
K_oC1: 193, // ISO B11, ABNT-2 key to left of right shift, not on US keyboard
|
|
126
|
+
K_OC1: 193,
|
|
127
|
+
'K_?C1': 193,
|
|
128
|
+
'k_?C1': 193,
|
|
129
|
+
K_oDF: 0xDF,
|
|
130
|
+
K_ODF: 0xDF,
|
|
131
|
+
/*K_LOPT:50001,
|
|
132
|
+
K_ROPT:50002,
|
|
133
|
+
K_NUMERALS:50003,
|
|
134
|
+
K_SYMBOLS:50004,
|
|
135
|
+
K_CURRENCIES:50005,
|
|
136
|
+
K_UPPER:50006,
|
|
137
|
+
K_LOWER:50007,
|
|
138
|
+
K_ALPHA:50008,
|
|
139
|
+
K_SHIFTED:50009,
|
|
140
|
+
K_ALTGR:50010,
|
|
141
|
+
K_TABBACK:50011,
|
|
142
|
+
K_TABFWD:50012*/
|
|
143
|
+
};
|
|
144
|
+
const k = USVirtualKeyCodes;
|
|
145
|
+
/** Map a CLDR scancode to a US VKey ala USVirtualKeyCodes */
|
|
146
|
+
export const CLDRScanToUSVirtualKeyCodes = {
|
|
147
|
+
0x02: k.K_1,
|
|
148
|
+
0x03: k.K_2,
|
|
149
|
+
0x04: k.K_3,
|
|
150
|
+
0x05: k.K_4,
|
|
151
|
+
0x06: k.K_5,
|
|
152
|
+
0x07: k.K_6,
|
|
153
|
+
0x08: k.K_7,
|
|
154
|
+
0x09: k.K_8,
|
|
155
|
+
0x0A: k.K_9,
|
|
156
|
+
0x0B: k.K_0,
|
|
157
|
+
0x0C: k.K_HYPHEN,
|
|
158
|
+
0x0D: k.K_EQUAL,
|
|
159
|
+
0x10: k.K_Q,
|
|
160
|
+
0x11: k.K_W,
|
|
161
|
+
0x12: k.K_E,
|
|
162
|
+
0x13: k.K_R,
|
|
163
|
+
0x14: k.K_T,
|
|
164
|
+
0x15: k.K_Y,
|
|
165
|
+
0x16: k.K_U,
|
|
166
|
+
0x17: k.K_I,
|
|
167
|
+
0x18: k.K_O,
|
|
168
|
+
0x19: k.K_P,
|
|
169
|
+
0x1A: k.K_LBRKT,
|
|
170
|
+
0x1B: k.K_RBRKT,
|
|
171
|
+
0x1E: k.K_A,
|
|
172
|
+
0x1F: k.K_S,
|
|
173
|
+
0x20: k.K_D,
|
|
174
|
+
0x21: k.K_F,
|
|
175
|
+
0x22: k.K_G,
|
|
176
|
+
0x23: k.K_H,
|
|
177
|
+
0x24: k.K_J,
|
|
178
|
+
0x25: k.K_K,
|
|
179
|
+
0x26: k.K_L,
|
|
180
|
+
0x27: k.K_COLON,
|
|
181
|
+
0x28: k.K_QUOTE,
|
|
182
|
+
0x29: k.K_BKQUOTE,
|
|
183
|
+
0x2B: k.K_BKSLASH,
|
|
184
|
+
0x2C: k.K_Z,
|
|
185
|
+
0x2D: k.K_X,
|
|
186
|
+
0x2E: k.K_C,
|
|
187
|
+
0x2F: k.K_V,
|
|
188
|
+
0x30: k.K_B,
|
|
189
|
+
0x31: k.K_N,
|
|
190
|
+
0x32: k.K_M,
|
|
191
|
+
0x33: k.K_COMMA,
|
|
192
|
+
0x34: k.K_PERIOD,
|
|
193
|
+
0x35: k.K_SLASH,
|
|
194
|
+
0x39: k.K_SPACE,
|
|
195
|
+
0x56: k.K_oE2, // << Same as 0x7D; found on iso, abnt2
|
|
196
|
+
0x73: k.K_oC1,
|
|
197
|
+
0x7D: k.K_oE2, // << Same as 0x56; found on jis
|
|
198
|
+
};
|
|
199
|
+
/**
|
|
200
|
+
* Convert a scan code numerical KeyMap to VKeys
|
|
201
|
+
* @param scans keymap to convert
|
|
202
|
+
* @param badScans output: set of not-found scancodes
|
|
203
|
+
* @returns
|
|
204
|
+
*/
|
|
205
|
+
export function CLDRScanToKeyMap(scans, badScans) {
|
|
206
|
+
return scans.map((row) => row.map((scan) => CLDRScanToVkey(scan, badScans)));
|
|
207
|
+
}
|
|
208
|
+
/** Convert one scan code to vkey, or undefined */
|
|
209
|
+
export function CLDRScanToVkey(scan, badScans) {
|
|
210
|
+
/** typescript fun to index the scan table */
|
|
211
|
+
function hasScanCode(key) {
|
|
212
|
+
return key in CLDRScanToUSVirtualKeyCodes;
|
|
213
|
+
}
|
|
214
|
+
if (hasScanCode(scan)) {
|
|
215
|
+
return CLDRScanToUSVirtualKeyCodes[scan];
|
|
216
|
+
}
|
|
217
|
+
else {
|
|
218
|
+
badScans?.add(scan);
|
|
219
|
+
return undefined;
|
|
220
|
+
}
|
|
221
|
+
}
|
|
222
222
|
//# sourceMappingURL=virtual-key-constants.js.map
|
|
223
|
-
//# debugId=
|
|
223
|
+
//# debugId=4a1d8553-f771-5f1a-8370-4b4e3597be2f
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"virtual-key-constants.js","sources":["../../../src/consts/virtual-key-constants.ts"],"sourceRoot":"","names":[],"mappings":"AACA,qEAAqE;AACrE,wEAAwE;AAExE;;GAEG;;;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAC,CAAC;IACR,KAAK,EAAC,CAAC;IACP,OAAO,EAAC,EAAE;IACV,OAAO,EAAC,EAAE;IACV,SAAS,EAAC,EAAE;IACZ,KAAK,EAAC,EAAE;IACR,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,MAAM,EAAC,EAAE;IACT,MAAM,EAAC,EAAE;IACT,IAAI,EAAC,EAAE;IACP,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,KAAK,EAAC,EAAE;IACR,MAAM,EAAC,EAAE;IACT,GAAG,EAAC,EAAE;IACN,GAAG,EAAC,EAAE;IACN,GAAG,EAAC,EAAE;IACN,GAAG,EAAC,EAAE;IACN,GAAG,EAAC,EAAE;IACN,G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;IACR,IAAI,EAAC,GAAG;IACR,IAAI,EAAC,GAAG;IACR,KAAK,EAAC,GAAG;IACT,KAAK,EAAC,GAAG;IACT,KAAK,EAAC,GAAG;IACT,SAAS,EAAC,GAAG;IACb,QAAQ,EAAC,GAAG;IACZ,QAAQ,EAAC,GAAG;IACZ,QAAQ,EAAC,GAAG;IACZ,UAAU,EAAC,GAAG;IACd,UAAU,EAAC,GAAG;IACd,MAAM,EAAC,GAAG;IACV,MAAM,EAAC,GAAG;IACV,OAAO,EAAC,GAAG;IACX,OAAO,EAAC,GAAG;IACX,OAAO,EAAC,GAAG;IACX,QAAQ,EAAC,GAAG;IACZ,QAAQ,EAAC,GAAG;IACZ,OAAO,EAAC,GAAG;IACX,SAAS,EAAC,GAAG;IACb,OAAO,EAAC,GAAG;IACX;;OAEG;IACH,SAAS,EAAC,GAAG;IACb,OAAO,EAAC,GAAG;IACX,OAAO,EAAC,GAAG;IACX;;;OAGG;IACH,KAAK,EAAC,GAAG;IACT,KAAK,EAAC,GAAG;IACT,KAAK,EAAC,GAAG;
|
|
1
|
+
{"version":3,"file":"virtual-key-constants.js","sources":["../../../src/consts/virtual-key-constants.ts"],"sourceRoot":"","names":[],"mappings":"AACA,qEAAqE;AACrE,wEAAwE;AAExE;;GAEG;;;AACH,MAAM,CAAC,MAAM,iBAAiB,GAAG;IAC/B,MAAM,EAAC,CAAC;IACR,KAAK,EAAC,CAAC;IACP,OAAO,EAAC,EAAE;IACV,OAAO,EAAC,EAAE;IACV,SAAS,EAAC,EAAE;IACZ,KAAK,EAAC,EAAE;IACR,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,OAAO,EAAC,EAAE;IACV,MAAM,EAAC,EAAE;IACT,MAAM,EAAC,EAAE;IACT,KAAK,EAAC,EAAE;IACR,MAAM,EAAC,EAAE;IACT,MAAM,EAAC,EAAE;IACT,IAAI,EAAC,EAAE;IACP,OAAO,EAAC,EAAE;IACV,MAAM,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
|
|
@@ -1,6 +1,6 @@
|
|
|
1
|
-
import { TouchLayoutFile } from "./keyman-touch-layout-file.js";
|
|
2
|
-
export declare class TouchLayoutFileReader {
|
|
3
|
-
read(source: Uint8Array): TouchLayoutFile;
|
|
4
|
-
validate(source: TouchLayoutFile): void;
|
|
5
|
-
}
|
|
1
|
+
import { TouchLayoutFile } from "./keyman-touch-layout-file.js";
|
|
2
|
+
export declare class TouchLayoutFileReader {
|
|
3
|
+
read(source: Uint8Array): TouchLayoutFile;
|
|
4
|
+
validate(source: TouchLayoutFile): void;
|
|
5
|
+
}
|
|
6
6
|
//# sourceMappingURL=keyman-touch-layout-file-reader.d.ts.map
|
|
@@ -1,74 +1,74 @@
|
|
|
1
1
|
|
|
2
|
-
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="
|
|
3
|
-
import SchemaValidators from '../schema-validators.js';
|
|
4
|
-
export class TouchLayoutFileReader {
|
|
5
|
-
read(source) {
|
|
6
|
-
const decoder = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
7
|
-
let sourceString;
|
|
8
|
-
try {
|
|
9
|
-
sourceString = decoder.decode(source);
|
|
10
|
-
/* c8 ignore next 7 */
|
|
11
|
-
}
|
|
12
|
-
catch (e) {
|
|
13
|
-
if (e instanceof TypeError) {
|
|
14
|
-
// TODO: Do we want to do something else with this?
|
|
15
|
-
throw e;
|
|
16
|
-
}
|
|
17
|
-
throw e;
|
|
18
|
-
}
|
|
19
|
-
let result;
|
|
20
|
-
try {
|
|
21
|
-
result = JSON.parse(sourceString, function (key, value) {
|
|
22
|
-
// `row.id` should be number, but may have been stringified; we use
|
|
23
|
-
// presence of `key` property to recognise this as a `TouchLayoutRow`.
|
|
24
|
-
if (this.key && key == 'id' && typeof value == 'string') {
|
|
25
|
-
let newValue = parseInt(value, 10);
|
|
26
|
-
/* c8 ignore next 3 */
|
|
27
|
-
if (isNaN(newValue)) {
|
|
28
|
-
throw new TypeError(`Invalid row.id: "${value}"`);
|
|
29
|
-
}
|
|
30
|
-
return newValue;
|
|
31
|
-
}
|
|
32
|
-
// `key.width`, `key.pad`, `key.sp` should be number, but may have been
|
|
33
|
-
// stringified
|
|
34
|
-
if (key == 'width' || key == 'pad' || key == 'sp') {
|
|
35
|
-
if (value === '') {
|
|
36
|
-
// Empty string is equivalent to not present, so fall back to
|
|
37
|
-
// default value
|
|
38
|
-
return undefined;
|
|
39
|
-
}
|
|
40
|
-
let newValue = parseInt(value, 10);
|
|
41
|
-
/* c8 ignore next 3 */
|
|
42
|
-
if (isNaN(newValue)) {
|
|
43
|
-
throw new TypeError(`Invalid [sub]key.${key}: "${value}"`);
|
|
44
|
-
}
|
|
45
|
-
return newValue;
|
|
46
|
-
}
|
|
47
|
-
if (Array.isArray(value) && value.length == 0) {
|
|
48
|
-
// Delete empty arrays
|
|
49
|
-
return undefined;
|
|
50
|
-
}
|
|
51
|
-
return value;
|
|
52
|
-
});
|
|
53
|
-
/* c8 ignore next 7 */
|
|
54
|
-
}
|
|
55
|
-
catch (e) {
|
|
56
|
-
if (e instanceof SyntaxError) {
|
|
57
|
-
// TODO: Do we want to do something else with this?
|
|
58
|
-
throw e;
|
|
59
|
-
}
|
|
60
|
-
throw e;
|
|
61
|
-
}
|
|
62
|
-
return result;
|
|
63
|
-
}
|
|
64
|
-
validate(source) {
|
|
65
|
-
if (!SchemaValidators.touchLayoutClean(source))
|
|
66
|
-
/* c8 ignore next 3 */
|
|
67
|
-
{
|
|
68
|
-
throw new Error(JSON.stringify(SchemaValidators.touchLayoutClean.errors));
|
|
69
|
-
}
|
|
70
|
-
}
|
|
71
|
-
}
|
|
72
|
-
;
|
|
2
|
+
!function(){try{var e="undefined"!=typeof window?window:"undefined"!=typeof global?global:"undefined"!=typeof self?self:{},n=(new Error).stack;n&&(e._sentryDebugIds=e._sentryDebugIds||{},e._sentryDebugIds[n]="b3d8ba11-355b-566f-9855-ed98e1643b3b")}catch(e){}}();
|
|
3
|
+
import SchemaValidators from '../schema-validators.js';
|
|
4
|
+
export class TouchLayoutFileReader {
|
|
5
|
+
read(source) {
|
|
6
|
+
const decoder = new TextDecoder('utf-8', { fatal: true, ignoreBOM: true });
|
|
7
|
+
let sourceString;
|
|
8
|
+
try {
|
|
9
|
+
sourceString = decoder.decode(source);
|
|
10
|
+
/* c8 ignore next 7 */
|
|
11
|
+
}
|
|
12
|
+
catch (e) {
|
|
13
|
+
if (e instanceof TypeError) {
|
|
14
|
+
// TODO: Do we want to do something else with this?
|
|
15
|
+
throw e;
|
|
16
|
+
}
|
|
17
|
+
throw e;
|
|
18
|
+
}
|
|
19
|
+
let result;
|
|
20
|
+
try {
|
|
21
|
+
result = JSON.parse(sourceString, function (key, value) {
|
|
22
|
+
// `row.id` should be number, but may have been stringified; we use
|
|
23
|
+
// presence of `key` property to recognise this as a `TouchLayoutRow`.
|
|
24
|
+
if (this.key && key == 'id' && typeof value == 'string') {
|
|
25
|
+
let newValue = parseInt(value, 10);
|
|
26
|
+
/* c8 ignore next 3 */
|
|
27
|
+
if (isNaN(newValue)) {
|
|
28
|
+
throw new TypeError(`Invalid row.id: "${value}"`);
|
|
29
|
+
}
|
|
30
|
+
return newValue;
|
|
31
|
+
}
|
|
32
|
+
// `key.width`, `key.pad`, `key.sp` should be number, but may have been
|
|
33
|
+
// stringified
|
|
34
|
+
if (key == 'width' || key == 'pad' || key == 'sp') {
|
|
35
|
+
if (value === '') {
|
|
36
|
+
// Empty string is equivalent to not present, so fall back to
|
|
37
|
+
// default value
|
|
38
|
+
return undefined;
|
|
39
|
+
}
|
|
40
|
+
let newValue = parseInt(value, 10);
|
|
41
|
+
/* c8 ignore next 3 */
|
|
42
|
+
if (isNaN(newValue)) {
|
|
43
|
+
throw new TypeError(`Invalid [sub]key.${key}: "${value}"`);
|
|
44
|
+
}
|
|
45
|
+
return newValue;
|
|
46
|
+
}
|
|
47
|
+
if (Array.isArray(value) && value.length == 0) {
|
|
48
|
+
// Delete empty arrays
|
|
49
|
+
return undefined;
|
|
50
|
+
}
|
|
51
|
+
return value;
|
|
52
|
+
});
|
|
53
|
+
/* c8 ignore next 7 */
|
|
54
|
+
}
|
|
55
|
+
catch (e) {
|
|
56
|
+
if (e instanceof SyntaxError) {
|
|
57
|
+
// TODO: Do we want to do something else with this?
|
|
58
|
+
throw e;
|
|
59
|
+
}
|
|
60
|
+
throw e;
|
|
61
|
+
}
|
|
62
|
+
return result;
|
|
63
|
+
}
|
|
64
|
+
validate(source) {
|
|
65
|
+
if (!SchemaValidators.touchLayoutClean(source))
|
|
66
|
+
/* c8 ignore next 3 */
|
|
67
|
+
{
|
|
68
|
+
throw new Error(JSON.stringify(SchemaValidators.touchLayoutClean.errors));
|
|
69
|
+
}
|
|
70
|
+
}
|
|
71
|
+
}
|
|
72
|
+
;
|
|
73
73
|
//# sourceMappingURL=keyman-touch-layout-file-reader.js.map
|
|
74
|
-
//# debugId=
|
|
74
|
+
//# debugId=b3d8ba11-355b-566f-9855-ed98e1643b3b
|
|
@@ -1 +1 @@
|
|
|
1
|
-
{"version":3,"file":"keyman-touch-layout-file-reader.js","sources":["../../../src/keyman-touch-layout/keyman-touch-layout-file-reader.ts"],"sourceRoot":"","names":[],"mappings":";;AACA,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AAEvD,MAAM,OAAO,qBAAqB;IACzB,IAAI,CAAC,MAAkB;QAC5B,MAAM,OAAO,GAAG,IAAI,WAAW,CAAC,OAAO,EAAE,EAAC,KAAK,EAAC,IAAI,EAAE,SAAS,EAAE,IAAI,EAAC,CAAC,CAAC;QACxE,IAAI,YAAoB,CAAC;QACzB,IAAI;
|
|
1
|
+
{"version":3,"file":"keyman-touch-layout-file-reader.js","sources":["../../../src/keyman-touch-layout/keyman-touch-layout-file-reader.ts"],"sourceRoot":"","names":[],"mappings":";;AACA,OAAO,gBAAgB,MAAM,yBAAyB,CAAC;AAEvD,MAA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