diff --git a/common/web/types/src/kmx/kmx-plus-builder/build-keys.ts b/common/web/types/src/kmx/kmx-plus-builder/build-keys.ts
index d9d30e8683..ec7e505c57 100644
--- a/common/web/types/src/kmx/kmx-plus-builder/build-keys.ts
+++ b/common/web/types/src/kmx/kmx-plus-builder/build-keys.ts
@@ -41,8 +41,7 @@ interface BUILDER_KEYS_FLICKS {
*/
interface BUILDER_KEYS_FLICK {
directions: BUILDER_LIST_REF; // list of cardinal/intercardinal directions
- flags: number; //
- to: BUILDER_STR_REF | number; // str or single codepoint
+ to: BUILDER_STR_REF; // str
};
@@ -106,8 +105,7 @@ export function build_keys(kmxplus: KMXPlusData, sect_strs: BUILDER_STRS, sect_l
flicks._flicks.forEach((flick) => {
keys.flick.push({
directions: build_list_index(sect_list, flick.directions),
- flags: flick.flags,
- to: build_strs_index(sect_strs, flick.to),
+ to: build_strs_index(sect_strs, flick.keyId),
});
keys.flickCount++;
});
diff --git a/common/web/types/src/kmx/kmx-plus-builder/build-meta.ts b/common/web/types/src/kmx/kmx-plus-builder/build-meta.ts
index c1633aeca7..23dd303a7d 100644
--- a/common/web/types/src/kmx/kmx-plus-builder/build-meta.ts
+++ b/common/web/types/src/kmx/kmx-plus-builder/build-meta.ts
@@ -15,7 +15,7 @@ export interface BUILDER_META extends BUILDER_SECTION {
author: BUILDER_STR_REF; //str
conform: BUILDER_STR_REF; //str
layout: BUILDER_STR_REF; //str
- normalization: BUILDER_STR_REF; //str
+ name: BUILDER_STR_REF; //str
indicator: BUILDER_STR_REF; //str
version: BUILDER_STR_REF; //str
settings: number; //bitfield
@@ -29,7 +29,7 @@ export function build_meta(kmxplus: KMXPlusData, sect_strs: BUILDER_STRS): BUILD
author: build_strs_index(sect_strs, kmxplus.meta.author),
conform: build_strs_index(sect_strs, kmxplus.meta.conform),
layout: build_strs_index(sect_strs, kmxplus.meta.layout),
- normalization: build_strs_index(sect_strs, kmxplus.meta.normalization),
+ name: build_strs_index(sect_strs, kmxplus.meta.name),
indicator: build_strs_index(sect_strs, kmxplus.meta.indicator),
version: build_strs_index(sect_strs, kmxplus.meta.version),
settings: kmxplus.meta.settings ?? 0,
diff --git a/common/web/types/src/kmx/kmx-plus-builder/build-name.ts b/common/web/types/src/kmx/kmx-plus-builder/build-name.ts
deleted file mode 100644
index 9463d15204..0000000000
--- a/common/web/types/src/kmx/kmx-plus-builder/build-name.ts
+++ /dev/null
@@ -1,37 +0,0 @@
-
-/* ------------------------------------------------------------------
- * name section
- ------------------------------------------------------------------ */
-
-import { constants } from "@keymanapp/ldml-keyboard-constants";
-import { KMXPlusData } from "../kmx-plus.js";
-import { build_strs_index, BUILDER_STR_REF, BUILDER_STRS } from "./build-strs.js";
-import { BUILDER_SECTION } from "./builder-section.js";
-
-/**
- * Builder for the 'name' section
- */
-export interface BUILDER_NAME extends BUILDER_SECTION {
- count: number;
- items: BUILDER_STR_REF[];
-};
-
-export function build_name(kmxplus: KMXPlusData, sect_strs: BUILDER_STRS): BUILDER_NAME {
- if(!kmxplus.name.names.length) {
- return null;
- }
-
- let name: BUILDER_NAME = {
- ident: constants.hex_section_id(constants.section.name),
- size: constants.length_name + constants.length_name_item * kmxplus.name.names.length,
- _offset: 0,
- count: kmxplus.name.names.length,
- items: []
- };
-
- for(let item of kmxplus.name.names) {
- name.items.push(build_strs_index(sect_strs, item));
- }
-
- return name;
-}
diff --git a/common/web/types/src/kmx/kmx-plus-builder/kmx-plus-builder.ts b/common/web/types/src/kmx/kmx-plus-builder/kmx-plus-builder.ts
index e77c60fbe7..381e1d6d19 100644
--- a/common/web/types/src/kmx/kmx-plus-builder/kmx-plus-builder.ts
+++ b/common/web/types/src/kmx/kmx-plus-builder/kmx-plus-builder.ts
@@ -10,7 +10,6 @@ import { BUILDER_LAYR, build_layr } from './build-layr.js';
import { BUILDER_LIST, build_list } from './build-list.js';
import { BUILDER_LOCA, build_loca } from './build-loca.js';
import { BUILDER_META, build_meta } from './build-meta.js';
-import { BUILDER_NAME, build_name } from './build-name.js';
import { BUILDER_STRS, build_strs } from './build-strs.js';
import { BUILDER_TRAN, build_tran } from './build-tran.js';
import { BUILDER_USET, build_uset } from './build-uset.js';
@@ -30,7 +29,6 @@ type SectionBuilders = {
list?: BUILDER_LIST;
loca?: BUILDER_LOCA;
meta?: BUILDER_META;
- name?: BUILDER_NAME;
strs?: BUILDER_STRS;
tran?: BUILDER_TRAN;
uset?: BUILDER_USET;
@@ -65,7 +63,6 @@ export default class KMXPlusBuilder {
this.emitSection(file, this.file.COMP_PLUS_LIST, this.sect.list);
this.emitSection(file, this.file.COMP_PLUS_LOCA, this.sect.loca);
this.emitSection(file, this.file.COMP_PLUS_META, this.sect.meta);
- this.emitSection(file, this.file.COMP_PLUS_NAME, this.sect.name);
this.emitSection(file, this.file.COMP_PLUS_STRS, this.sect.strs);
this.emitStrings(file);
this.emitSection(file, this.file.COMP_PLUS_TRAN, this.sect.tran);
@@ -93,7 +90,6 @@ export default class KMXPlusBuilder {
this.sect.layr = build_layr(this.file.kmxplus, this.sect.strs, this.sect.list);
this.sect.loca = build_loca(this.file.kmxplus, this.sect.strs);
this.sect.meta = build_meta(this.file.kmxplus, this.sect.strs);
- this.sect.name = build_name(this.file.kmxplus, this.sect.strs);
this.sect.tran = build_tran(this.file.kmxplus.tran, this.sect.strs, this.sect.elem);
this.sect.uset = build_uset(this.file.kmxplus, this.sect.strs);
this.sect.vars = build_vars(this.file.kmxplus, this.sect.strs, this.sect.elem, this.sect.list);
@@ -129,7 +125,6 @@ export default class KMXPlusBuilder {
offset = this.finalize_sect_item(this.sect.list, offset);
offset = this.finalize_sect_item(this.sect.loca, offset);
offset = this.finalize_sect_item(this.sect.meta, offset);
- offset = this.finalize_sect_item(this.sect.name, offset);
offset = this.finalize_sect_item(this.sect.strs, offset);
offset = this.finalize_sect_item(this.sect.tran, offset);
offset = this.finalize_sect_item(this.sect.uset, offset);
diff --git a/common/web/types/src/kmx/kmx-plus.ts b/common/web/types/src/kmx/kmx-plus.ts
index 1060e50fba..4ce22c33dd 100644
--- a/common/web/types/src/kmx/kmx-plus.ts
+++ b/common/web/types/src/kmx/kmx-plus.ts
@@ -64,29 +64,19 @@ export class Loca extends Section {
export enum KeyboardSettings {
none = 0,
- fallback = constants.meta_settings_fallback_omit,
- transformFailure = constants.meta_settings_transformFailure_omit,
- transformPartial = constants.meta_settings_transformPartial_hide,
+ normalizationDisabled = constants.meta_settings_normalization_disabled,
};
-export enum Meta_NormalizationForm { NFC='NFC', NFD='NFD', other='other' };
-
export class Meta extends Section {
author: StrsItem;
conform: StrsItem;
layout: StrsItem;
- normalization: StrsItem;
+ name: StrsItem;
indicator: StrsItem;
version: StrsItem; // semver version string, defaults to "0"
settings: KeyboardSettings;
};
-// 'name'
-
-export class Name extends Section {
- names: StrsItem[] = [];
-};
-
// 'strs'
/**
@@ -502,8 +492,7 @@ export class KeysFlicks {
export class KeysFlick {
directions: ListItem;
- flags: number;
- to: StrsItem;
+ keyId: StrsItem;
};
export class Keys extends Section {
@@ -571,7 +560,6 @@ export interface KMXPlusData {
list?: List; // list is ignored in-memory
loca?: Loca;
meta?: Meta;
- name?: Name;
strs?: Strs; // strs is ignored in-memory
tran?: Tran;
uset?: Uset; // uset is ignored in-memory
@@ -619,9 +607,6 @@ export class KMXPlusFile extends KMXFile {
public readonly COMP_PLUS_META: any;
- public readonly COMP_PLUS_NAME_ITEM: any;
- public readonly COMP_PLUS_NAME: any;
-
public readonly COMP_PLUS_STRS_ITEM: any;
public readonly COMP_PLUS_STRS: any;
@@ -752,7 +737,6 @@ export class KMXPlusFile extends KMXFile {
this.COMP_PLUS_KEYS_FLICK = new r.Struct({
directions: LIST_REF, // list
- flags: r.uint32le,
to: STR_OR_CHAR32, // str | codepoint
});
@@ -832,22 +816,13 @@ export class KMXPlusFile extends KMXFile {
author: STR_REF, //str
conform: STR_REF, //str
layout: STR_REF, //str
- normalization: STR_REF, //str
+ name: STR_REF, //str
indicator: STR_REF, //str
version: STR_REF, //str
- settings: r.uint32le, //new r.Bitfield(r.uint32le, ['fallback', 'transformFailure', 'transformPartial'])
+ settings: r.uint32le, //new r.Bitfield(r.uint32le, ['normalizationDisabled'])
});
- // 'name'
-
- this.COMP_PLUS_NAME_ITEM = r.uint32le; //str
-
- this.COMP_PLUS_NAME = new r.Struct({
- ident: IDENT,
- size: r.uint32le,
- count: r.uint32le,
- items: new r.Array(this.COMP_PLUS_NAME_ITEM, 'count')
- });
+ // 'name' is gone
// 'ordr' now part of 'tran'
@@ -937,19 +912,7 @@ export class KMXPlusFile extends KMXFile {
varEntries: new r.Array(this.COMP_PLUS_VARS_ITEM, 'varCount'),
});
- // 'vkey'
-
- this.COMP_PLUS_VKEY_ITEM = new r.Struct({
- vkey: r.uint32le,
- target: r.uint32le
- });
-
- this.COMP_PLUS_VKEY = new r.Struct({
- ident: IDENT,
- size: r.uint32le,
- count: r.uint32le,
- items: new r.Array(this.COMP_PLUS_VKEY_ITEM, 'count')
- });
+ // 'vkey' is removed
// Aliases
diff --git a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts
index 3d0b2c7131..8ff142693e 100644
--- a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts
+++ b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml-reader.ts
@@ -39,9 +39,9 @@ export class LDMLKeyboardXMLSourceFileReader {
private boxArrays(source: any) : boolean {
if (source?.keyboard3) {
if (!source.keyboard3.keys) {
+ // Note: this is here to put a substrate for the imported keys
source.keyboard3.keys = {
key: [],
- flicks: [],
};
}
if (!source.keyboard3.keys.import) {
@@ -58,9 +58,8 @@ export class LDMLKeyboardXMLSourceFileReader {
}
boxXmlArray(source?.keyboard3, 'layers');
boxXmlArray(source?.keyboard3?.displays, 'display');
- boxXmlArray(source?.keyboard3?.names, 'name');
boxXmlArray(source?.keyboard3?.keys, 'key');
- boxXmlArray(source?.keyboard3?.keys, 'flicks');
+ boxXmlArray(source?.keyboard3?.flicks, 'flick');
boxXmlArray(source?.keyboard3?.locales, 'locale');
boxXmlArray(source?.keyboard3, 'transforms');
if(source?.keyboard3?.layers) {
@@ -79,9 +78,10 @@ export class LDMLKeyboardXMLSourceFileReader {
boxXmlArray(form, 'scanCodes');
}
}
- if(source?.keyboard3?.keys?.flicks) {
- for(let flicks of source?.keyboard3?.keys?.flicks) {
- boxXmlArray(flicks, 'flick');
+ if(source?.keyboard3?.flicks) {
+ boxXmlArray(source?.keyboard3?.flicks, 'flick');
+ for(let flick of source?.keyboard3?.flicks?.flick) {
+ boxXmlArray(flick, 'flickSegment');
}
}
if(source?.keyboard3?.variables) {
@@ -98,13 +98,13 @@ export class LDMLKeyboardXMLSourceFileReader {
}
}
}
- return this.boxImportsAndSpecials(source, 'keyboard');
+ return this.boxImportsAndSpecials(source, 'keyboard3');
}
/**
* Recurse over object, boxing up any specials or imports
* @param obj any object to be traversed
- * @param subtag the leafmost enclosing tag such as 'keyboard'
+ * @param subtag the leafmost enclosing tag such as 'keyboard3'
* @returns true on success, false on failure
*/
private boxImportsAndSpecials(obj: any, subtag: string) : boolean {
diff --git a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts
index 83720312dd..abde61c428 100644
--- a/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts
+++ b/common/web/types/src/ldml-keyboard/ldml-keyboard-xml.ts
@@ -21,9 +21,9 @@ export interface LKKeyboard {
locales?: LKLocales;
version?: LKVersion;
info?: LKInfo;
- names?: LKNames;
settings?: LKSettings;
keys?: LKKeys;
+ flicks?: LKFlicks;
forms?: LKForms;
displays?: LKDisplays;
layers?: LKLayers[];
@@ -58,24 +58,14 @@ export interface LKVersion {
}
export interface LKInfo {
+ name?: string;
author?: string;
- indicator?: string;
layout?: string;
- normalization?: string;
-};
-
-export interface LKNames {
- name: LKName[];
-};
-
-export interface LKName {
- value?: string;
+ indicator?: string;
};
export interface LKSettings {
- fallback: "omit";
- transformFailure: "omit";
- transformPartial: "hide";
+ normalization: "disabled";
};
export interface LKKeys {
@@ -85,32 +75,35 @@ export interface LKKeys {
export interface LKKey {
id?: string;
- flicks?: string;
- to?: string;
+ flickId?: string;
+ output?: string;
gap?: boolean;
- switch?: string;
- longPress?: string;
- longPressDefault?: string;
- multiTap?: string;
- transform?: "no";
+ layerId?: string;
+ longPressKeyIds?: string;
+ longPressDefaultKeyId?: string;
+ multiTapKeyIds?: string;
width?: number;
};
export interface LKFlicks {
- id?: string;
flick?: LKFlick[];
};
export interface LKFlick {
- directions?: string;
- to?: string;
+ id?: string;
+ flickSegment?: LKFlickSegment[];
};
+export interface LKFlickSegment {
+ directions?: string;
+ keyId?: string;
+}
+
export interface LKLayers {
/**
* `touch`, or hardware `us`, `iso`, `jis`, `abnt2`
*/
- form?: string;
+ formId?: string;
/**
* Minimum width in millimeters
*/
@@ -120,7 +113,7 @@ export interface LKLayers {
export interface LKLayer {
id?: string;
- modifier?: string;
+ modifiers?: string;
row?: LKRow[];
};
@@ -175,9 +168,9 @@ export interface LKDisplayOptions {
};
export interface LKDisplay {
- to?: string;
+ output?: string;
display?: string;
- id?: string;
+ keyId?: string;
};
export interface LKDisplays {
diff --git a/common/web/types/test/fixtures/import-minimal.xml b/common/web/types/test/fixtures/import-minimal.xml
index f23bc5c325..02a4c0fdfe 100644
--- a/common/web/types/test/fixtures/import-minimal.xml
+++ b/common/web/types/test/fixtures/import-minimal.xml
@@ -1,8 +1,5 @@
-
-
-
-
+
diff --git a/common/web/types/test/fixtures/import-minimal1.xml b/common/web/types/test/fixtures/import-minimal1.xml
index ce2140893e..7239fc9a85 100644
--- a/common/web/types/test/fixtures/import-minimal1.xml
+++ b/common/web/types/test/fixtures/import-minimal1.xml
@@ -1,10 +1,7 @@
-
-
-
-
+
diff --git a/common/web/types/test/fixtures/import-minimal2.xml b/common/web/types/test/fixtures/import-minimal2.xml
index 66a836057d..3e30044f26 100644
--- a/common/web/types/test/fixtures/import-minimal2.xml
+++ b/common/web/types/test/fixtures/import-minimal2.xml
@@ -1,11 +1,8 @@
-
-
-
-
+
-
+
diff --git a/common/web/types/test/fixtures/import-symbols.xml b/common/web/types/test/fixtures/import-symbols.xml
index e3421c8ff3..763de4e78a 100644
--- a/common/web/types/test/fixtures/import-symbols.xml
+++ b/common/web/types/test/fixtures/import-symbols.xml
@@ -1,13 +1,10 @@
-
-
-
-
+
-
-
+
+
diff --git a/common/web/types/test/fixtures/invalid-conforms-to.xml b/common/web/types/test/fixtures/invalid-conforms-to.xml
index e5cca5ebac..01e463d817 100644
--- a/common/web/types/test/fixtures/invalid-conforms-to.xml
+++ b/common/web/types/test/fixtures/invalid-conforms-to.xml
@@ -5,15 +5,11 @@
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
-->
-
-
-
-
-
+
-
-
+
+
diff --git a/common/web/types/test/fixtures/invalid-import-base.xml b/common/web/types/test/fixtures/invalid-import-base.xml
index f52a13031e..05dcaad299 100644
--- a/common/web/types/test/fixtures/invalid-import-base.xml
+++ b/common/web/types/test/fixtures/invalid-import-base.xml
@@ -1,16 +1,12 @@
-
-
-
-
-
+
-
-
+
+
diff --git a/common/web/types/test/fixtures/invalid-import-path.xml b/common/web/types/test/fixtures/invalid-import-path.xml
index c52b18ff56..b6d4c9da66 100644
--- a/common/web/types/test/fixtures/invalid-import-path.xml
+++ b/common/web/types/test/fixtures/invalid-import-path.xml
@@ -1,16 +1,12 @@
-
-
-
-
-
+
-
-
+
+
diff --git a/common/web/types/test/fixtures/invalid-import-readfail.xml b/common/web/types/test/fixtures/invalid-import-readfail.xml
index d66288ecda..00f02e7da8 100644
--- a/common/web/types/test/fixtures/invalid-import-readfail.xml
+++ b/common/web/types/test/fixtures/invalid-import-readfail.xml
@@ -1,16 +1,12 @@
-
-
-
-
-
+
-
-
+
+
diff --git a/common/web/types/test/fixtures/invalid-import-wrongroot.xml b/common/web/types/test/fixtures/invalid-import-wrongroot.xml
index 45d6b3b713..fbe75ffe19 100644
--- a/common/web/types/test/fixtures/invalid-import-wrongroot.xml
+++ b/common/web/types/test/fixtures/invalid-import-wrongroot.xml
@@ -1,16 +1,19 @@
-
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
diff --git a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts
index 43429676a0..b218b8cefb 100644
--- a/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts
+++ b/common/web/types/test/ldml-keyboard/test-ldml-keyboard-xml-reader.ts
@@ -18,8 +18,8 @@ describe('ldml keyboard xml reader tests', function () {
errors: [CommonTypesMessages.Error_SchemaValidationError({
instancePath: '/keyboard3',
keyword: 'required',
- message: `must have required property 'names'`,
- params: 'missingProperty="names"',
+ message: `must have required property 'info'`,
+ params: 'missingProperty="info"',
})],
},
{
@@ -37,9 +37,9 @@ describe('ldml keyboard xml reader tests', function () {
assert.ok(source?.keyboard3?.keys);
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
assert.sameDeepOrderedMembers(k, [
- {id: 'a', to: 'a'},
- {id: 'b', to: 'b'},
- {id: 'c', to: 'c'},
+ {id: 'a', output: 'a'},
+ {id: 'b', output: 'b'},
+ {id: 'c', output: 'c'},
]);
// all of the keys are implied imports here
assert.isTrue(ImportStatus.isImpliedImport(source?.keyboard3?.keys.key.find(({id}) => id === 'a')));
@@ -52,9 +52,9 @@ describe('ldml keyboard xml reader tests', function () {
assert.ok(source?.keyboard3?.keys);
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
assert.sameDeepOrderedMembers(k, [
- {id: 'a', to: 'a'},
- {id: 'b', to: 'b'},
- {id: 'c', to: 'c'},
+ {id: 'a', output: 'a'},
+ {id: 'b', output: 'b'},
+ {id: 'c', output: 'c'},
]);
},
},
@@ -64,10 +64,10 @@ describe('ldml keyboard xml reader tests', function () {
assert.ok(source?.keyboard3?.keys);
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c']);
assert.sameDeepOrderedMembers(k, [
- {id: 'a', to: 'a'},
- {id: 'b', to: 'b'},
- {id: 'c', to: 'c'},
- {id: 'a', to: 'å'}, // overridden
+ {id: 'a', output: 'a'},
+ {id: 'b', output: 'b'},
+ {id: 'c', output: 'c'},
+ {id: 'a', output: 'å'}, // overridden
]);
},
},
@@ -77,13 +77,13 @@ describe('ldml keyboard xml reader tests', function () {
assert.ok(source?.keyboard3?.keys);
const k = pluckKeysFromKeybag(source?.keyboard3?.keys.key, ['a', 'b', 'c', 'zz', 'hash', 'hyphen']);
assert.sameDeepOrderedMembers(k, [
- {id: 'a', to: 'a'}, // implied
- {id: 'b', to: 'b'},
- {id: 'c', to: 'c'},
- {id: 'hash', to: '#'}, // imported symbols
- {id: 'hyphen', to: '-'},
- {id: 'zz', to: 'zz'}, // new key
- {id: 'hash', to: '##'}, // override
+ { id: 'a', output: 'a' }, // implied
+ { id: 'b', output: 'b' },
+ { id: 'c', output: 'c' },
+ { id: 'hash', output: '#' }, // imported symbols
+ { id: 'hyphen', output: '-' },
+ { id: 'zz', output: 'zz' }, // new key
+ { id: 'hash', output: '##' }, // override
]);
// 'a' is an implied import
assert.isTrue(ImportStatus.isImpliedImport(k.find(({id}) => id === 'a')));
@@ -136,7 +136,7 @@ describe('ldml keyboard xml reader tests', function () {
CommonTypesMessages.Error_ImportWrongRoot({
base: null,
path: 'techpreview/keys-Zyyy-punctuation.xml',
- subtag: 'names',
+ subtag: 'flicks',
}),
],
},
diff --git a/core/include/ldml/keyman_core_ldml.h b/core/include/ldml/keyman_core_ldml.h
index 41f87a0d50..3733442862 100644
--- a/core/include/ldml/keyman_core_ldml.h
+++ b/core/include/ldml/keyman_core_ldml.h
@@ -32,10 +32,8 @@
#define LDML_ELEM_FLAGS_TYPE_STR 0x1
#define LDML_ELEM_FLAGS_TYPE_USET 0x2
#define LDML_FINL_FLAGS_ERROR 0x1
-#define LDML_KEYS_FLICK_FLAGS_EXTEND 0x1
#define LDML_KEYS_KEY_FLAGS_EXTEND 0x1
#define LDML_KEYS_KEY_FLAGS_GAP 0x2
-#define LDML_KEYS_KEY_FLAGS_NOTRANSFORM 0x4
#define LDML_KEYS_MOD_ALL 0x17F
#define LDML_KEYS_MOD_ALT 0x40
#define LDML_KEYS_MOD_ALTL 0x4
@@ -58,7 +56,7 @@
#define LDML_LENGTH_FINL_ITEM 0x10
#define LDML_LENGTH_HEADER 0x8
#define LDML_LENGTH_KEYS 0x18
-#define LDML_LENGTH_KEYS_FLICK_ELEMENT 0xC
+#define LDML_LENGTH_KEYS_FLICK_ELEMENT 0x8
#define LDML_LENGTH_KEYS_FLICK_LIST 0xC
#define LDML_LENGTH_KEYS_KEY 0x24
#define LDML_LENGTH_KEYS_KMAP 0xC
@@ -73,8 +71,6 @@
#define LDML_LENGTH_LOCA 0xC
#define LDML_LENGTH_LOCA_ITEM 0x4
#define LDML_LENGTH_META 0x24
-#define LDML_LENGTH_NAME 0xC
-#define LDML_LENGTH_NAME_ITEM 0x4
#define LDML_LENGTH_SECT 0x10
#define LDML_LENGTH_SECT_ITEM 0x8
#define LDML_LENGTH_STRS 0xC
@@ -93,9 +89,7 @@
#define LDML_MARKER_MAX_COUNT 0xD7FE
#define LDML_MARKER_MAX_INDEX 0xD7FE
#define LDML_MARKER_MIN_INDEX 0x1
-#define LDML_META_SETTINGS_FALLBACK_OMIT 0x1
-#define LDML_META_SETTINGS_TRANSFORMFAILURE_OMIT 0x2
-#define LDML_META_SETTINGS_TRANSFORMPARTIAL_HIDE 0x4
+#define LDML_META_SETTINGS_NORMALIZATION_DISABLED 0x1
#define LDML_SECTIONID_BKSP 0x70736B62 /* "bksp" */
#define LDML_SECTIONNAME_BKSP "bksp"
#define LDML_SECTIONID_DISP 0x70736964 /* "disp" */
@@ -112,8 +106,6 @@
#define LDML_SECTIONNAME_LOCA "loca"
#define LDML_SECTIONID_META 0x6174656D /* "meta" */
#define LDML_SECTIONNAME_META "meta"
-#define LDML_SECTIONID_NAME 0x656D616E /* "name" */
-#define LDML_SECTIONNAME_NAME "name"
#define LDML_SECTIONID_SECT 0x74636573 /* "sect" */
#define LDML_SECTIONNAME_SECT "sect"
#define LDML_SECTIONID_STRS 0x73727473 /* "strs" */
diff --git a/core/include/ldml/keyman_core_ldml.ts b/core/include/ldml/keyman_core_ldml.ts
index b404a05bcc..9b76549074 100644
--- a/core/include/ldml/keyman_core_ldml.ts
+++ b/core/include/ldml/keyman_core_ldml.ts
@@ -33,7 +33,6 @@ export type SectionIdent =
'list' |
'loca' |
'meta' |
- 'name' |
'strs' |
'tran' |
'uset' |
@@ -312,7 +311,7 @@ class Constants {
/**
* Length of each item in the 'keys' flick elements sub-table
*/
- readonly length_keys_flick_element = 12;
+ readonly length_keys_flick_element = 8;
/**
* Length of each item in the 'keys.kmap' key map subtable
*/
@@ -328,16 +327,6 @@ class Constants {
*/
readonly keys_key_flags_gap = 0x00000002;
- /**
- * 1 if the key is transform=no
- */
- readonly keys_key_flags_notransform = 0x00000004;
-
- /**
- * 0 if to is a char, 1 if it is a string
- */
- readonly keys_flick_flags_extend = 0x00000001;
-
/* ------------------------------------------------------------------
* layr section
------------------------------------------------------------------ */
@@ -406,30 +395,9 @@ class Constants {
*/
readonly length_meta = 36;
/**
- * bitwise or value for fallback=omit in meta.settings
+ * bitwise or value for normalization=disabled in meta.settings
*/
- readonly meta_settings_fallback_omit = 1;
- /**
- * bitwise or value for transformFailure=omit in meta.settings
- */
- readonly meta_settings_transformFailure_omit = 2;
- /**
- * bitwise or value for transformPartial=hide in meta.settings
- */
- readonly meta_settings_transformPartial_hide = 4;
-
- /* ------------------------------------------------------------------
- * name section
- ------------------------------------------------------------------ */
-
- /**
- * Minimum length of the 'name' section not including variable parts
- */
- readonly length_name = 12;
- /**
- * Length of each item in the 'name' section variable part
- */
- readonly length_name_item = 4;
+ readonly meta_settings_normalization_disabled = 1;
/* ------------------------------------------------------------------
* strs section
@@ -537,7 +505,6 @@ class Constants {
list: 'list',
loca: 'loca',
meta: 'meta',
- name: 'name',
sect: 'sect',
strs: 'strs',
tran: 'tran',
diff --git a/core/src/kmx/kmx_plus.cpp b/core/src/kmx/kmx_plus.cpp
index ca25f07ebb..295d92a4b2 100644
--- a/core/src/kmx/kmx_plus.cpp
+++ b/core/src/kmx/kmx_plus.cpp
@@ -209,7 +209,7 @@ COMP_KMXPLUS_META::valid(KMX_DWORD _kmn_unused(length)) const {
DebugLog(" author:\t#0x%X\n", author);
DebugLog(" conform:\t#0x%X\n", conform);
DebugLog(" layout:\t#0x%X\n", layout);
- DebugLog(" normalization:\t#0x%X\n", normalization);
+ DebugLog(" name:\t#0x%X\n", name);
DebugLog(" indicator:\t#0x%X\n", indicator);
DebugLog(" settings:\t0x%X\n", settings);
return true;
@@ -227,9 +227,9 @@ COMP_KMXPLUS_DISP::valid(KMX_DWORD _kmn_unused(length)) const {
DebugLog("disp: baseCharacter str#0x%X", baseCharacter);
}
for (KMX_DWORD i=0; i str0x%X", i, entries[i].to, entries[i].display);
- if (entries[i].to == 0 || entries[i].display == 0) {
- DebugLog("disp to: or display: has a zero string");
+ DebugLoad("disp#%d: id: str0x%X to: str0x%X -> str0x%X", i, entries[i].id, entries[i].to, entries[i].display);
+ if ((entries[i].to == 0 && entries[i].id == 0) || entries[i].display == 0) {
+ DebugLog("disp must have either keyId/output, and must have display");
assert(false);
return false;
}
@@ -812,7 +812,7 @@ COMP_KMXPLUS_KEYS_Helper::setKeys(const COMP_KMXPLUS_KEYS *newKeys) {
is_valid = false;
assert(is_valid);
}
- DebugLoad(" %d: to=0x%X, directions=0x%X, flags=0x%X", i, e.to, e.directions, e.flags);
+ DebugLoad(" %d: to=0x%X, directions=0x%X", i, e.to, e.directions);
}
// now the kmap
DebugLoad(" kmap count: #0x%X", key2->kmapCount);
diff --git a/core/src/kmx/kmx_plus.h b/core/src/kmx/kmx_plus.h
index b6ac0c7fa3..fdfcf6f5cb 100644
--- a/core/src/kmx/kmx_plus.h
+++ b/core/src/kmx/kmx_plus.h
@@ -184,7 +184,7 @@ struct COMP_KMXPLUS_META {
KMXPLUS_STR author;
KMXPLUS_STR conform;
KMXPLUS_STR layout;
- KMXPLUS_STR normalization;
+ KMXPLUS_STR name;
KMXPLUS_STR indicator;
KMXPLUS_STR version;
KMX_DWORD_unaligned settings;
@@ -196,28 +196,6 @@ struct COMP_KMXPLUS_META {
static_assert(sizeof(struct COMP_KMXPLUS_META) == LDML_LENGTH_META, "mismatched size of section meta");
-/* ------------------------------------------------------------------
- * name section
- ------------------------------------------------------------------ */
-
-struct COMP_KMXPLUS_NAME_ENTRY {
- KMXPLUS_STR name;
-};
-
-struct COMP_KMXPLUS_NAME {
- static const KMXPLUS_IDENT IDENT = LDML_SECTIONID_NAME;
- COMP_KMXPLUS_HEADER header;
- KMX_DWORD_unaligned count;
- COMP_KMXPLUS_NAME_ENTRY entries[];
- /**
- * @brief True if section is valid.
- */
- bool valid(KMX_DWORD length) const;
-};
-
-static_assert(sizeof(struct COMP_KMXPLUS_NAME) % 0x4 == 0, "Structs prior to variable part should align to 32-bit boundary");
-static_assert(sizeof(struct COMP_KMXPLUS_NAME) == LDML_LENGTH_NAME, "mismatched size of section name");
-
/* ------------------------------------------------------------------
* strs section
------------------------------------------------------------------ */
@@ -512,9 +490,7 @@ struct COMP_KMXPLUS_KEYS {
struct COMP_KMXPLUS_KEYS_FLICK_ELEMENT {
KMXPLUS_LIST directions;
- KMX_DWORD_unaligned flags;
- KMXPLUS_STR to; // string or codepoint
- /** get the 'to' string if a char */
+ KMXPLUS_STR to; // string
std::u16string get_to_string() const;
};
diff --git a/core/src/ldml/C7043_ldml.md b/core/src/ldml/C7043_ldml.md
index f91b30c347..8714e01f02 100644
--- a/core/src/ldml/C7043_ldml.md
+++ b/core/src/ldml/C7043_ldml.md
@@ -137,40 +137,20 @@ locale IDs (starting at offset 16) are in sorted binary order.
| 8 | 32 | author | str: Keyboard author |
|12 | 32 | conform | str: CLDR 'conformsTo' version |
|16 | 32 | layout | str: layout type |
-|20 | 32 | normalization | str: normalization mode |
+|20 | 32 | name | str: keyboard nme |
|24 | 32 | indicator | str: indicator |
-|28 | 32 | settings | int: keyboard settings |
+|28 | 32 | version | str: keyboard version |
+|32 | 32 | settings | int: keyboard settings |
The `settings` is a 32-bit bitfield as below:
| Bit position | Meaning | Description |
|--------------|------------------|------------------------------|
-| 0 | fallback | fallback=omit |
-| 1 | transformFailure | transformFailure=omit |
-| 2 | transformPartial | transformPartial=hide |
+| 0 | normalization | normalization=disabled |
### C7043.2.8 `name`—Names
-Defines the names of the keyboard as found in the source `` element.
-While this section is optional in the binary format, in practice it will always
-be present, as the source format requires at least one name.
-
-| ∆ | Bits | Name | Description |
-|---|------|---------|------------------------------------------|
-| 0 | 32 | ident | `name` |
-| 4 | 32 | size | int: Length of section |
-| 8 | 32 | count | int: Number of names |
-
-Note that `count` is always ≥1, as the source format requires at least one name.
-
-For each name in `count`:
-
-| ∆ | Bits | Name | Description |
-|---|------|---------|------------------------------------------|
-|16+| 32 | name | str: A name for the keyboard |
-
-Names are stored in source file order, and the semantic meaning of each name is
-not defined here.
+_Removed. See `meta.name`._
### C7043.2.9 Removed: `ordr`
@@ -290,23 +270,7 @@ For each reorder item:
### C7043.2.12 `vkey`—VKey Map
-| ∆ | Bits | Name | Description |
-|---|------|---------|------------------------------------------|
-| 0 | 32 | ident | `vkey` |
-| 4 | 32 | size | int: Length of section |
-| 8 | 32 | count | int: Number of vkeys |
-
-The keys are sorted in binary order based on the `vkey` field.
-
-For each key:
-
-| ∆ | Bits | Name | Description |
-|---|------|---------|------------------------------------------|
-|16+| 32 | vkey | int: source vkey ID (0…255) |
-|20+| 32 | target | int: target vkey ID (0…255) |
-
-- `vkey`: Is the standard vkey, 0-255
-- `target`: Is the target (resolved) vkey, 0-255.
+_Removed._
### C7043.2.13 `layr`—Layers list
@@ -348,6 +312,9 @@ Layer lists are sorted by `hardware` string, then minDeviceWidth ascending.
Each layer entry corresponds to one `` element
There are `layerCount` total layer entries.
+Note that comma-separated modifiers in the XML will result in duplicate `layers` entries.
+For example, `id="abc" modifiers="none, shift caps"` will result in two `layers` elements,
+both with `id="abc"`, but one with key flags of 0x0000 and one with keyflags of 0x0110.
| ∆ | Bits | Name | Description |
|---|------|------------|------------------------------------------------|
@@ -427,9 +394,9 @@ For each key:
| 8+| 32 | id | str: key id |
|12+| 32 | switch | str: layer id to switch to |
|16+| 32 | width | int: key width*10 (supports 0.1 as min width) |
-|20+| 32 | longPress | list: index into `list` section with longPress list or 0 |
-|24+| 32 | longPressDefault | str: default longpress target or 0 |
-|28+| 32 | multiTap | list: index into `list` section with multiTap list or 0 |
+|20+| 32 | longPress | list: index into `list` section with longPress key id list or 0 |
+|24+| 32 | longPressDefault | str: default longpress key id or 0 |
+|28+| 32 | multiTap | list: index into `list` section with multiTap key id list or 0 |
|32+| 32 | flicks | int: index into `key2.flicks` subtable |
- `id`: The original string id from XML. This may be 0 to save space (i.e. omit the string id).
@@ -439,10 +406,10 @@ For each key:
|--------------|-----------|---------------------------------------------|
| 0 | extend | 0: `to` is a char, 1: `to` is a string |
| 1 | gap | 1 if the key is a gap |
-| 2 | transform | 1 if the key is transform=no |
- `to`: If `extend` is 0, `to` is a UTF-32LE codepoint. If `extend` is 1, `to`
is a 32 bit index into the `strs` table. The string may be zero-length.
+- `longPress`, `longPressDefault`, and `multiTap` refer to key ids or lists of key ids in this same `key2.keys` subtable.
#### `key2.flicks` flick list subtable
@@ -466,20 +433,14 @@ For each flick element:
| ∆ | Bits | Name | Description |
|---|------|---------------- |----------------------------------------------------------|
| 0+| 32 | directions | list: index into `list` section with direction list |
-| 8+| 32 | flags | int: per-key flags |
-|12+| 32 | to | str: output string, or ucs32: output char, see flags |
+| 8+| 32 | keyId | str: id of key |
If this section is present, it must have a 'flick element' at position zero with directions=0, flags=0, and to=0 meaning 'no flick'.
There is not a 'null' flick element at the end of each list.
-Elements are ordered by the `flicks.id`, and secondarily by the directions list id.
+Elements are ordered by the `flicks.keyId`, and secondarily by the directions list id.
-- `flags`: Flags is a 32-bit bitfield defined as below:
-
-| Bit position | Meaning | Description |
-|--------------|-----------|---------------------------------------------|
-| 0 | extend | 0: `to` is a char, 1: `to` is a string |
#### `key2.kmap` key map subtable
diff --git a/core/tests/unit/ldml/keyboards/k_001_tiny.xml b/core/tests/unit/ldml/keyboards/k_001_tiny.xml
index e17284025d..aae89fd411 100644
--- a/core/tests/unit/ldml/keyboards/k_001_tiny.xml
+++ b/core/tests/unit/ldml/keyboards/k_001_tiny.xml
@@ -10,18 +10,14 @@
-->
-
-
-
-
-
+
-
-
+
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml
index 7ef6c0b379..a8c5e37233 100644
--- a/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml
+++ b/core/tests/unit/ldml/keyboards/k_002_tinyu32.xml
@@ -8,19 +8,15 @@
-->
-
-
-
-
-
+
-
-
-
+
+
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_003_transform.xml b/core/tests/unit/ldml/keyboards/k_003_transform.xml
index 814b6829d8..ba837a7115 100644
--- a/core/tests/unit/ldml/keyboards/k_003_transform.xml
+++ b/core/tests/unit/ldml/keyboards/k_003_transform.xml
@@ -9,28 +9,24 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
-->
-
-
-
-
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
@@ -45,7 +41,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml
index fa7df96878..e2c442b28a 100644
--- a/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml
+++ b/core/tests/unit/ldml/keyboards/k_004_tinyshift.xml
@@ -8,24 +8,20 @@
-->
-
-
-
-
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml
index a739728092..2af7cf2be0 100644
--- a/core/tests/unit/ldml/keyboards/k_005_modbittest.xml
+++ b/core/tests/unit/ldml/keyboards/k_005_modbittest.xml
@@ -8,37 +8,33 @@
-->
-
-
-
-
-
+
-
-
+
+
-
+
-
+
-
+
-
+
-
+
-
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_006_backspace.xml b/core/tests/unit/ldml/keyboards/k_006_backspace.xml
index 940da405e1..d9f2995695 100644
--- a/core/tests/unit/ldml/keyboards/k_006_backspace.xml
+++ b/core/tests/unit/ldml/keyboards/k_006_backspace.xml
@@ -2,28 +2,24 @@
-
-
-
-
-
+
-
-
-
-
+
+
+
+
-
-
+
+
-
+
@@ -38,7 +34,7 @@
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml b/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml
index c2addf9dc1..2be92ea39c 100644
--- a/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml
+++ b/core/tests/unit/ldml/keyboards/k_007_transform_rgx.xml
@@ -6,26 +6,21 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
-->
-
-
-
-
-
-
+
-
+
-
-
+
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml b/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml
index b66ff1a4b6..1162a7769e 100644
--- a/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml
+++ b/core/tests/unit/ldml/keyboards/k_008_transform_norm.xml
@@ -6,30 +6,26 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
-->
-
-
-
-
-
+
-
-
-
-
-
-
+
+
+
+
+
+
-
-
+
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_010_mt.xml b/core/tests/unit/ldml/keyboards/k_010_mt.xml
index 3253c1f095..2fd3e2b44f 100644
--- a/core/tests/unit/ldml/keyboards/k_010_mt.xml
+++ b/core/tests/unit/ldml/keyboards/k_010_mt.xml
@@ -17,12 +17,7 @@ Gets part of the way,
-
-
-
-
-
-
+
@@ -30,37 +25,37 @@ Gets part of the way,
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
@@ -68,7 +63,7 @@ Gets part of the way,
-
+
@@ -76,7 +71,7 @@ Gets part of the way,
-
+
@@ -84,7 +79,7 @@ Gets part of the way,
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml b/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml
index 30378708cf..59496726fa 100644
--- a/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml
+++ b/core/tests/unit/ldml/keyboards/k_011_mt_iso.xml
@@ -17,12 +17,7 @@ Exact copy of mt.xml from CLDR, but with:
-
-
-
-
-
-
+
@@ -30,34 +25,34 @@ Exact copy of mt.xml from CLDR, but with:
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
@@ -65,7 +60,7 @@ Exact copy of mt.xml from CLDR, but with:
-
+
@@ -73,7 +68,7 @@ Exact copy of mt.xml from CLDR, but with:
-
+
@@ -81,7 +76,7 @@ Exact copy of mt.xml from CLDR, but with:
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_020_fr.xml b/core/tests/unit/ldml/keyboards/k_020_fr.xml
index 42b7e1826f..a5fd85f1a3 100644
--- a/core/tests/unit/ldml/keyboards/k_020_fr.xml
+++ b/core/tests/unit/ldml/keyboards/k_020_fr.xml
@@ -9,19 +9,15 @@
keyboard formats -->
-
-
-
-
-
-
-
+
-
+
-
-
-
-
+
+
+
+
-
+
-
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
+
+
-
+
@@ -100,7 +117,8 @@
-
+
@@ -118,63 +136,66 @@
-
+
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/core/tests/unit/ldml/keyboards/k_100_keytest.xml b/core/tests/unit/ldml/keyboards/k_100_keytest.xml
index 0078ed9c26..47457bb99f 100644
--- a/core/tests/unit/ldml/keyboards/k_100_keytest.xml
+++ b/core/tests/unit/ldml/keyboards/k_100_keytest.xml
@@ -7,18 +7,14 @@
-
-
-
-
-
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_101_keytest.xml b/core/tests/unit/ldml/keyboards/k_101_keytest.xml
index 827fe9cd9d..9dc35408fa 100644
--- a/core/tests/unit/ldml/keyboards/k_101_keytest.xml
+++ b/core/tests/unit/ldml/keyboards/k_101_keytest.xml
@@ -6,14 +6,10 @@
-->
-
-
-
-
-
+
-
+
@@ -21,7 +17,7 @@
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_102_keytest.xml b/core/tests/unit/ldml/keyboards/k_102_keytest.xml
index 3f379fd76b..9441d980af 100644
--- a/core/tests/unit/ldml/keyboards/k_102_keytest.xml
+++ b/core/tests/unit/ldml/keyboards/k_102_keytest.xml
@@ -7,13 +7,9 @@
-
-
-
-
-
+
-
+
diff --git a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml
index 061b40c882..183c28278c 100644
--- a/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml
+++ b/core/tests/unit/ldml/keyboards/k_200_reorder_nod_Lana.xml
@@ -7,25 +7,22 @@
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
-
+
-
-
+
+
diff --git a/core/tests/unit/ldml/keyboards/k_210_marker.xml b/core/tests/unit/ldml/keyboards/k_210_marker.xml
index d411725f6d..750a1870bb 100644
--- a/core/tests/unit/ldml/keyboards/k_210_marker.xml
+++ b/core/tests/unit/ldml/keyboards/k_210_marker.xml
@@ -6,25 +6,22 @@
-
-
-
-
+
-
-
+
+
-
-
-
-
+
+
+
+
-
-
+
+
diff --git a/developer/src/kmc-ldml/src/compiler/compiler.ts b/developer/src/kmc-ldml/src/compiler/compiler.ts
index c29aa9fa93..f5f27c0a39 100644
--- a/developer/src/kmc-ldml/src/compiler/compiler.ts
+++ b/developer/src/kmc-ldml/src/compiler/compiler.ts
@@ -7,7 +7,6 @@ import { KeysCompiler } from './keys.js';
import { LayrCompiler } from './layr.js';
import { LocaCompiler } from './loca.js';
import { MetaCompiler } from './meta.js';
-import { NameCompiler } from './name.js';
import { VarsCompiler } from './vars.js';
import { StrsCompiler, ElemCompiler, ListCompiler, UsetCompiler } from './empty-compiler.js';
@@ -35,7 +34,6 @@ export const SECTION_COMPILERS = [
LayrCompiler,
LocaCompiler,
MetaCompiler,
- NameCompiler,
TranCompiler,
];
diff --git a/developer/src/kmc-ldml/src/compiler/disp.ts b/developer/src/kmc-ldml/src/compiler/disp.ts
index ade215b1fa..b5389103c1 100644
--- a/developer/src/kmc-ldml/src/compiler/disp.ts
+++ b/developer/src/kmc-ldml/src/compiler/disp.ts
@@ -11,8 +11,8 @@ import { MarkerTracker, MarkerUse } from "./marker-tracker.js";
export class DispCompiler extends SectionCompiler {
static validateMarkers(keyboard: LDMLKeyboard.LKKeyboard, mt : MarkerTracker): boolean {
- keyboard.displays?.display?.forEach(({ to }) =>
- mt.add(MarkerUse.match, MarkerParser.allReferences(to)));
+ keyboard.displays?.display?.forEach(({ output }) =>
+ mt.add(MarkerUse.match, MarkerParser.allReferences(output)));
// no marker references in 'id'
return true;
}
@@ -28,23 +28,23 @@ export class DispCompiler extends SectionCompiler {
const ids = new Set();
if (this.keyboard3.displays?.display) {
- for (const { to, id } of this.keyboard3.displays?.display) {
- if ((to && id) || (!to && !id)) {
- this.callbacks.reportMessage(CompilerMessages.Error_DisplayNeedsToOrId({ to, id }));
+ for (const { output, keyId } of this.keyboard3.displays?.display) {
+ if ((output && keyId) || (!output && !keyId)) {
+ this.callbacks.reportMessage(CompilerMessages.Error_DisplayNeedsToOrId({ output, keyId }));
return false;
- } else if (to) {
- if (tos.has(to)) {
- this.callbacks.reportMessage(CompilerMessages.Error_DisplayIsRepeated({ to }));
+ } else if (output) {
+ if (tos.has(output)) {
+ this.callbacks.reportMessage(CompilerMessages.Error_DisplayIsRepeated({ output }));
return false;
} else {
- tos.add(to);
+ tos.add(output);
}
- } else if (id) {
- if (ids.has(id)) {
- this.callbacks.reportMessage(CompilerMessages.Error_DisplayIsRepeated({ id }));
+ } else if (keyId) {
+ if (ids.has(keyId)) {
+ this.callbacks.reportMessage(CompilerMessages.Error_DisplayIsRepeated({ keyId }));
return false;
} else {
- ids.add(id);
+ ids.add(keyId);
}
}
}
@@ -61,12 +61,12 @@ export class DispCompiler extends SectionCompiler {
// displays
result.disps = this.keyboard3.displays?.display.map(display => ({
- to: sections.strs.allocString(display.to, {
+ to: sections.strs.allocString(display.output, {
stringVariables: true,
markers: true,
unescape: true,
}, sections),
- id: sections.strs.allocString(display.id), // not escaped, not substituted
+ id: sections.strs.allocString(display.keyId), // not escaped, not substituted
display: sections.strs.allocString(display.display, {
stringVariables: true,
unescape: true,
diff --git a/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts b/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts
index 542cbc7d8f..6869f1441e 100644
--- a/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts
+++ b/developer/src/kmc-ldml/src/compiler/keymanweb-compiler.ts
@@ -73,7 +73,7 @@ export class LdmlKeyboardKeymanWebCompiler {
// `${tab}${this.setupDebug()}${nl}` + ? we may use this for modifierBitmask in future
// `${tab}this._v=(typeof keyman!="undefined"&&typeof keyman.version=="string")?parseInt(keyman.version,10):9;${nl}` + ? we probably don't need this, it's for back-compat
`${tab}this.KI="${sName}";${nl}` +
- `${tab}this.KN=${JSON.stringify(source.keyboard3.names.name[0])};${nl}` +
+ `${tab}this.KN=${JSON.stringify(source.keyboard3.info.name)};${nl}` +
`${tab}this.KMINVER=${JSON.stringify(MINIMUM_KMW_VERSION)};${nl}` +
`${tab}this.KV=${this.compileVisualKeyboard(source)};${nl}` +
`${tab}this.KDU=${displayUnderlying ? '1' : '0'};${nl}` +
diff --git a/developer/src/kmc-ldml/src/compiler/keys.ts b/developer/src/kmc-ldml/src/compiler/keys.ts
index a09ebbf2b2..6fdf0791d0 100644
--- a/developer/src/kmc-ldml/src/compiler/keys.ts
+++ b/developer/src/kmc-ldml/src/compiler/keys.ts
@@ -7,7 +7,7 @@ import DependencySections = KMXPlus.DependencySections;
import Keys = KMXPlus.Keys;
import ListItem = KMXPlus.ListItem;
import KeysFlicks = KMXPlus.KeysFlicks;
-import { allUsedKeyIdsInLayers, calculateUniqueKeys, translateLayerAttrToModifier, validModifier } from '../util/util.js';
+import { allUsedKeyIdsInFlick, allUsedKeyIdsInKey, allUsedKeyIdsInLayers, calculateUniqueKeys, hashFlicks, hashKeys, translateLayerAttrToModifier, validModifier } from '../util/util.js';
import { MarkerTracker, MarkerUse } from './marker-tracker.js';
export class KeysCompiler extends SectionCompiler {
@@ -15,9 +15,25 @@ export class KeysCompiler extends SectionCompiler {
keyboard: LDMLKeyboard.LKKeyboard,
mt: MarkerTracker
): boolean {
- keyboard.keys?.key?.forEach(({ to }) =>
- mt.add(MarkerUse.emit, MarkerParser.allReferences(to))
- );
+ // TODO-LDML: repetition
+
+ const uniqueKeys = calculateUniqueKeys([...keyboard.keys?.key]);
+ const keyBag = hashKeys(uniqueKeys); // for easier lookup
+ // will be the set of ALL keys used in this keyboard
+ const usedKeys = allUsedKeyIdsInLayers(keyboard?.layers);
+ // save off the layer key IDs before we mutate the set
+ const layerKeyIds = Array.from(usedKeys.values());
+ const flickHash = hashFlicks(keyboard?.flicks?.flick); // for easier lookup
+ const usedFlicks = KeysCompiler.getUsedFlicks(layerKeyIds, keyBag);
+ KeysCompiler.addKeysFromFlicks(usedFlicks, flickHash, usedKeys);
+ KeysCompiler.addUsedGestureKeys(layerKeyIds, keyBag, usedKeys);
+
+ // process each key
+ for (let keyId of usedKeys.values()) {
+ const key = keyBag.get(keyId);
+ if (!key) continue;
+ mt.add(MarkerUse.emit, MarkerParser.allReferences(key.output));
+ }
return true;
}
@@ -30,7 +46,7 @@ export class KeysCompiler extends SectionCompiler {
* @returns just the non-touch layers.
*/
public hardwareLayers() {
- return this.keyboard3.layers?.filter(({ form }) => form !== "touch");
+ return this.keyboard3.layers?.filter(({ formId }) => formId !== "touch");
}
public validate() {
@@ -45,30 +61,54 @@ export class KeysCompiler extends SectionCompiler {
}
});
- // general key-level validation here, only of used keys
- const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
- const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
- for (let key of uniqueKeys) {
- const { id, flicks } = key;
- if (!usedKeys.has(id)) {
- continue; // unused key, ignore
+ const keyBag = this.getKeyBag();
+ // will be the set of ALL keys used in this keyboard
+ const usedKeys = this.getLayerKeyIds();
+ // save off the layer key IDs before we mutate the set
+ const layerKeyIds = Array.from(usedKeys.values());
+ const flickHash = this.getFlicks(); // for easier lookup
+ const usedFlicks = KeysCompiler.getUsedFlicks(layerKeyIds, keyBag);
+
+ // go through each layer key and collect flicks and gestures
+ for(const keyId of layerKeyIds) {
+ const key = keyBag.get(keyId);
+
+ if (!key) {
+ // Note: validateHardwareLayerForKmap(), below, will raise an error for hardware keys that are missing, with additional
+ // context. For this section, we just skip missing keys.
+ continue;
}
- // TODO-LDML: further key-level validation here
- if (!flicks) {
- continue; // no flicks
+
+ const { flickId } = key;
+ if (flickId) {
+ if (!flickHash.has(flickId)) {
+ valid = false;
+ this.callbacks.reportMessage(
+ CompilerMessages.Error_MissingFlicks({ flickId, id: keyId })
+ );
+ }
}
- const flickEntry = this.keyboard3.keys?.flicks?.find(
- (x) => x.id === flicks
- );
- if (!flickEntry) {
- valid = false;
- this.callbacks.reportMessage(
- CompilerMessages.Error_MissingFlicks({ flicks, id })
- );
+ const gestureKeys = allUsedKeyIdsInKey(key);
+
+ for(const [gestureKeyId, attrs] of gestureKeys.entries()) {
+ const gestureKey = keyBag.get(gestureKeyId);
+ if (gestureKey == null) {
+ // TODO-LDML: could keep track of already missing keys so we don't warn multiple times on gesture keys
+ valid = false;
+ this.callbacks.reportMessage(
+ CompilerMessages.Error_GestureKeyNotFoundInKeyBag({keyId: gestureKeyId, parentKeyId: keyId, attribute: attrs.join(',')})
+ );
+ } else {
+ usedKeys.add(gestureKeyId);
+ }
}
}
- // the layr compiler does more extensive validation of the layer attributes.
+ // now, check the flicks
+ KeysCompiler.addKeysFromFlicks(usedFlicks, flickHash, usedKeys);
+ // TODO-LDML: hint on unused flicks (that aren't imported)
+
+ // Note: the layr compiler does more extensive validation of the layer attributes.
// Kmap validation
const hardwareLayers = this.hardwareLayers();
@@ -78,7 +118,7 @@ export class KeysCompiler extends SectionCompiler {
for (let layers of hardwareLayers) {
for (let layer of layers.layer) {
valid =
- this.validateHardwareLayerForKmap(layers.form, layer) && valid; // note: always validate even if previously invalid results found
+ this.validateHardwareLayerForKmap(layers.formId, layer, keyBag) && valid; // note: always validate even if previously invalid results found
}
}
// TODO-LDML: } else { touch?
@@ -87,6 +127,30 @@ export class KeysCompiler extends SectionCompiler {
return valid;
}
+ static addKeysFromFlicks(usedFlicks: Set, flickHash: Map, usedKeys: Set) {
+ for (let flickId of usedFlicks.values()) {
+ const flick = flickHash.get(flickId);
+ if (!flick) continue;
+ const flickKeys = allUsedKeyIdsInFlick(flick);
+ flickKeys.forEach(keyId => usedKeys.add(keyId));
+ }
+ }
+
+ private getFlicks() {
+ return hashFlicks(this.keyboard3?.flicks?.flick);
+ }
+
+ /** a set with all key ids used in all layers */
+ private getLayerKeyIds() {
+ return allUsedKeyIdsInLayers(this.keyboard3?.layers);
+ }
+
+ /** the entire keybag (used or unused) as a hash */
+ private getKeyBag() : Map {
+ const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
+ return hashKeys(uniqueKeys); // for easier lookup
+ }
+
public compile(sections: DependencySections): Keys {
/* c8 ignore next 4 */
if (!this.keyboard3?.keys?.key && !this.keyboard3?.keys?.flicks) {
@@ -96,11 +160,21 @@ export class KeysCompiler extends SectionCompiler {
let sect = new Keys(sections.strs);
- // Load the flicks first
- this.loadFlicks(sections, sect);
+ // TODO-LDML: some duplication with validate()
+ const keyBag = this.getKeyBag();
+ // We only want to include used keys in .kmx
+ const usedKeys = this.getLayerKeyIds();
+ // save off the layer key IDs before we mutate the set
+ const layerKeyIds = Array.from(usedKeys.values());
- // Now, load the keys
- this.loadKeys(sections, sect);
+ // Load the flicks first
+ this.loadFlicks(sections, sect, keyBag, layerKeyIds, usedKeys);
+
+ // add in the gesture keys
+ KeysCompiler.addUsedGestureKeys(layerKeyIds, keyBag, usedKeys);
+
+ // Now, load the keys into memory
+ this.loadKeys(sections, sect, keyBag, layerKeyIds, usedKeys);
// Finally, kmap
// Use LayerMap + keys to generate compiled keys for hardware
@@ -113,95 +187,110 @@ export class KeysCompiler extends SectionCompiler {
);
} else if (hardwareLayers.length === 1) {
const theLayers = hardwareLayers[0];
- const { form } = theLayers;
+ const { formId } = theLayers;
for (let layer of theLayers.layer) {
- this.compileHardwareLayerToKmap(sections, layer, sect, form);
+ this.compileHardwareLayerToKmap(sections, layer, sect, formId);
}
} // else: TODO-LDML do nothing if only touch layers
return sect;
}
- public loadFlicks(sections: DependencySections, sect: Keys) {
- for (let lkflicks of this.keyboard3.keys.flicks) {
+ static addUsedGestureKeys(layerKeyIds: string[], keyBag: Map, usedKeys: Set) {
+ for (let keyId of layerKeyIds) {
+ const key = keyBag.get(keyId);
+ if (!key) continue;
+ for (let gestureKeyId of allUsedKeyIdsInKey(key).keys()) {
+ usedKeys.add(gestureKeyId);
+ }
+ }
+ }
+
+ /**
+ *
+ * @param keyBag the keybag as a hash
+ * @param layerKeyIds list of keys from the layer, to extract used flicks
+ * @param usedKeys will be populated with keys used in the flick
+ */
+ public loadFlicks(sections: DependencySections, sect: Keys,
+ keyBag: Map, layerKeyIds: string[], usedKeys: Set) {
+ const flickHash = this.getFlicks(); // for easier lookup
+ const usedFlicks = KeysCompiler.getUsedFlicks(layerKeyIds, keyBag);
+
+ // only include used flicks in the table
+ // this way, extra unused imported flicks are ignored
+ // in id order, for now
+ for (let flickId of Array.from(usedFlicks.values()).sort()) {
+ const flick = flickHash.get(flickId);
+ if (!flick) continue; // already reported by validate()
+
+ // allocate the in-memory
let flicks: KeysFlicks = new KeysFlicks(
- sections.strs.allocString(lkflicks.id)
+ sections.strs.allocString(flickId)
);
- for (let lkflick of lkflicks.flick) {
- let flags = 0;
- const to = sections.strs.allocString(lkflick.to, {
- stringVariables: true, markers: true, unescape: true, singleOk: true
- }, sections);
- if (!to.isOneChar) {
- flags |= constants.keys_flick_flags_extend;
- }
- let directions: ListItem = sections.list.allocListFromSpaces(
- lkflick.directions,
- {
- stringVariables: true, markers: true, unescape: true
- },
+ // add data from each segment
+ for (let { keyId, directions } of flick.flickSegment) {
+ const keyIdStr = sections.strs.allocString(keyId);
+ let directionsList: ListItem = sections.list.allocListFromSpaces(
+ directions,
+ { },
sections);
flicks.flicks.push({
- directions,
- flags,
- to,
+ directions: directionsList,
+ keyId: keyIdStr,
});
+ usedKeys.add(keyId);
}
sect.flicks.push(flicks);
}
}
- public loadKeys(sections: DependencySections, sect: Keys) {
- const usedKeys = allUsedKeyIdsInLayers(this.keyboard3?.layers);
- const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
+ static getUsedFlicks(layerKeyIds: string[], keyBag: Map) {
+ const usedFlicks = new Set();
+ for (let keyId of layerKeyIds) {
+ const key = keyBag.get(keyId);
+ if (!key?.flickId) continue;
+ usedFlicks.add(key.flickId);
+ }
+ return usedFlicks;
+ }
+
+ public loadKeys(sections: DependencySections, sect: Keys, keyBag: Map,
+ layerKeyIds: string[], usedKeys: Set) {
+
+ // for each used key (whether from layer, gesture, etc.)
+ // push these in id order, for tidiness
+ for (let keyId of Array.from(usedKeys.values()).sort()) {
+ const key = keyBag.get(keyId);
+ if (!key) continue; // missing key
- for (let key of uniqueKeys) {
- if (!usedKeys.has(key.id)) {
- // TODO-LDML: linting for unused, non-implied and non-imported keys,
- continue; // unused key, skip
- }
let flags = 0;
- const flicks = key.flicks;
- if (!!key.gap) {
+ const { flickId, gap, longPressDefaultKeyId, longPressKeyIds, multiTapKeyIds, layerId, output } = key;
+ if (!!gap) {
flags |= constants.keys_key_flags_gap;
}
- if (key.transform === "no") {
- flags |= constants.keys_key_flags_notransform;
- }
const id = sections.strs.allocString(key.id);
const longPress: ListItem = sections.list.allocListFromSpaces(
- key.longPress, {
- stringVariables: true,
- markers: true,
- unescape: true,
- },
+ longPressKeyIds, {},
sections);
- const longPressDefault = sections.strs.allocString(key.longPressDefault,
- {
- stringVariables: true,
- markers: true,
- unescape: true,
- },
+ const longPressDefault = sections.strs.allocString(longPressDefaultKeyId,
+ {},
sections);
const multiTap: ListItem = sections.list.allocListFromSpaces(
- key.multiTap,
- {
- stringVariables: true,
- markers: true,
- unescape: true,
- },
+ multiTapKeyIds,
+ {},
sections);
- const keySwitch = sections.strs.allocString(key.switch); // 'switch' is a reserved word
+ const keySwitch = sections.strs.allocString(layerId); // 'switch' is a reserved word
- const toRaw = key.to;
+ const toRaw = output;
let toCooked = sections.vars.substituteStrings(toRaw, sections);
toCooked = sections.vars.substituteMarkerString(toCooked);
- const to = sections.strs.allocString(key.to,
+ const to = sections.strs.allocString(toCooked,
{
stringVariables: true,
markers: true,
@@ -215,7 +304,7 @@ export class KeysCompiler extends SectionCompiler {
const width = Math.ceil((key.width || 1) * 10.0); // default, width=1
sect.keys.push({
flags,
- flicks,
+ flicks: flickId,
id,
longPress,
longPressDefault,
@@ -248,22 +337,23 @@ export class KeysCompiler extends SectionCompiler {
}
/**
- * TODO-LDML: from old 'keys'
* Validate for purpose of kmap
* @param hardware the 'form' parameter
* @param layer
- * @returns
+ * @param keyHash the keybag's hash
+ * @returns true if valid
*/
private validateHardwareLayerForKmap(
hardware: string,
- layer: LDMLKeyboard.LKLayer
- ) {
+ layer: LDMLKeyboard.LKLayer,
+ keyHash: Map
+ ): boolean {
let valid = true;
- const { modifier } = layer;
- if (!validModifier(modifier)) {
+ const { modifiers } = layer;
+ if (!validModifier(modifiers)) {
this.callbacks.reportMessage(
- CompilerMessages.Error_InvalidModifier({ modifier, layer: layer.id })
+ CompilerMessages.Error_InvalidModifier({ modifiers, layer: layer.id })
);
valid = false;
}
@@ -272,7 +362,7 @@ export class KeysCompiler extends SectionCompiler {
const keymap = this.getKeymapFromForm(hardware, badScans);
if (!keymap) {
this.callbacks.reportMessage(
- CompilerMessages.Error_InvalidHardware({ form: hardware })
+ CompilerMessages.Error_InvalidHardware({ formId: hardware })
);
valid = false;
return valid;
@@ -285,7 +375,6 @@ export class KeysCompiler extends SectionCompiler {
return valid;
}
- const uniqueKeys = calculateUniqueKeys([...this.keyboard3.keys?.key]);
if (layer.row.length > keymap.length) {
this.callbacks.reportMessage(
CompilerMessages.Error_HardwareLayerHasTooManyRows()
@@ -301,7 +390,7 @@ export class KeysCompiler extends SectionCompiler {
CompilerMessages.Error_RowOnHardwareLayerHasTooManyKeys({
row: y + 1,
hardware,
- modifier,
+ modifiers,
})
);
valid = false;
@@ -311,7 +400,7 @@ export class KeysCompiler extends SectionCompiler {
for (let key of keys) {
x++;
- let keydef = uniqueKeys.find((x) => x.id == key);
+ let keydef = keyHash.get(key);
if (!keydef) {
this.callbacks.reportMessage(
CompilerMessages.Error_KeyNotFoundInKeyBag({
@@ -325,7 +414,7 @@ export class KeysCompiler extends SectionCompiler {
valid = false;
continue;
}
- if (!keydef.to && !keydef.gap && !keydef.switch) {
+ if (!keydef.output && !keydef.gap && !keydef.layerId) {
this.callbacks.reportMessage(
CompilerMessages.Error_KeyMissingToGapOrSwitch({ keyId: key })
);
diff --git a/developer/src/kmc-ldml/src/compiler/layr.ts b/developer/src/kmc-ldml/src/compiler/layr.ts
index 0559c57f6d..6b1aa6d028 100644
--- a/developer/src/kmc-ldml/src/compiler/layr.ts
+++ b/developer/src/kmc-ldml/src/compiler/layr.ts
@@ -23,8 +23,8 @@ export class LayrCompiler extends SectionCompiler {
let hardwareLayers = 0;
// let touchLayers = 0;
this.keyboard3.layers?.forEach((layers) => {
- const { form } = layers;
- if (form === 'touch') {
+ const { formId } = layers;
+ if (formId === 'touch') {
// touchLayers++;
// multiple touch layers are OK
totalLayerCount += layers.layer?.length;
@@ -34,14 +34,14 @@ export class LayrCompiler extends SectionCompiler {
hardwareLayers++;
if (hardwareLayers > 1) {
valid = false;
- this.callbacks.reportMessage(CompilerMessages.Error_ExcessHardware({form}));
+ this.callbacks.reportMessage(CompilerMessages.Error_ExcessHardware({formId}));
}
}
layers.layer.forEach((layer) => {
- const { modifier, id } = layer;
+ const { modifiers, id } = layer;
totalLayerCount++;
- if (!validModifier(modifier)) {
- this.callbacks.reportMessage(CompilerMessages.Error_InvalidModifier({ modifier, layer: id }));
+ if (!validModifier(modifiers)) {
+ this.callbacks.reportMessage(CompilerMessages.Error_InvalidModifier({ modifiers, layer: id }));
valid = false;
}
});
@@ -58,7 +58,7 @@ export class LayrCompiler extends SectionCompiler {
const sect = new Layr();
sect.lists = this.keyboard3.layers.map((layers) => {
- const hardware = sections.strs.allocString(layers.form);
+ const hardware = sections.strs.allocString(layers.formId);
// Already validated in validate
const list: LayrList = {
hardware,
diff --git a/developer/src/kmc-ldml/src/compiler/messages.ts b/developer/src/kmc-ldml/src/compiler/messages.ts
index e22a9f6281..640081635c 100644
--- a/developer/src/kmc-ldml/src/compiler/messages.ts
+++ b/developer/src/kmc-ldml/src/compiler/messages.ts
@@ -7,8 +7,8 @@ const SevError = CompilerErrorSeverity.Error | CompilerErrorNamespace.LdmlKeyboa
const SevFatal = CompilerErrorSeverity.Fatal | CompilerErrorNamespace.LdmlKeyboardCompiler;
export class CompilerMessages {
- static Error_InvalidNormalization = (o:{form: string}) => m(this.ERROR_InvalidNormalization, `Invalid normalization form '${o.form}`);
- static ERROR_InvalidNormalization = SevError | 0x0001;
+ static Hint_NormalizationDisabled = () => m(this.HINT_NormalizationDisabled, `normalization=disabled is not recommended.`);
+ static HINT_NormalizationDisabled = SevHint | 0x0001;
static Error_InvalidLocale = (o:{tag: string}) => m(this.ERROR_InvalidLocale, `Invalid BCP 47 locale form '${o.tag}'`);
static ERROR_InvalidLocale = SevError | 0x0002;
@@ -16,7 +16,7 @@ export class CompilerMessages {
static Error_HardwareLayerHasTooManyRows = () => m(this.ERROR_HardwareLayerHasTooManyRows, `'hardware' layer has too many rows`);
static ERROR_HardwareLayerHasTooManyRows = SevError | 0x0003;
- static Error_RowOnHardwareLayerHasTooManyKeys = (o:{row: number, hardware: string, modifier: string}) => m(this.ERROR_RowOnHardwareLayerHasTooManyKeys, `Row #${o.row} on 'hardware' ${o.hardware} layer for modifier ${o.modifier || 'none'} has too many keys`);
+ static Error_RowOnHardwareLayerHasTooManyKeys = (o:{row: number, hardware: string, modifiers: string}) => m(this.ERROR_RowOnHardwareLayerHasTooManyKeys, `Row #${o.row} on 'hardware' ${o.hardware} layer for modifier ${o.modifiers || 'none'} has too many keys`);
static ERROR_RowOnHardwareLayerHasTooManyKeys = SevError | 0x0004;
static Error_KeyNotFoundInKeyBag = (o:{keyId: string, col: number, row: number, layer: string, form: string}) =>
@@ -43,7 +43,10 @@ export class CompilerMessages {
m(this.WARN_CustomForm, `Custom
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/error-custom-zzz-form.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/error-custom-zzz-form.xml
index 0ab10f3d03..12d3f6f77b 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/error-custom-zzz-form.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/error-custom-zzz-form.xml
@@ -2,14 +2,12 @@
-
-
-
+
-
-
-
+
+
+
@@ -18,7 +16,7 @@
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml
index 9758cf8bbd..469c8d0d8f 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-invalid-form.xml
@@ -2,16 +2,14 @@
-
-
-
+
-
-
+
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml
index 4be11f2604..5170744233 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-hardware.xml
@@ -2,16 +2,13 @@
-
-
-
-
+
-
-
+
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml
index f0ca747ae7..b3ca93e077 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer.xml
@@ -2,16 +2,14 @@
-
-
-
+
-
-
+
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml
index 062e745dd1..26b5b98bdc 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-missing-layer2.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml
index 644b8d452f..df544e4070 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/invalid-multi-hardware.xml
@@ -2,23 +2,21 @@
-
-
-
+
-
-
+
+
-
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-us-form.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-us-form.xml
index d3a0573b21..ec1a75afe7 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-us-form.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-us-form.xml
@@ -2,14 +2,12 @@
-
-
-
+
-
-
-
+
+
+
@@ -18,7 +16,7 @@
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-zzz-form.xml b/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-zzz-form.xml
index 502b254135..bf17a8a087 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-zzz-form.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/layr/warn-custom-zzz-form.xml
@@ -2,14 +2,11 @@
-
-
-
-
+
-
-
-
+
+
+
@@ -17,7 +14,7 @@
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml
index 0661d9a021..3dd5e8b1c3 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/invalid-locale.xml
@@ -2,8 +2,6 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml
index 4fe10cba2a..99e84cdaa9 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/minimal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml b/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml
index a6363c3533..4df6a1b0f4 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/loca/multiple.xml
@@ -10,9 +10,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/hint-normalization.xml
similarity index 74%
rename from developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml
rename to developer/src/kmc-ldml/test/fixtures/sections/meta/hint-normalization.xml
index f1e4914e99..3921edc441 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/name/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/hint-normalization.xml
@@ -2,9 +2,7 @@
-
-
-
-
+
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml
deleted file mode 100644
index ffb1befffe..0000000000
--- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-normalization.xml
+++ /dev/null
@@ -1,12 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml
index 9e2536ba75..f8fe4bdeec 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-1.0.xml
@@ -4,9 +4,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml
index 04ecb5a656..de81a4b701 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/invalid-version-v1.0.3.xml
@@ -4,9 +4,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml
index 06f56ebbb0..ab22d5a140 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/maximal.xml
@@ -1,16 +1,9 @@
-
-
-
-
-
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml
index e523031e53..35e60b0416 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/meta/minimal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml b/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml
deleted file mode 100644
index 8f4fd6d72f..0000000000
--- a/developer/src/kmc-ldml/test/fixtures/sections/name/multiple.xml
+++ /dev/null
@@ -1,15 +0,0 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml
index e019298c24..baae3588f9 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/minimal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml
index 6d27dc48e3..430bdb2417 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/multi-escape.xml
@@ -1,9 +1,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml b/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml
index 1053655c9d..8395ea581a 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/ordr/nod-Lana.xml
@@ -1,9 +1,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml
index ec268acfe3..70be7647e3 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-duplicate-type.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml
index 61d3ab896a..f37d9e5c57 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-empty.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml
index 15d3b5dcb0..050bd4466d 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-duplicate-type.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml
index 9fc7f7c3f5..2c921d9046 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-invalid-type.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml
index d16e55fd4e..e949828837 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/fail-mixed.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml
index a5392f596e..a8a99bb0d5 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/minimal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml b/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml
index 676d281f97..e78fef350e 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/tran/tran-vars.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml
index 12c2706730..1a93df1349 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup0.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml
index a5bef8196f..91369d2391 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/dup1.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml
index be94255504..018770ff0d 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-0.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml
index 45b7670a80..1ba9dbec8f 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-1.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml
index 656faf0cd0..c6bd3159c6 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-2.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml
index 628148a821..956b8b4e2e 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-3.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml
index c05a8ec653..2233d4a32a 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-4.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml
index 82721d834b..63c009c68c 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-5.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml
index dbe9deb07c..e06fef4353 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-badref-6.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml
index cdfaf3f324..780c00e776 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-markers-badref-0.xml
@@ -6,15 +6,13 @@ This will fail because the two markers given don't exist anywhere.
-->
-
-
-
+
-
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml
index 110af57940..c0cd2008db 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props1.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml
index 5c03b0d682..43c6cca213 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-props2.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml
index 5d691f3d4b..1a4254898a 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-strings.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml
index 9ed1b08c9a..50694739a4 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/fail-uset-syntax.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml
index 345e70d8f4..7c183bdc22 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/markers-maximal.xml
@@ -10,16 +10,14 @@
-->
-
-
-
+
-
+
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml
index 89d32d89db..5f464ae7a2 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/maximal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml b/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml
index 6e6a3ab02e..a9ebc962ff 100644
--- a/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml
+++ b/developer/src/kmc-ldml/test/fixtures/sections/vars/minimal.xml
@@ -2,9 +2,7 @@
-
-
-
+
diff --git a/developer/src/kmc-ldml/test/test-disp.ts b/developer/src/kmc-ldml/test/test-disp.ts
index 74c14c8c1c..4faa866c4d 100644
--- a/developer/src/kmc-ldml/test/test-disp.ts
+++ b/developer/src/kmc-ldml/test/test-disp.ts
@@ -19,7 +19,7 @@ describe('disp', function () {
});
it('should compile typical disp', async function() {
let disp = await loadSectionFixture(DispCompiler, 'sections/disp/typical.xml', compilerTestCallbacks) as Disp;
- assert.equal(compilerTestCallbacks.messages.length, 0);
+ assert.sameDeepMembers(compilerTestCallbacks.messages, []);
assert.ok(disp?.disps);
assert.equal(disp.disps.length, 1);
@@ -61,13 +61,13 @@ describe('disp', function () {
let disp = await loadSectionFixture(DispCompiler, 'sections/disp/invalid-dupto.xml', compilerTestCallbacks) as Disp;
assert.isNull(disp);
assert.equal(compilerTestCallbacks.messages.length, 1);
- assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayIsRepeated({to:'e'}));
+ assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayIsRepeated({ output: 'e' }));
});
it('should reject duplicate ids', async function() {
- let disp = await loadSectionFixture(DispCompiler, 'sections/disp/invalid-dupid.xml', compilerTestCallbacks) as Disp;
+ let disp = await loadSectionFixture(DispCompiler, 'sections/disp/invalid-dupid.xml', compilerTestCallbacks) as Disp;1
assert.isNull(disp);
assert.equal(compilerTestCallbacks.messages.length, 1);
- assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayIsRepeated({id:'e'}));
+ assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayIsRepeated({ keyId: 'e' }));
});
it('should reject if neither to nor id', async function() {
let disp = await loadSectionFixture(DispCompiler, 'sections/disp/invalid-none.xml', compilerTestCallbacks) as Disp;
@@ -79,7 +79,7 @@ describe('disp', function () {
let disp = await loadSectionFixture(DispCompiler, 'sections/disp/invalid-both.xml', compilerTestCallbacks) as Disp;
assert.isNull(disp);
assert.equal(compilerTestCallbacks.messages.length, 1);
- assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayNeedsToOrId({ to: 'e', id: 'e' }));
+ assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_DisplayNeedsToOrId({ output: 'e', keyId: 'e' }));
});
});
diff --git a/developer/src/kmc-ldml/test/test-keymanweb-compiler.ts b/developer/src/kmc-ldml/test/test-keymanweb-compiler.ts
index a03ba5875b..ab8c4b2fc2 100644
--- a/developer/src/kmc-ldml/test/test-keymanweb-compiler.ts
+++ b/developer/src/kmc-ldml/test/test-keymanweb-compiler.ts
@@ -40,10 +40,10 @@ describe('LdmlKeyboardKeymanWebCompiler', function() {
const outputNoDebug = jsCompilerNoDebug.compile('basic.xml', source);
assert.isNotNull(outputNoDebug);
- // Does the emitted js match?
- const outputFixtureNoDebug = fs.readFileSync(outputFilenameNoDebug, 'utf-8').replaceAll(/\r\n/g, '\n');
+ // Does the emitted js match? The nodebug has no newline at end, but allow one in the fixture
+ const outputFixtureNoDebug = fs.readFileSync(outputFilenameNoDebug, 'utf-8').replaceAll(/\r\n/g, '\n').trim();
assert.strictEqual(outputNoDebug, outputFixtureNoDebug);
// TODO(lowpri): consider using Typescript parser to generate AST for further validation
});
-});
\ No newline at end of file
+});
diff --git a/developer/src/kmc-ldml/test/test-keys.ts b/developer/src/kmc-ldml/test/test-keys.ts
index 5a085a0d0f..d10298ae34 100644
--- a/developer/src/kmc-ldml/test/test-keys.ts
+++ b/developer/src/kmc-ldml/test/test-keys.ts
@@ -20,14 +20,15 @@ describe('keys', function () {
assert.equal(compilerTestCallbacks.messages.length, 0);
assert.equal(keys.keys.length, 2);
assert.equal(keys.flicks.length, 1); // there's always a 'null' flick
- assert.equal(keys.keys[0].to.value, 'oops');
- assert.isFalse(keys.keys[0].to.isOneChar);
- assert.equal(keys.keys[0].flags, constants.keys_key_flags_extend);
- assert.equal(keys.keys[0].id.value, 'mistake');
- assert.isTrue(keys.keys[1].to.isOneChar);
- assert.equal(keys.keys[1].to.value, String.fromCodePoint(0x1FAA6));
- assert.equal(keys.keys[1].flags, 0);
- assert.equal(keys.keys[1].id.value, 'grave');
+ // ids are in sorted order in memory`
+ assert.isTrue(keys.keys[0].to.isOneChar);
+ assert.equal(keys.keys[0].to.value, String.fromCodePoint(0x1FAA6));
+ assert.equal(keys.keys[0].flags, 0);
+ assert.equal(keys.keys[0].id.value, 'grave');
+ assert.equal(keys.keys[1].to.value, 'oops');
+ assert.isFalse(keys.keys[1].to.isOneChar);
+ assert.equal(keys.keys[1].flags, constants.keys_key_flags_extend);
+ assert.equal(keys.keys[1].id.value, 'mistake');
},
},
{
@@ -36,7 +37,7 @@ describe('keys', function () {
const keys = sect;
assert.ok(keys);
assert.equal(compilerTestCallbacks.messages.length, 0);
- assert.equal(keys.keys.length, 4);
+ assert.equal(keys.keys.length, 12); // includes flick and gesture keys
const [w] = keys.keys.filter(({ id }) => id.value === 'w');
assert.ok(w);
@@ -47,9 +48,9 @@ describe('keys', function () {
assert.isFalse(!!(q.flags & constants.keys_key_flags_gap));
assert.equal(q.width, 32, 'q\'s width'); // ceil(3.14159 * 10.0)
assert.equal(q.flicks, 'flick0'); // note this is a string, not a StrsItem
- assert.equal(q.longPress.toString(), 'á é í');
- assert.equal(q.longPressDefault.value, 'é');
- assert.equal(q.multiTap.toString(), 'ä ë ï');
+ assert.equal(q.longPress.toString(), 'a-acute e-acute i-acute');
+ assert.equal(q.longPressDefault.value, 'e-acute');
+ assert.equal(q.multiTap.toString(), 'a-umlaut e-umlaut i-umlaut');
const [flick0] = keys.flicks.filter(({ id }) => id.value === 'flick0');
assert.ok(flick0);
@@ -57,11 +58,11 @@ describe('keys', function () {
const [flick0_nw_se] = flick0.flicks.filter(({ directions }) => directions && directions.isEqual('nw se'.split(' ')));
assert.ok(flick0_nw_se);
- assert.equal(flick0_nw_se.to?.value, 'ç');
+ assert.equal(flick0_nw_se.keyId?.value, 'c-cedilla');
const [flick0_ne_sw] = flick0.flicks.filter(({ directions }) => directions && directions.isEqual('ne sw'.split(' ')));
assert.ok(flick0_ne_sw);
- assert.equal(flick0_ne_sw.to?.value, 'ê'); // via variable
+ assert.equal(flick0_ne_sw.keyId?.value, 'e-caret'); // via variable
},
},
{
@@ -70,16 +71,16 @@ describe('keys', function () {
const keys = sect;
assert.ok(keys);
assert.equal(compilerTestCallbacks.messages.length, 0);
- assert.equal(keys.keys.length, 4);
+ assert.equal(keys.keys.length, 12); // flick and gesture keys
const [q] = keys.keys.filter(({ id }) => id.value === 'q');
assert.ok(q);
assert.isFalse(!!(q.flags & constants.keys_key_flags_gap));
assert.equal(q.width, 32); // ceil(3.1 * 10)
assert.equal(q.flicks, 'flick0'); // note this is a string, not a StrsItem
- assert.equal(q.longPress.toString(), 'á é í');
- assert.equal(q.longPressDefault.value, 'é');
- assert.equal(q.multiTap.toString(), 'ä ë ï');
+ assert.equal(q.longPress.toString(), 'a-acute e-acute i-acute');
+ assert.equal(q.longPressDefault.value, 'e-acute');
+ assert.equal(q.multiTap.toString(), 'a-umlaut e-umlaut i-umlaut');
const [flick0] = keys.flicks.filter(({ id }) => id.value === 'flick0');
assert.ok(flick0);
@@ -87,11 +88,11 @@ describe('keys', function () {
const [flick0_nw_se] = flick0.flicks.filter(({ directions }) => directions && directions.isEqual('nw se'.split(' ')));
assert.ok(flick0_nw_se);
- assert.equal(flick0_nw_se.to?.value, 'ç');
+ assert.equal(flick0_nw_se.keyId?.value, 'c');
const [flick0_ne_sw] = flick0.flicks.filter(({ directions }) => directions && directions.isEqual('ne sw'.split(' ')));
assert.ok(flick0_ne_sw);
- assert.equal(flick0_ne_sw.to?.value, 'ế');
+ assert.equal(flick0_ne_sw.keyId?.value, 'eee');
},
},
{
@@ -126,18 +127,18 @@ describe('keys', function () {
const keys = sect;
assert.ok(keys);
assert.equal(compilerTestCallbacks.messages.length, 0);
- assert.equal(keys.keys.length, 1);
+ assert.equal(keys.keys.length, 5);
- const [ww] = keys.keys.filter(({ id }) => id.value === 'ww');
+ const ww = keys.keys.find(({ id }) => id.value === 'ww');
assert.ok(ww);
- const MARKER_1 = MarkerParser.markerOutput(1);
- assert.equal(ww.to.value, MARKER_1);
- assert.equal(ww.longPressDefault.value, MARKER_1);
- assert.equal(ww.longPress[0].value.value, MARKER_1);
- assert.equal(ww.multiTap[0].value.value, MARKER_1);
+ const MARKER_5 = MarkerParser.markerOutput(5);
+ assert.equal(ww.to.value, MARKER_5);
+ assert.equal(ww.longPressDefault.value, 'bb');
+ assert.equal(ww.longPress[0].value.value, 'aa');
+ assert.equal(ww.multiTap[0].value.value, 'cc');
const [flickw] = keys.flicks?.filter(({id}) => id.value === 'flickw');
assert.ok(flickw);
- assert.equal(flickw.flicks[0].to.value, MARKER_1);
+ assert.equal(flickw.flicks[0].keyId.value, 'dd');
},
},
]);
@@ -236,19 +237,19 @@ describe('keys.kmap', function () {
{
subpath: 'sections/keys/invalid-bad-modifier.xml',
errors: [
- CompilerMessages.Error_InvalidModifier({layer:'base',modifier:'altR-shift'}),
+ CompilerMessages.Error_InvalidModifier({layer:'base',modifiers:'altR-shift'}),
]
},
{
subpath: 'sections/keys/invalid-missing-flick.xml',
errors: [
- CompilerMessages.Error_MissingFlicks({flicks:'an-undefined-flick-id',id:'Q'}),
+ CompilerMessages.Error_MissingFlicks({flickId:'an-undefined-flick-id',id:'Q'}),
]
},
{
subpath: 'sections/layr/invalid-invalid-form.xml',
errors: [CompilerMessages.Error_InvalidHardware({
- form: 'holographic',
+ formId: 'holographic',
}),],
},
{
@@ -344,7 +345,7 @@ describe('keys.kmap', function () {
assert.isNull(keys);
assert.equal(compilerTestCallbacks.messages.length, 1);
- assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_RowOnHardwareLayerHasTooManyKeys({row: 1, hardware: 'us', modifier: 'none'}));
+ assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_RowOnHardwareLayerHasTooManyKeys({row: 1, hardware: 'us', modifiers: 'none'}));
});
it('should reject layouts with undefined keys', async function() {
diff --git a/developer/src/kmc-ldml/test/test-layr.ts b/developer/src/kmc-ldml/test/test-layr.ts
index 126935c33b..62b03b1eea 100644
--- a/developer/src/kmc-ldml/test/test-layr.ts
+++ b/developer/src/kmc-ldml/test/test-layr.ts
@@ -97,13 +97,13 @@ describe('layr', function () {
errors: [
CompilerMessages.Error_InvalidModifier({
layer: 'base',
- modifier: 'altR-shift'
+ modifiers: 'altR-shift'
}),
],
},
{
subpath: 'sections/layr/invalid-multi-hardware.xml',
- errors: [CompilerMessages.Error_ExcessHardware({ form: 'iso' })],
+ errors: [CompilerMessages.Error_ExcessHardware({ formId: 'iso' })],
},
{
// missing layer element
diff --git a/developer/src/kmc-ldml/test/test-meta.ts b/developer/src/kmc-ldml/test/test-meta.ts
index a5f5939a67..428d96f4b7 100644
--- a/developer/src/kmc-ldml/test/test-meta.ts
+++ b/developer/src/kmc-ldml/test/test-meta.ts
@@ -18,9 +18,9 @@ describe('meta', function () {
assert.isEmpty(meta.author.value); // TODO-LDML: default author string "unknown"?
assert.equal(meta.conform.value, 'techpreview');
assert.isEmpty(meta.layout.value); // TODO-LDML: assumed layout?
- assert.isEmpty(meta.normalization.value); // TODO-LDML: assumed normalization?
assert.isEmpty(meta.indicator.value); // TODO-LDML: synthesize an indicator?
assert.equal(meta.settings, KeyboardSettings.none);
+ assert.equal(meta.name?.value, "meta-minimal");
});
it('should compile maximal metadata', async function() {
@@ -30,17 +30,16 @@ describe('meta', function () {
assert.equal(meta.author.value, 'The Keyman Team');
assert.equal(meta.conform.value, 'techpreview');
assert.equal(meta.layout.value, 'QWIRKY');
- assert.equal(meta.normalization.value, 'NFC');
assert.equal(meta.indicator.value, 'QW');
assert.equal(meta.version.value, "1.2.3");
- assert.equal(meta.settings, KeyboardSettings.fallback);
+ assert.equal(meta.settings, KeyboardSettings.none);
});
- it('should reject invalid normalization', async function() {
- let meta = await loadSectionFixture(MetaCompiler, 'sections/meta/invalid-normalization.xml', compilerTestCallbacks) as Meta;
- assert.isNull(meta);
+ it('should hint when normalization=disabled', async function() {
+ let meta = await loadSectionFixture(MetaCompiler, 'sections/meta/hint-normalization.xml', compilerTestCallbacks) as Meta;
+ assert.isNotNull(meta);
assert.equal(compilerTestCallbacks.messages.length, 1);
- assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Error_InvalidNormalization({form:'NFQ'}));
+ assert.deepEqual(compilerTestCallbacks.messages[0], CompilerMessages.Hint_NormalizationDisabled());
});
it('should reject invalid version', async function() {
diff --git a/developer/src/kmc-ldml/test/test-name.ts b/developer/src/kmc-ldml/test/test-name.ts
deleted file mode 100644
index 47bf1a2936..0000000000
--- a/developer/src/kmc-ldml/test/test-name.ts
+++ /dev/null
@@ -1,34 +0,0 @@
-import 'mocha';
-import { assert } from 'chai';
-import { NameCompiler } from '../src/compiler/name.js';
-import { compilerTestCallbacks, loadSectionFixture } from './helpers/index.js';
-import { KMXPlus } from '@keymanapp/common-types';
-
-import Name = KMXPlus.Name;
-
-describe('name', function () {
- this.slow(500); // 0.5 sec -- json schema validation takes a while
-
- it('should compile minimal name data', async function() {
- let name = await loadSectionFixture(NameCompiler, 'sections/name/minimal.xml', compilerTestCallbacks) as Name;
- assert.equal(compilerTestCallbacks.messages.length, 0);
-
- assert.equal(name.names.length, 1);
- assert.equal(name.names[0].value, 'My First Keyboard');
- });
-
- it('should compile multiple names', async function() {
- let name = await loadSectionFixture(NameCompiler, 'sections/name/multiple.xml', compilerTestCallbacks) as Name;
- assert.equal(compilerTestCallbacks.messages.length, 0);
-
- assert.equal(name.names.length, 5);
- assert.equal(name.names[0].value, 'My Second Keyboard');
- assert.equal(name.names[1].value, 'My 2nd Keyboard');
- assert.equal(name.names[2].value, 'win:kbd2');
- assert.equal(name.names[3].value, 'mac:keybd_2');
- assert.equal(name.names[4].value, 'web:keyboard-2');
- });
-
- //TODO-LDML: should we be linting on repeated names?
-});
-
diff --git a/developer/src/kmc-ldml/test/test-utils.ts b/developer/src/kmc-ldml/test/test-utils.ts
index b4ef73cff6..015af09e1d 100644
--- a/developer/src/kmc-ldml/test/test-utils.ts
+++ b/developer/src/kmc-ldml/test/test-utils.ts
@@ -1,6 +1,9 @@
import 'mocha';
import {assert} from 'chai';
-import { isValidEnumValue, calculateUniqueKeys, allUsedKeyIdsInLayers, translateLayerAttrToModifier, validModifier, verifyValidAndUnique } from '../src/util/util.js';
+import {
+ allUsedKeyIdsInFlick, allUsedKeyIdsInKey,
+ isValidEnumValue, calculateUniqueKeys, allUsedKeyIdsInLayers,
+ translateLayerAttrToModifier, validModifier, verifyValidAndUnique } from '../src/util/util.js';
import { constants } from "@keymanapp/ldml-keyboard-constants";
import { LDMLKeyboard } from '@keymanapp/common-types';
@@ -50,13 +53,13 @@ describe('test of util/util.ts', () => {
});
it('should handle some real cases', () => {
assert.sameDeepMembers(calculateUniqueKeys([
- { id: 'a', to: 'a' },
- { id: 'a', to: 'a' }, // dup
- { id: 'b', to: 'b' },
- { id: 'a', to: 'å' }, // override
+ { id: 'a', output: 'a' },
+ { id: 'a', output: 'a' }, // dup
+ { id: 'b', output: 'b' },
+ { id: 'a', output: 'å' }, // override
]),[
- { id: 'b', to: 'b' },
- { id: 'a', to: 'å' },
+ { id: 'b', output: 'b' },
+ { id: 'a', output: 'å' },
]);
});
});
@@ -98,6 +101,77 @@ describe('test of util/util.ts', () => {
'q w e r t y Q W E R T Y a s d f A S D F 0 1 2 3'.split(' '));
});
});
+ describe('allUsedKeyIdsInFlick', () => {
+ it('should handle a null case', () => {
+ assert.sameDeepMembers(Array.from(allUsedKeyIdsInFlick(
+ undefined
+ )),
+ []);
+ });
+ it('should handle a simple case', () => {
+ assert.sameDeepMembers(Array.from(allUsedKeyIdsInFlick(
+ {
+ id: 'something',
+ flickSegment: [
+ { keyId: 'aaa', directions: 'nnw se w up' },
+ ]
+ }
+ )),
+ 'aaa'.split(' '));
+ });
+ it('should handle a redundant case', () => {
+ assert.sameDeepMembers(Array.from(allUsedKeyIdsInFlick(
+ {
+ id: 'something',
+ flickSegment: [
+ { keyId: 'aaa', directions: 'nnw se w up' },
+ { keyId: 'bbb', directions: 'e ne e' },
+ { keyId: 'ccc', directions: 'turn left here, go about half a mile past where old man henry’s place used to be, hang a right, can’t miss it' },
+ { keyId: 'aaa', directions: 'w e n s' },
+ ]
+ }
+ )),
+ ['aaa','bbb','ccc']); // aaa is in there twice
+ });
+ });
+ describe('allUsedKeyIdsInKey', () => {
+ it('should handle a simple case', () => {
+ assert.sameDeepMembers(Array.from(allUsedKeyIdsInKey(
+ {}
+ ).keys()),
+ []);
+ });
+ it('should handle a straightforward case', () => {
+ assert.sameDeepMembers(Array.from(allUsedKeyIdsInKey(
+ {
+ flickId: 'ignore me',
+ multiTapKeyIds: 'tap1 tap2 tap3',
+ longPressDefaultKeyId: 'longPress0',
+ longPressKeyIds: 'longPress1 longPress2 longPress0'
+ }
+ ).keys()),
+ ['tap1','tap2','tap3','longPress0', 'longPress1','longPress2']);
+ });
+ it('should handle a duplicate case', () => {
+ const auk = allUsedKeyIdsInKey(
+ {
+ flickId: 'ignore me',
+ multiTapKeyIds: 'a b c',
+ longPressDefaultKeyId: 'd',
+ longPressKeyIds: 'c d e'
+ }
+ );
+ assert.sameDeepMembers(Array.from(auk.keys()),
+ ['a','b','c','d','e']);
+ assert.sameDeepMembers(Array.from(auk.entries()), [
+ ['a',['multiTapKeyIds']],
+ ['b',['multiTapKeyIds']],
+ ['c',['longPressKeyIds','multiTapKeyIds']],
+ ['d',['longPressDefaultKeyId','longPressKeyIds']],
+ ['e',['longPressKeyIds']],
+ ]);
+ });
+ });
describe('translateLayerAttrToModifier', () => {
it('should map from layer info to modifier number', () => {
assert.equal(translateLayerAttrToModifier({
@@ -105,30 +179,30 @@ describe('test of util/util.ts', () => {
}), constants.keys_mod_none);
assert.equal(translateLayerAttrToModifier({
id: 'base',
- modifier: '',
+ modifiers: '',
}), constants.keys_mod_none);
assert.equal(translateLayerAttrToModifier({
id: 'base',
- modifier: 'none',
+ modifiers: 'none',
}), constants.keys_mod_none);
assert.equal(translateLayerAttrToModifier({
id: 'shift',
- modifier: 'shift',
+ modifiers: 'shift',
}), constants.keys_mod_shift);
assert.equal(translateLayerAttrToModifier({
id: 'shift',
- modifier: 'shift',
+ modifiers: 'shift',
}), constants.keys_mod_shift);
assert.equal(translateLayerAttrToModifier({
id: 'altshift',
- modifier: 'alt shift',
+ modifiers: 'alt shift',
}), constants.keys_mod_alt | constants.keys_mod_shift);
});
it('should round trip each possible modifier', () => {
for(let str of constants.keys_mod_map.keys()) {
const layer : LDMLKeyboard.LKLayer = {
id: str,
- modifier: `${str}`,
+ modifiers: `${str}`,
};
assert.equal(translateLayerAttrToModifier(layer),
constants.keys_mod_map.get(str), str);
@@ -138,7 +212,7 @@ describe('test of util/util.ts', () => {
for(let str of constants.keys_mod_map.keys()) {
const layer : LDMLKeyboard.LKLayer = {
id: str,
- modifier: `${str} altL`,
+ modifiers: `${str} altL`,
};
assert.equal(translateLayerAttrToModifier(layer),
constants.keys_mod_map.get(str) | constants.keys_mod_altL, str);
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml
index 190700d496..c969ecf543 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/fr-t-k0-azerty.xml
@@ -16,24 +16,23 @@
keyboard formats -->
-
-
-
-
-
-
+
-
+
+
+
+
+
@@ -42,10 +41,10 @@
-
-
-
-
+
+
+
+
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
-
-
+
+
+
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
-
+
@@ -102,7 +119,7 @@
-
+
@@ -111,7 +128,7 @@
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml
index 8b5b845bf2..b5364c5f92 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/ja-Latn.xml
@@ -5,25 +5,22 @@
-
-
-
-
+
-
-
+
+
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml
index 02db33accc..62f90b47bc 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt-t-k0-47key.xml
@@ -5,12 +5,8 @@
-
-
-
-
-
-
+
+
@@ -18,37 +14,37 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
@@ -56,7 +52,7 @@
-
+
@@ -64,7 +60,7 @@
-
+
@@ -72,7 +68,7 @@
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml
index a5a415d874..5dcc9ea5c3 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/mt.xml
@@ -11,12 +11,8 @@
-
-
-
-
-
-
+
+
@@ -24,34 +20,34 @@
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
-
+
-
-
+
+
@@ -59,7 +55,7 @@
-
+
@@ -67,7 +63,7 @@
-
+
@@ -75,7 +71,7 @@
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml
index 5ef43e5d68..89994773f6 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/pcm.xml
@@ -2,30 +2,26 @@
-
-
-
-
-
+
-
-
-
+
+
+
-
-
-
-
+
+
+
+
-
+
-
-
+
+
@@ -33,7 +29,7 @@
-
+
@@ -41,7 +37,7 @@
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml b/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml
index 6de82a8f9d..010f515073 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/3.0/pt-t-k0-abnt2.xml
@@ -5,16 +5,13 @@
-
-
-
-
+
-
-
-
-
-
+
+
+
+
+
@@ -22,37 +19,37 @@
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
-
-
-
-
+
+
+
+
+
-
-
+
+
-
+
-
+
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json
index e9907a447a..3eff296a31 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json
+++ b/resources/standards-data/ldml-keyboards/techpreview/cldr_info.json
@@ -1,5 +1,5 @@
{
- "sha": "2aa2275158c29e8e41c7f0b67c8fb786a453b89c",
- "description": "release-44-alpha3-14-g2aa2275158",
- "date": "Mon, 09 Oct 2023 19:18:13 +0000"
+ "sha": "022ff3ce172735f4a251003b1f429528deab44b3",
+ "description": "release-44-beta3-18-g022ff3ce17",
+ "date": "Tue, 24 Oct 2023 13:00:38 +0000"
}
diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd
index 92cda0eddf..ef577e98bf 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd
+++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd
@@ -10,7 +10,7 @@ The CLDR Keyboard Subcommittee is currently developing major changes to the CLDR
Please view the subcommittee page for the most recent information.
-->
-
+
@@ -45,11 +45,11 @@ Please view the subcommittee page for the most recent information.
-
+
-
-
+
+
@@ -58,23 +58,10 @@ Please view the subcommittee page for the most recent information.
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
@@ -82,9 +69,9 @@ Please view the subcommittee page for the most recent information.
-
+
-
+
@@ -99,56 +86,56 @@ Please view the subcommittee page for the most recent information.
-
+
+
+
+
-
+
-
+
-
+
-
-
+
-
-
+
+
-
-
+
-
-
-
+
+
+
-
+
-
+
-
+
-
+
-
@@ -166,7 +153,7 @@ Please view the subcommittee page for the most recent information.
-
+
@@ -175,7 +162,7 @@ Please view the subcommittee page for the most recent information.
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd
index 47f299571b..96a6f821e9 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd
+++ b/resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.xsd
@@ -22,11 +22,11 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
+
+
@@ -97,8 +97,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
+
-
@@ -112,33 +112,12 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
-
+
@@ -160,8 +139,8 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
+
+
@@ -181,14 +160,13 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
+
+
-
-
-
-
+
@@ -197,7 +175,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
+
@@ -205,10 +183,10 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
-
-
+
+
+
+
@@ -216,14 +194,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
-
-
-
-
-
-
+
@@ -244,14 +215,20 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
-
-
-
+
+
+
+
+
+
+
+
+
+
@@ -259,17 +236,16 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
+
-
+
-
@@ -306,7 +282,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
+
@@ -320,7 +296,7 @@ Note: DTD @-annotations are not currently converted to .xsd. For full CLDR file
-
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml
index eed84d38f8..537860aeb9 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Latn-implied.xml
@@ -13,68 +13,68 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-
+
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml
index 778cad451a..dd88113501 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-currency.xml
@@ -13,10 +13,10 @@ CLDR data files are interpreted according to the LDML specification (http://unic
-->
-
-
-
-
-
-
+
+
+
+
+
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml
index 1e540cf024..59c6280826 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml
+++ b/resources/standards-data/ldml-keyboards/techpreview/import/keys-Zyyy-punctuation.xml
@@ -8,39 +8,39 @@
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
-
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
+
diff --git a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json
index 6d6ba9d2a9..95eb1b244b 100644
--- a/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json
+++ b/resources/standards-data/ldml-keyboards/techpreview/ldml-keyboard3.schema.json
@@ -11,10 +11,10 @@
"display": {
"type": "string"
},
- "id": {
+ "keyId": {
"type": "string"
},
- "to": {
+ "output": {
"type": "string"
}
},
@@ -62,25 +62,9 @@
"flick": {
"additionalProperties": false,
"properties": {
- "directions": {
- "type": "string"
- },
- "to": {
- "type": "string"
- }
- },
- "required": [
- "directions",
- "to"
- ],
- "type": "object"
- },
- "flicks": {
- "additionalProperties": false,
- "properties": {
- "flick": {
+ "flickSegment": {
"items": {
- "$ref": "#/definitions/flick"
+ "$ref": "#/definitions/flickSegment"
},
"minItems": 1,
"type": "array"
@@ -96,11 +80,51 @@
}
},
"required": [
- "flick",
+ "flickSegment",
"id"
],
"type": "object"
},
+ "flickSegment": {
+ "additionalProperties": false,
+ "properties": {
+ "directions": {
+ "type": "string"
+ },
+ "keyId": {
+ "type": "string"
+ }
+ },
+ "required": [
+ "directions",
+ "keyId"
+ ],
+ "type": "object"
+ },
+ "flicks": {
+ "additionalProperties": false,
+ "properties": {
+ "flick": {
+ "items": {
+ "$ref": "#/definitions/flick"
+ },
+ "type": "array"
+ },
+ "import": {
+ "items": {
+ "$ref": "#/definitions/import"
+ },
+ "type": "array"
+ },
+ "special": {
+ "items": {
+ "$ref": "#/definitions/special"
+ },
+ "type": "array"
+ }
+ },
+ "type": "object"
+ },
"form": {
"additionalProperties": false,
"properties": {
@@ -180,16 +204,19 @@
"layout": {
"type": "string"
},
- "normalization": {
+ "name": {
"type": "string"
}
},
+ "required": [
+ "name"
+ ],
"type": "object"
},
"key": {
"additionalProperties": false,
"properties": {
- "flicks": {
+ "flickId": {
"type": "string"
},
"gap": {
@@ -201,13 +228,19 @@
"id": {
"type": "string"
},
- "longPress": {
+ "layerId": {
"type": "string"
},
- "longPressDefault": {
+ "longPressDefaultKeyId": {
"type": "string"
},
- "multiTap": {
+ "longPressKeyIds": {
+ "type": "string"
+ },
+ "multiTapKeyIds": {
+ "type": "string"
+ },
+ "output": {
"type": "string"
},
"stretch": {
@@ -216,18 +249,6 @@
],
"type": "string"
},
- "switch": {
- "type": "string"
- },
- "to": {
- "type": "string"
- },
- "transform": {
- "enum": [
- "no"
- ],
- "type": "string"
- },
"width": {
"type": "string"
}
@@ -240,12 +261,6 @@
"keys": {
"additionalProperties": false,
"properties": {
- "flicks": {
- "items": {
- "$ref": "#/definitions/flicks"
- },
- "type": "array"
- },
"import": {
"items": {
"$ref": "#/definitions/import"
@@ -273,7 +288,7 @@
"id": {
"type": "string"
},
- "modifier": {
+ "modifiers": {
"type": "string"
},
"row": {
@@ -298,7 +313,7 @@
"layers": {
"additionalProperties": false,
"properties": {
- "form": {
+ "formId": {
"type": "string"
},
"import": {
@@ -324,7 +339,7 @@
}
},
"required": [
- "form"
+ "formId"
],
"type": "object"
},
@@ -352,46 +367,6 @@
},
"type": "object"
},
- "name": {
- "additionalProperties": false,
- "properties": {
- "value": {
- "type": "string"
- }
- },
- "required": [
- "value"
- ],
- "type": "object"
- },
- "names": {
- "additionalProperties": false,
- "properties": {
- "import": {
- "items": {
- "$ref": "#/definitions/import"
- },
- "type": "array"
- },
- "name": {
- "items": {
- "$ref": "#/definitions/name"
- },
- "minItems": 1,
- "type": "array"
- },
- "special": {
- "items": {
- "$ref": "#/definitions/special"
- },
- "type": "array"
- }
- },
- "required": [
- "name"
- ],
- "type": "object"
- },
"reorder": {
"additionalProperties": false,
"properties": {
@@ -462,9 +437,9 @@
"settings": {
"additionalProperties": false,
"properties": {
- "fallback": {
+ "normalization": {
"enum": [
- "omit"
+ "disabled"
],
"type": "string"
}
@@ -650,6 +625,9 @@
"displays": {
"$ref": "#/definitions/displays"
},
+ "flicks": {
+ "$ref": "#/definitions/flicks"
+ },
"forms": {
"$ref": "#/definitions/forms"
},
@@ -677,9 +655,6 @@
"locales": {
"$ref": "#/definitions/locales"
},
- "names": {
- "$ref": "#/definitions/names"
- },
"settings": {
"$ref": "#/definitions/settings"
},
@@ -703,7 +678,7 @@
}
},
"required": [
- "names",
+ "info",
"locale",
"conformsTo"
],