@keymanapp/ldml-keyboard-constants 18.0.40-alpha → 18.0.45-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/keyman_core_ldml.d.ts +387 -387
- package/build/keyman_core_ldml.js +480 -480
- package/build/keyman_core_ldml.js.map +1 -1
- package/package.json +1 -1
|
@@ -1,388 +1,388 @@
|
|
|
1
|
-
/**
|
|
2
|
-
* Defines the section identifiers and ensures that we include each and every
|
|
3
|
-
* one of them in the `sections` block and gives us a type which we can iterate
|
|
4
|
-
* through.
|
|
5
|
-
*/
|
|
6
|
-
export type SectionIdent = 'sect' | 'bksp' | 'disp' | 'elem' | 'keys' | 'layr' | 'list' | 'loca' | 'meta' | 'strs' | 'tran' | 'uset' | 'vars';
|
|
7
|
-
type SectionMap = {
|
|
8
|
-
[id in SectionIdent]: SectionIdent;
|
|
9
|
-
};
|
|
10
|
-
/**
|
|
11
|
-
* Constants for the KMXPlus data format
|
|
12
|
-
* These are shared between the data access layer and the compiler.
|
|
13
|
-
* Note that the section IDs (section_keys etc.) are 32 bit hex
|
|
14
|
-
* values that are designed to appear as text when written in little endian
|
|
15
|
-
* format, so 0x7379656b = 'keys'
|
|
16
|
-
*/
|
|
17
|
-
declare class Constants {
|
|
18
|
-
/**
|
|
19
|
-
* The version of the LDML processor
|
|
20
|
-
*/
|
|
21
|
-
readonly version = "1.0";
|
|
22
|
-
/**
|
|
23
|
-
* The current CLDR version
|
|
24
|
-
*/
|
|
25
|
-
readonly cldr_version_latest = "45";
|
|
26
|
-
/**
|
|
27
|
-
* The version for testdata files
|
|
28
|
-
*/
|
|
29
|
-
readonly cldr_test_version_latest = "techpreview";
|
|
30
|
-
/**
|
|
31
|
-
* import base
|
|
32
|
-
*/
|
|
33
|
-
readonly cldr_import_base = "cldr";
|
|
34
|
-
/**
|
|
35
|
-
* implied keys file
|
|
36
|
-
*/
|
|
37
|
-
readonly cldr_implied_keys_import: string;
|
|
38
|
-
/**
|
|
39
|
-
* implied scancodes file
|
|
40
|
-
*/
|
|
41
|
-
readonly cldr_implied_forms_import: string;
|
|
42
|
-
/**
|
|
43
|
-
* Length of a raw section header, in bytes
|
|
44
|
-
*/
|
|
45
|
-
readonly length_header = 8;
|
|
46
|
-
/**
|
|
47
|
-
* Minimum length of the 'sect' section, not including entries
|
|
48
|
-
*/
|
|
49
|
-
readonly length_sect = 16;
|
|
50
|
-
/**
|
|
51
|
-
* Length of each item in the 'sect' section variable part
|
|
52
|
-
*/
|
|
53
|
-
readonly length_sect_item = 8;
|
|
54
|
-
/**
|
|
55
|
-
* Minimum length of the 'bksp' section, not including entries
|
|
56
|
-
*/
|
|
57
|
-
readonly length_bksp = 12;
|
|
58
|
-
/**
|
|
59
|
-
* Length of each item in the 'bksp' section variable part
|
|
60
|
-
*/
|
|
61
|
-
readonly length_bksp_item = 16;
|
|
62
|
-
/**
|
|
63
|
-
* bitwise or value for error="fail" in transform
|
|
64
|
-
*/
|
|
65
|
-
readonly bksp_flags_error = 1;
|
|
66
|
-
/**
|
|
67
|
-
* Minimum length of the 'disp' section, not including entries
|
|
68
|
-
*/
|
|
69
|
-
readonly length_disp = 16;
|
|
70
|
-
/**
|
|
71
|
-
* Length of each entry in the 'disp' variable part
|
|
72
|
-
*/
|
|
73
|
-
readonly length_disp_item = 12;
|
|
74
|
-
/**
|
|
75
|
-
* Minimum length of the 'elem' section, not including entries
|
|
76
|
-
*/
|
|
77
|
-
readonly length_elem = 12;
|
|
78
|
-
/**
|
|
79
|
-
* Length of each elem string in the 'elem' section variable part
|
|
80
|
-
*/
|
|
81
|
-
readonly length_elem_item = 8;
|
|
82
|
-
/**
|
|
83
|
-
* Length of each element in an elem string
|
|
84
|
-
*/
|
|
85
|
-
readonly length_elem_item_element = 8;
|
|
86
|
-
/**
|
|
87
|
-
* bitwise or value for type in elem[elemstr][element].flags.
|
|
88
|
-
* If bits are 00b, then 'element' is a UTF-32LE codepoint.
|
|
89
|
-
* If bits are 01b, then 'element' is a string index.
|
|
90
|
-
* If bits are 10b (2), then 'element' is a uset index.
|
|
91
|
-
*
|
|
92
|
-
* `type = flags & elem_flags_type`
|
|
93
|
-
*/
|
|
94
|
-
readonly elem_flags_type = 3;
|
|
95
|
-
readonly elem_flags_type_char = 0;
|
|
96
|
-
readonly elem_flags_type_str = 1;
|
|
97
|
-
readonly elem_flags_type_uset = 2;
|
|
98
|
-
/**
|
|
99
|
-
* bitwise or value for tertiary_base in elem[elemstr][element].flags.
|
|
100
|
-
* If bit is 1, then tertiary_base is true.
|
|
101
|
-
* If bit is 0, then tertiary_base is false.
|
|
102
|
-
*
|
|
103
|
-
* Used only for `ordr`-type element strings.
|
|
104
|
-
*
|
|
105
|
-
* `tertiary_base = flags & elem_flags_tertiary_base`
|
|
106
|
-
*/
|
|
107
|
-
readonly elem_flags_tertiary_base = 4;
|
|
108
|
-
/**
|
|
109
|
-
* bitwise or value for tertiary_base in elem[elemstr][element].flags.
|
|
110
|
-
* If bit is 1, then prebase is true.
|
|
111
|
-
* If bit is 0, then prebase is false.
|
|
112
|
-
*
|
|
113
|
-
* Used only for `ordr`-type element strings.
|
|
114
|
-
*
|
|
115
|
-
* `prebase = flags & elem_flags_prebase`
|
|
116
|
-
*/
|
|
117
|
-
readonly elem_flags_prebase = 8;
|
|
118
|
-
/**
|
|
119
|
-
* bitwise mask for order in elem[elemstr][element].flags.
|
|
120
|
-
*
|
|
121
|
-
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
122
|
-
*
|
|
123
|
-
* `order = (flags & elem_flags_order_mask) >> elem_flags_order_bitshift`
|
|
124
|
-
*/
|
|
125
|
-
readonly elem_flags_order_mask = 16711680;
|
|
126
|
-
/**
|
|
127
|
-
* bit shift for order in elem[elemstr][element].flags.
|
|
128
|
-
*
|
|
129
|
-
* Used only for `ordr`-type element strings.
|
|
130
|
-
*
|
|
131
|
-
* `order = (flags & elem_flags_order_mask) >> elem_flags_order_bitshift`
|
|
132
|
-
*/
|
|
133
|
-
readonly elem_flags_order_bitshift = 16;
|
|
134
|
-
/**
|
|
135
|
-
* bitwise mask for tertiary sort in elem[elemstr][element].flags.
|
|
136
|
-
*
|
|
137
|
-
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
138
|
-
*
|
|
139
|
-
* `tertiary = (flags & elem_flags_tertiary_mask) >> elem_flags_tertiary_bitshift`
|
|
140
|
-
*/
|
|
141
|
-
readonly elem_flags_tertiary_mask = 4278190080;
|
|
142
|
-
/**
|
|
143
|
-
* bit shift for tertiary sort in elem[elemstr][element].flags.
|
|
144
|
-
*
|
|
145
|
-
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
146
|
-
*
|
|
147
|
-
* `order = (flags & elem_flags_tertiary_mask) >> elem_flags_tertiary_bitshift`
|
|
148
|
-
*/
|
|
149
|
-
readonly elem_flags_tertiary_bitshift = 24;
|
|
150
|
-
/**
|
|
151
|
-
* Minimum length of the 'finl' section, not including entries
|
|
152
|
-
*/
|
|
153
|
-
readonly length_finl = 8;
|
|
154
|
-
/**
|
|
155
|
-
* Length of each item in the 'finl' section variable part
|
|
156
|
-
*/
|
|
157
|
-
readonly length_finl_item = 16;
|
|
158
|
-
/**
|
|
159
|
-
* bitwise or value for error="fail" in transform
|
|
160
|
-
*/
|
|
161
|
-
readonly finl_flags_error = 1;
|
|
162
|
-
/**
|
|
163
|
-
* Constant for no modifiers
|
|
164
|
-
*/
|
|
165
|
-
readonly keys_mod_none = 0;
|
|
166
|
-
/**
|
|
167
|
-
* bitmask for Left Alt modifier key
|
|
168
|
-
*/
|
|
169
|
-
readonly keys_mod_altL = 4;
|
|
170
|
-
/**
|
|
171
|
-
* bitmask for Right Alt (AltGr) modifier key
|
|
172
|
-
*/
|
|
173
|
-
readonly keys_mod_altR = 8;
|
|
174
|
-
/**
|
|
175
|
-
* bitmask for either Alt (Windows) or Option (Apple) modifier keys
|
|
176
|
-
*/
|
|
177
|
-
readonly keys_mod_alt = 64;
|
|
178
|
-
/**
|
|
179
|
-
* bitmask for Caps modifier key
|
|
180
|
-
*/
|
|
181
|
-
readonly keys_mod_caps = 256;
|
|
182
|
-
/**
|
|
183
|
-
* bitmask for Left control modifier key
|
|
184
|
-
*/
|
|
185
|
-
readonly keys_mod_ctrlL = 1;
|
|
186
|
-
/**
|
|
187
|
-
* bitmask for Right control modifier key
|
|
188
|
-
*/
|
|
189
|
-
readonly keys_mod_ctrlR = 2;
|
|
190
|
-
/**
|
|
191
|
-
* bitmask for either Control modifier key
|
|
192
|
-
*/
|
|
193
|
-
readonly keys_mod_ctrl = 32;
|
|
194
|
-
/**
|
|
195
|
-
* bitmask for either shift.
|
|
196
|
-
*/
|
|
197
|
-
readonly keys_mod_shift = 16;
|
|
198
|
-
/**
|
|
199
|
-
* bitmask for 'other'.
|
|
200
|
-
*/
|
|
201
|
-
readonly keys_mod_other = 65536;
|
|
202
|
-
/**
|
|
203
|
-
* Convenience map for modifiers
|
|
204
|
-
*/
|
|
205
|
-
readonly keys_mod_map: Map<string, number>;
|
|
206
|
-
/**
|
|
207
|
-
* a mask combining all valid modifier bits
|
|
208
|
-
*/
|
|
209
|
-
readonly keys_mod_all: number;
|
|
210
|
-
/**
|
|
211
|
-
* Minimum length of the 'keys' section not including variable parts
|
|
212
|
-
*/
|
|
213
|
-
readonly length_keys = 24;
|
|
214
|
-
/**
|
|
215
|
-
* Length of each item in the 'keys' keys sub-table
|
|
216
|
-
*/
|
|
217
|
-
readonly length_keys_key = 36;
|
|
218
|
-
/**
|
|
219
|
-
* Length of each item in the 'keys' flick lists sub-table
|
|
220
|
-
*/
|
|
221
|
-
readonly length_keys_flick_list = 12;
|
|
222
|
-
/**
|
|
223
|
-
* Length of each item in the 'keys' flick elements sub-table
|
|
224
|
-
*/
|
|
225
|
-
readonly length_keys_flick_element = 8;
|
|
226
|
-
/**
|
|
227
|
-
* Length of each item in the 'keys.kmap' key map subtable
|
|
228
|
-
*/
|
|
229
|
-
readonly length_keys_kmap = 12;
|
|
230
|
-
/**
|
|
231
|
-
* 0 if to is a char, 1 if it is a string
|
|
232
|
-
*/
|
|
233
|
-
readonly keys_key_flags_extend = 1;
|
|
234
|
-
/**
|
|
235
|
-
* 1 if the key is a gap
|
|
236
|
-
*/
|
|
237
|
-
readonly keys_key_flags_gap = 2;
|
|
238
|
-
/**
|
|
239
|
-
* Minimum length of the 'layr' section not including variable parts
|
|
240
|
-
*/
|
|
241
|
-
readonly length_layr = 24;
|
|
242
|
-
/**
|
|
243
|
-
* Length of each layer list in the 'layr' section variable part
|
|
244
|
-
*/
|
|
245
|
-
readonly length_layr_list = 16;
|
|
246
|
-
/**
|
|
247
|
-
* for the 'hardware' field indicating a touch keyboard, non-hardware
|
|
248
|
-
*/
|
|
249
|
-
readonly layr_list_hardware_touch = "touch";
|
|
250
|
-
/**
|
|
251
|
-
* Length of each layer entry in the 'layr' section variable part
|
|
252
|
-
*/
|
|
253
|
-
readonly length_layr_entry = 16;
|
|
254
|
-
/**
|
|
255
|
-
* Length of each row entry in the 'layr' section variable part
|
|
256
|
-
*/
|
|
257
|
-
readonly length_layr_row = 8;
|
|
258
|
-
/**
|
|
259
|
-
* Length of each key entry in the 'layr' section variable part
|
|
260
|
-
*/
|
|
261
|
-
readonly length_layr_key = 4;
|
|
262
|
-
/**
|
|
263
|
-
* Minimum length of the 'list' section not including variable parts
|
|
264
|
-
*/
|
|
265
|
-
readonly length_list = 16;
|
|
266
|
-
/**
|
|
267
|
-
* Length of each list item in the 'list' list section variable part
|
|
268
|
-
*/
|
|
269
|
-
readonly length_list_item = 8;
|
|
270
|
-
/**
|
|
271
|
-
* Length of each list item in the 'list' indices section variable part
|
|
272
|
-
*/
|
|
273
|
-
readonly length_list_index = 4;
|
|
274
|
-
/**
|
|
275
|
-
* Minimum length of the 'loca' section not including variable parts
|
|
276
|
-
*/
|
|
277
|
-
readonly length_loca = 12;
|
|
278
|
-
/**
|
|
279
|
-
* Length of each item in the 'loca' section variable part
|
|
280
|
-
*/
|
|
281
|
-
readonly length_loca_item = 4;
|
|
282
|
-
/**
|
|
283
|
-
* length of the 'meta' section
|
|
284
|
-
*/
|
|
285
|
-
readonly length_meta = 36;
|
|
286
|
-
/**
|
|
287
|
-
* bitwise or value for normalization=disabled in meta.settings
|
|
288
|
-
*/
|
|
289
|
-
readonly meta_settings_normalization_disabled = 1;
|
|
290
|
-
/**
|
|
291
|
-
* Minimum length of the 'strs' section not including variable parts
|
|
292
|
-
*/
|
|
293
|
-
readonly length_strs = 12;
|
|
294
|
-
/**
|
|
295
|
-
* Length of each item in the 'strs' section variable part
|
|
296
|
-
*/
|
|
297
|
-
readonly length_strs_item = 8;
|
|
298
|
-
/**
|
|
299
|
-
* Minimum length of the 'tran' section, not including entries
|
|
300
|
-
*/
|
|
301
|
-
readonly length_tran = 20;
|
|
302
|
-
/**
|
|
303
|
-
* Length of each transform group item
|
|
304
|
-
*/
|
|
305
|
-
readonly length_tran_group = 12;
|
|
306
|
-
/**
|
|
307
|
-
* Length of each transform item
|
|
308
|
-
*/
|
|
309
|
-
readonly length_tran_transform = 16;
|
|
310
|
-
/**
|
|
311
|
-
* Length of each reorder subtable item
|
|
312
|
-
*/
|
|
313
|
-
readonly length_tran_reorder = 8;
|
|
314
|
-
/**
|
|
315
|
-
* bitwise or value for error="fail" in transform
|
|
316
|
-
*/
|
|
317
|
-
readonly tran_flags_error = 1;
|
|
318
|
-
/**
|
|
319
|
-
* this group is full of transform items
|
|
320
|
-
*/
|
|
321
|
-
readonly tran_group_type_transform = 0;
|
|
322
|
-
/**
|
|
323
|
-
* this group is full of reorder items
|
|
324
|
-
*/
|
|
325
|
-
readonly tran_group_type_reorder = 1;
|
|
326
|
-
/**
|
|
327
|
-
* Minimum length of the 'vars' section not including variable parts
|
|
328
|
-
*/
|
|
329
|
-
readonly length_vars = 16;
|
|
330
|
-
/**
|
|
331
|
-
* Length of each item in the 'vars' section variable part
|
|
332
|
-
*/
|
|
333
|
-
readonly length_vars_item = 16;
|
|
334
|
-
/**
|
|
335
|
-
* String variable
|
|
336
|
-
*/
|
|
337
|
-
readonly vars_entry_type_string = 0;
|
|
338
|
-
/**
|
|
339
|
-
* Set variable
|
|
340
|
-
*/
|
|
341
|
-
readonly vars_entry_type_set = 1;
|
|
342
|
-
/**
|
|
343
|
-
* unicodeSet variable
|
|
344
|
-
*/
|
|
345
|
-
readonly vars_entry_type_unicodeSet = 2;
|
|
346
|
-
readonly length_uset = 16;
|
|
347
|
-
/**
|
|
348
|
-
* Length of each entry in the uset.usets subtable
|
|
349
|
-
*/
|
|
350
|
-
readonly length_uset_uset = 12;
|
|
351
|
-
/**
|
|
352
|
-
* Length of each entry in the uset.ranges subtable
|
|
353
|
-
*/
|
|
354
|
-
readonly length_uset_range = 8;
|
|
355
|
-
/**
|
|
356
|
-
* All section IDs.
|
|
357
|
-
*/
|
|
358
|
-
readonly section: SectionMap;
|
|
359
|
-
/**
|
|
360
|
-
* Use to convert 4-char string into hex
|
|
361
|
-
* @param id section id such as 'sect'
|
|
362
|
-
* @returns hex ID such as 0x74636573
|
|
363
|
-
*/
|
|
364
|
-
hex_section_id(id: string): number;
|
|
365
|
-
/**
|
|
366
|
-
* Use to convert hex into 4-char string
|
|
367
|
-
* @param hex section ID such as 0x74636573
|
|
368
|
-
* @returns string such as 'sect'
|
|
369
|
-
*/
|
|
370
|
-
str_section_id(hex: number): string;
|
|
371
|
-
/** == kmx_file.UC_SENTINEL, always followed by `marker_code`, marker index 0x0001-0xfffe */
|
|
372
|
-
readonly uc_sentinel = 65535;
|
|
373
|
-
/** == kmx_file.CODE_DEADKEY */
|
|
374
|
-
readonly marker_code = 8;
|
|
375
|
-
/** used to refer to no index */
|
|
376
|
-
readonly marker_no_index = 0;
|
|
377
|
-
/** minimum usable marker index */
|
|
378
|
-
readonly marker_min_index = 1;
|
|
379
|
-
/** index value referring to the 'any' marker match */
|
|
380
|
-
readonly marker_any_index = 55295;
|
|
381
|
-
/** maximum marker index prior to the 'any' value */
|
|
382
|
-
readonly marker_max_index: number;
|
|
383
|
-
/** maximum count of markers (not including 'any') */
|
|
384
|
-
readonly marker_max_count: number;
|
|
385
|
-
}
|
|
386
|
-
export declare const constants: Constants;
|
|
387
|
-
export {};
|
|
1
|
+
/**
|
|
2
|
+
* Defines the section identifiers and ensures that we include each and every
|
|
3
|
+
* one of them in the `sections` block and gives us a type which we can iterate
|
|
4
|
+
* through.
|
|
5
|
+
*/
|
|
6
|
+
export type SectionIdent = 'sect' | 'bksp' | 'disp' | 'elem' | 'keys' | 'layr' | 'list' | 'loca' | 'meta' | 'strs' | 'tran' | 'uset' | 'vars';
|
|
7
|
+
type SectionMap = {
|
|
8
|
+
[id in SectionIdent]: SectionIdent;
|
|
9
|
+
};
|
|
10
|
+
/**
|
|
11
|
+
* Constants for the KMXPlus data format
|
|
12
|
+
* These are shared between the data access layer and the compiler.
|
|
13
|
+
* Note that the section IDs (section_keys etc.) are 32 bit hex
|
|
14
|
+
* values that are designed to appear as text when written in little endian
|
|
15
|
+
* format, so 0x7379656b = 'keys'
|
|
16
|
+
*/
|
|
17
|
+
declare class Constants {
|
|
18
|
+
/**
|
|
19
|
+
* The version of the LDML processor
|
|
20
|
+
*/
|
|
21
|
+
readonly version = "1.0";
|
|
22
|
+
/**
|
|
23
|
+
* The current CLDR version
|
|
24
|
+
*/
|
|
25
|
+
readonly cldr_version_latest = "45";
|
|
26
|
+
/**
|
|
27
|
+
* The version for testdata files
|
|
28
|
+
*/
|
|
29
|
+
readonly cldr_test_version_latest = "techpreview";
|
|
30
|
+
/**
|
|
31
|
+
* import base
|
|
32
|
+
*/
|
|
33
|
+
readonly cldr_import_base = "cldr";
|
|
34
|
+
/**
|
|
35
|
+
* implied keys file
|
|
36
|
+
*/
|
|
37
|
+
readonly cldr_implied_keys_import: string;
|
|
38
|
+
/**
|
|
39
|
+
* implied scancodes file
|
|
40
|
+
*/
|
|
41
|
+
readonly cldr_implied_forms_import: string;
|
|
42
|
+
/**
|
|
43
|
+
* Length of a raw section header, in bytes
|
|
44
|
+
*/
|
|
45
|
+
readonly length_header = 8;
|
|
46
|
+
/**
|
|
47
|
+
* Minimum length of the 'sect' section, not including entries
|
|
48
|
+
*/
|
|
49
|
+
readonly length_sect = 16;
|
|
50
|
+
/**
|
|
51
|
+
* Length of each item in the 'sect' section variable part
|
|
52
|
+
*/
|
|
53
|
+
readonly length_sect_item = 8;
|
|
54
|
+
/**
|
|
55
|
+
* Minimum length of the 'bksp' section, not including entries
|
|
56
|
+
*/
|
|
57
|
+
readonly length_bksp = 12;
|
|
58
|
+
/**
|
|
59
|
+
* Length of each item in the 'bksp' section variable part
|
|
60
|
+
*/
|
|
61
|
+
readonly length_bksp_item = 16;
|
|
62
|
+
/**
|
|
63
|
+
* bitwise or value for error="fail" in transform
|
|
64
|
+
*/
|
|
65
|
+
readonly bksp_flags_error = 1;
|
|
66
|
+
/**
|
|
67
|
+
* Minimum length of the 'disp' section, not including entries
|
|
68
|
+
*/
|
|
69
|
+
readonly length_disp = 16;
|
|
70
|
+
/**
|
|
71
|
+
* Length of each entry in the 'disp' variable part
|
|
72
|
+
*/
|
|
73
|
+
readonly length_disp_item = 12;
|
|
74
|
+
/**
|
|
75
|
+
* Minimum length of the 'elem' section, not including entries
|
|
76
|
+
*/
|
|
77
|
+
readonly length_elem = 12;
|
|
78
|
+
/**
|
|
79
|
+
* Length of each elem string in the 'elem' section variable part
|
|
80
|
+
*/
|
|
81
|
+
readonly length_elem_item = 8;
|
|
82
|
+
/**
|
|
83
|
+
* Length of each element in an elem string
|
|
84
|
+
*/
|
|
85
|
+
readonly length_elem_item_element = 8;
|
|
86
|
+
/**
|
|
87
|
+
* bitwise or value for type in elem[elemstr][element].flags.
|
|
88
|
+
* If bits are 00b, then 'element' is a UTF-32LE codepoint.
|
|
89
|
+
* If bits are 01b, then 'element' is a string index.
|
|
90
|
+
* If bits are 10b (2), then 'element' is a uset index.
|
|
91
|
+
*
|
|
92
|
+
* `type = flags & elem_flags_type`
|
|
93
|
+
*/
|
|
94
|
+
readonly elem_flags_type = 3;
|
|
95
|
+
readonly elem_flags_type_char = 0;
|
|
96
|
+
readonly elem_flags_type_str = 1;
|
|
97
|
+
readonly elem_flags_type_uset = 2;
|
|
98
|
+
/**
|
|
99
|
+
* bitwise or value for tertiary_base in elem[elemstr][element].flags.
|
|
100
|
+
* If bit is 1, then tertiary_base is true.
|
|
101
|
+
* If bit is 0, then tertiary_base is false.
|
|
102
|
+
*
|
|
103
|
+
* Used only for `ordr`-type element strings.
|
|
104
|
+
*
|
|
105
|
+
* `tertiary_base = flags & elem_flags_tertiary_base`
|
|
106
|
+
*/
|
|
107
|
+
readonly elem_flags_tertiary_base = 4;
|
|
108
|
+
/**
|
|
109
|
+
* bitwise or value for tertiary_base in elem[elemstr][element].flags.
|
|
110
|
+
* If bit is 1, then prebase is true.
|
|
111
|
+
* If bit is 0, then prebase is false.
|
|
112
|
+
*
|
|
113
|
+
* Used only for `ordr`-type element strings.
|
|
114
|
+
*
|
|
115
|
+
* `prebase = flags & elem_flags_prebase`
|
|
116
|
+
*/
|
|
117
|
+
readonly elem_flags_prebase = 8;
|
|
118
|
+
/**
|
|
119
|
+
* bitwise mask for order in elem[elemstr][element].flags.
|
|
120
|
+
*
|
|
121
|
+
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
122
|
+
*
|
|
123
|
+
* `order = (flags & elem_flags_order_mask) >> elem_flags_order_bitshift`
|
|
124
|
+
*/
|
|
125
|
+
readonly elem_flags_order_mask = 16711680;
|
|
126
|
+
/**
|
|
127
|
+
* bit shift for order in elem[elemstr][element].flags.
|
|
128
|
+
*
|
|
129
|
+
* Used only for `ordr`-type element strings.
|
|
130
|
+
*
|
|
131
|
+
* `order = (flags & elem_flags_order_mask) >> elem_flags_order_bitshift`
|
|
132
|
+
*/
|
|
133
|
+
readonly elem_flags_order_bitshift = 16;
|
|
134
|
+
/**
|
|
135
|
+
* bitwise mask for tertiary sort in elem[elemstr][element].flags.
|
|
136
|
+
*
|
|
137
|
+
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
138
|
+
*
|
|
139
|
+
* `tertiary = (flags & elem_flags_tertiary_mask) >> elem_flags_tertiary_bitshift`
|
|
140
|
+
*/
|
|
141
|
+
readonly elem_flags_tertiary_mask = 4278190080;
|
|
142
|
+
/**
|
|
143
|
+
* bit shift for tertiary sort in elem[elemstr][element].flags.
|
|
144
|
+
*
|
|
145
|
+
* Used only for `ordr`-type element strings. 1 byte signed integer.
|
|
146
|
+
*
|
|
147
|
+
* `order = (flags & elem_flags_tertiary_mask) >> elem_flags_tertiary_bitshift`
|
|
148
|
+
*/
|
|
149
|
+
readonly elem_flags_tertiary_bitshift = 24;
|
|
150
|
+
/**
|
|
151
|
+
* Minimum length of the 'finl' section, not including entries
|
|
152
|
+
*/
|
|
153
|
+
readonly length_finl = 8;
|
|
154
|
+
/**
|
|
155
|
+
* Length of each item in the 'finl' section variable part
|
|
156
|
+
*/
|
|
157
|
+
readonly length_finl_item = 16;
|
|
158
|
+
/**
|
|
159
|
+
* bitwise or value for error="fail" in transform
|
|
160
|
+
*/
|
|
161
|
+
readonly finl_flags_error = 1;
|
|
162
|
+
/**
|
|
163
|
+
* Constant for no modifiers
|
|
164
|
+
*/
|
|
165
|
+
readonly keys_mod_none = 0;
|
|
166
|
+
/**
|
|
167
|
+
* bitmask for Left Alt modifier key
|
|
168
|
+
*/
|
|
169
|
+
readonly keys_mod_altL = 4;
|
|
170
|
+
/**
|
|
171
|
+
* bitmask for Right Alt (AltGr) modifier key
|
|
172
|
+
*/
|
|
173
|
+
readonly keys_mod_altR = 8;
|
|
174
|
+
/**
|
|
175
|
+
* bitmask for either Alt (Windows) or Option (Apple) modifier keys
|
|
176
|
+
*/
|
|
177
|
+
readonly keys_mod_alt = 64;
|
|
178
|
+
/**
|
|
179
|
+
* bitmask for Caps modifier key
|
|
180
|
+
*/
|
|
181
|
+
readonly keys_mod_caps = 256;
|
|
182
|
+
/**
|
|
183
|
+
* bitmask for Left control modifier key
|
|
184
|
+
*/
|
|
185
|
+
readonly keys_mod_ctrlL = 1;
|
|
186
|
+
/**
|
|
187
|
+
* bitmask for Right control modifier key
|
|
188
|
+
*/
|
|
189
|
+
readonly keys_mod_ctrlR = 2;
|
|
190
|
+
/**
|
|
191
|
+
* bitmask for either Control modifier key
|
|
192
|
+
*/
|
|
193
|
+
readonly keys_mod_ctrl = 32;
|
|
194
|
+
/**
|
|
195
|
+
* bitmask for either shift.
|
|
196
|
+
*/
|
|
197
|
+
readonly keys_mod_shift = 16;
|
|
198
|
+
/**
|
|
199
|
+
* bitmask for 'other'.
|
|
200
|
+
*/
|
|
201
|
+
readonly keys_mod_other = 65536;
|
|
202
|
+
/**
|
|
203
|
+
* Convenience map for modifiers
|
|
204
|
+
*/
|
|
205
|
+
readonly keys_mod_map: Map<string, number>;
|
|
206
|
+
/**
|
|
207
|
+
* a mask combining all valid modifier bits
|
|
208
|
+
*/
|
|
209
|
+
readonly keys_mod_all: number;
|
|
210
|
+
/**
|
|
211
|
+
* Minimum length of the 'keys' section not including variable parts
|
|
212
|
+
*/
|
|
213
|
+
readonly length_keys = 24;
|
|
214
|
+
/**
|
|
215
|
+
* Length of each item in the 'keys' keys sub-table
|
|
216
|
+
*/
|
|
217
|
+
readonly length_keys_key = 36;
|
|
218
|
+
/**
|
|
219
|
+
* Length of each item in the 'keys' flick lists sub-table
|
|
220
|
+
*/
|
|
221
|
+
readonly length_keys_flick_list = 12;
|
|
222
|
+
/**
|
|
223
|
+
* Length of each item in the 'keys' flick elements sub-table
|
|
224
|
+
*/
|
|
225
|
+
readonly length_keys_flick_element = 8;
|
|
226
|
+
/**
|
|
227
|
+
* Length of each item in the 'keys.kmap' key map subtable
|
|
228
|
+
*/
|
|
229
|
+
readonly length_keys_kmap = 12;
|
|
230
|
+
/**
|
|
231
|
+
* 0 if to is a char, 1 if it is a string
|
|
232
|
+
*/
|
|
233
|
+
readonly keys_key_flags_extend = 1;
|
|
234
|
+
/**
|
|
235
|
+
* 1 if the key is a gap
|
|
236
|
+
*/
|
|
237
|
+
readonly keys_key_flags_gap = 2;
|
|
238
|
+
/**
|
|
239
|
+
* Minimum length of the 'layr' section not including variable parts
|
|
240
|
+
*/
|
|
241
|
+
readonly length_layr = 24;
|
|
242
|
+
/**
|
|
243
|
+
* Length of each layer list in the 'layr' section variable part
|
|
244
|
+
*/
|
|
245
|
+
readonly length_layr_list = 16;
|
|
246
|
+
/**
|
|
247
|
+
* for the 'hardware' field indicating a touch keyboard, non-hardware
|
|
248
|
+
*/
|
|
249
|
+
readonly layr_list_hardware_touch = "touch";
|
|
250
|
+
/**
|
|
251
|
+
* Length of each layer entry in the 'layr' section variable part
|
|
252
|
+
*/
|
|
253
|
+
readonly length_layr_entry = 16;
|
|
254
|
+
/**
|
|
255
|
+
* Length of each row entry in the 'layr' section variable part
|
|
256
|
+
*/
|
|
257
|
+
readonly length_layr_row = 8;
|
|
258
|
+
/**
|
|
259
|
+
* Length of each key entry in the 'layr' section variable part
|
|
260
|
+
*/
|
|
261
|
+
readonly length_layr_key = 4;
|
|
262
|
+
/**
|
|
263
|
+
* Minimum length of the 'list' section not including variable parts
|
|
264
|
+
*/
|
|
265
|
+
readonly length_list = 16;
|
|
266
|
+
/**
|
|
267
|
+
* Length of each list item in the 'list' list section variable part
|
|
268
|
+
*/
|
|
269
|
+
readonly length_list_item = 8;
|
|
270
|
+
/**
|
|
271
|
+
* Length of each list item in the 'list' indices section variable part
|
|
272
|
+
*/
|
|
273
|
+
readonly length_list_index = 4;
|
|
274
|
+
/**
|
|
275
|
+
* Minimum length of the 'loca' section not including variable parts
|
|
276
|
+
*/
|
|
277
|
+
readonly length_loca = 12;
|
|
278
|
+
/**
|
|
279
|
+
* Length of each item in the 'loca' section variable part
|
|
280
|
+
*/
|
|
281
|
+
readonly length_loca_item = 4;
|
|
282
|
+
/**
|
|
283
|
+
* length of the 'meta' section
|
|
284
|
+
*/
|
|
285
|
+
readonly length_meta = 36;
|
|
286
|
+
/**
|
|
287
|
+
* bitwise or value for normalization=disabled in meta.settings
|
|
288
|
+
*/
|
|
289
|
+
readonly meta_settings_normalization_disabled = 1;
|
|
290
|
+
/**
|
|
291
|
+
* Minimum length of the 'strs' section not including variable parts
|
|
292
|
+
*/
|
|
293
|
+
readonly length_strs = 12;
|
|
294
|
+
/**
|
|
295
|
+
* Length of each item in the 'strs' section variable part
|
|
296
|
+
*/
|
|
297
|
+
readonly length_strs_item = 8;
|
|
298
|
+
/**
|
|
299
|
+
* Minimum length of the 'tran' section, not including entries
|
|
300
|
+
*/
|
|
301
|
+
readonly length_tran = 20;
|
|
302
|
+
/**
|
|
303
|
+
* Length of each transform group item
|
|
304
|
+
*/
|
|
305
|
+
readonly length_tran_group = 12;
|
|
306
|
+
/**
|
|
307
|
+
* Length of each transform item
|
|
308
|
+
*/
|
|
309
|
+
readonly length_tran_transform = 16;
|
|
310
|
+
/**
|
|
311
|
+
* Length of each reorder subtable item
|
|
312
|
+
*/
|
|
313
|
+
readonly length_tran_reorder = 8;
|
|
314
|
+
/**
|
|
315
|
+
* bitwise or value for error="fail" in transform
|
|
316
|
+
*/
|
|
317
|
+
readonly tran_flags_error = 1;
|
|
318
|
+
/**
|
|
319
|
+
* this group is full of transform items
|
|
320
|
+
*/
|
|
321
|
+
readonly tran_group_type_transform = 0;
|
|
322
|
+
/**
|
|
323
|
+
* this group is full of reorder items
|
|
324
|
+
*/
|
|
325
|
+
readonly tran_group_type_reorder = 1;
|
|
326
|
+
/**
|
|
327
|
+
* Minimum length of the 'vars' section not including variable parts
|
|
328
|
+
*/
|
|
329
|
+
readonly length_vars = 16;
|
|
330
|
+
/**
|
|
331
|
+
* Length of each item in the 'vars' section variable part
|
|
332
|
+
*/
|
|
333
|
+
readonly length_vars_item = 16;
|
|
334
|
+
/**
|
|
335
|
+
* String variable
|
|
336
|
+
*/
|
|
337
|
+
readonly vars_entry_type_string = 0;
|
|
338
|
+
/**
|
|
339
|
+
* Set variable
|
|
340
|
+
*/
|
|
341
|
+
readonly vars_entry_type_set = 1;
|
|
342
|
+
/**
|
|
343
|
+
* unicodeSet variable
|
|
344
|
+
*/
|
|
345
|
+
readonly vars_entry_type_unicodeSet = 2;
|
|
346
|
+
readonly length_uset = 16;
|
|
347
|
+
/**
|
|
348
|
+
* Length of each entry in the uset.usets subtable
|
|
349
|
+
*/
|
|
350
|
+
readonly length_uset_uset = 12;
|
|
351
|
+
/**
|
|
352
|
+
* Length of each entry in the uset.ranges subtable
|
|
353
|
+
*/
|
|
354
|
+
readonly length_uset_range = 8;
|
|
355
|
+
/**
|
|
356
|
+
* All section IDs.
|
|
357
|
+
*/
|
|
358
|
+
readonly section: SectionMap;
|
|
359
|
+
/**
|
|
360
|
+
* Use to convert 4-char string into hex
|
|
361
|
+
* @param id section id such as 'sect'
|
|
362
|
+
* @returns hex ID such as 0x74636573
|
|
363
|
+
*/
|
|
364
|
+
hex_section_id(id: string): number;
|
|
365
|
+
/**
|
|
366
|
+
* Use to convert hex into 4-char string
|
|
367
|
+
* @param hex section ID such as 0x74636573
|
|
368
|
+
* @returns string such as 'sect'
|
|
369
|
+
*/
|
|
370
|
+
str_section_id(hex: number): string;
|
|
371
|
+
/** == kmx_file.UC_SENTINEL, always followed by `marker_code`, marker index 0x0001-0xfffe */
|
|
372
|
+
readonly uc_sentinel = 65535;
|
|
373
|
+
/** == kmx_file.CODE_DEADKEY */
|
|
374
|
+
readonly marker_code = 8;
|
|
375
|
+
/** used to refer to no index */
|
|
376
|
+
readonly marker_no_index = 0;
|
|
377
|
+
/** minimum usable marker index */
|
|
378
|
+
readonly marker_min_index = 1;
|
|
379
|
+
/** index value referring to the 'any' marker match */
|
|
380
|
+
readonly marker_any_index = 55295;
|
|
381
|
+
/** maximum marker index prior to the 'any' value */
|
|
382
|
+
readonly marker_max_index: number;
|
|
383
|
+
/** maximum count of markers (not including 'any') */
|
|
384
|
+
readonly marker_max_count: number;
|
|
385
|
+
}
|
|
386
|
+
export declare const constants: Constants;
|
|
387
|
+
export {};
|
|
388
388
|
//# sourceMappingURL=keyman_core_ldml.d.ts.map
|