mirror of
https://github.com/keymanapp/keyman.git
synced 2026-08-09 18:35:32 +00:00
Merge pull request #9842 from keymanapp/chore/developer/9838-cldr44-epic-ldml
chore(developer,common,core): update to latest CLDR v44 🙀
This commit is contained in:
commit
bc89a080d4
146 changed files with 1477 additions and 1768 deletions
|
|
@ -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++;
|
||||
});
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
}
|
||||
|
|
@ -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);
|
||||
|
|
|
|||
|
|
@ -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
|
||||
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -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 {
|
||||
|
|
|
|||
|
|
@ -1,8 +1,5 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Test Minimal Keyboard"/>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,10 +1,7 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Test Minimal Keyboard"/>
|
||||
<keys>
|
||||
|
||||
</keys>
|
||||
|
|
|
|||
|
|
@ -1,11 +1,8 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Test Minimal Keyboard"/>
|
||||
<keys>
|
||||
<key id="a" to="å"/> <!-- override -->
|
||||
<key id="a" output="å"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,13 +1,10 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Test Minimal Keyboard" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Test Minimal Keyboard"/>
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
|
||||
<key id="zz" to="zz"/>
|
||||
<key id="hash" to="##"/> <!-- override -->
|
||||
<key id="zz" output="zz"/>
|
||||
<key id="hash" output="##"/> <!-- override -->
|
||||
</keys>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -5,15 +5,11 @@
|
|||
Disabling doctype for this invalid file, not used by compiler, and avoids complaints in IDEs etc.
|
||||
-->
|
||||
<keyboard3 locale="mt" conformsTo="nothing-anyone-ever-heard-of"> <!-- invalid -->
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<import base="SOME_INVALID_BASE" path="abcd/keys-Zyyy-punctuation.xml"/> <!-- invalid -->
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/too/many/slashes/leading/to/nothing-Zxxx-does-not-exist.xml"/> <!-- invalid -->
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,12 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/none-Zxxx-does-not-exist.xml"/> <!-- invalid -->
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,19 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<info name="TestKbd" author="srl295" indicator="🙀" layout="qwerty" />
|
||||
|
||||
<names>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/> <!-- wrong root! -->
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" flickId="test" output="ថា" />
|
||||
</keys>
|
||||
|
||||
<flicks>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/> <!-- wrong root! -->
|
||||
<flick id="test">
|
||||
<flickSegment directions="n nw" keyId="hmaqtugha" />
|
||||
</flick>
|
||||
</flicks>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
}),
|
||||
],
|
||||
},
|
||||
|
|
|
|||
|
|
@ -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" */
|
||||
|
|
|
|||
|
|
@ -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',
|
||||
|
|
|
|||
|
|
@ -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<count; i++) {
|
||||
DebugLoad("disp#%d: to: str0x%X -> 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("<flick> %d: to=0x%X, directions=0x%X, flags=0x%X", i, e.to, e.directions, e.flags);
|
||||
DebugLoad("<flick> %d: to=0x%X, directions=0x%X", i, e.to, e.directions);
|
||||
}
|
||||
// now the kmap
|
||||
DebugLoad(" kmap count: #0x%X", key2->kmapCount);
|
||||
|
|
|
|||
|
|
@ -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;
|
||||
};
|
||||
|
||||
|
|
|
|||
|
|
@ -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 `<names>` 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 `<layer>` 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
|
||||
|
||||
|
|
|
|||
|
|
@ -10,18 +10,14 @@
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="hmaqtugha that" /> <!-- number row -->
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -8,19 +8,15 @@
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd-UTF32" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd-UTF32"/>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="screamcat" to="🙀" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
<key id="screamcat" output="🙀" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="hmaqtugha that screamcat" /> <!-- number row -->
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -9,28 +9,24 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TransformKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TransformKbd"/>
|
||||
|
||||
<keys>
|
||||
<key id="equal" to="=" />
|
||||
<key id="hyphen" to="-" />
|
||||
<key id="untransformed-hat" to="^" transform="no"/>
|
||||
<key id="hat" to="^"/>
|
||||
<key id="equal" output="=" />
|
||||
<key id="hyphen" output="-" />
|
||||
<key id="untransformed-hat" output="^"/>
|
||||
<key id="hat" output="\m{hat}"/>
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="hat 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p" />
|
||||
<row keys="a s d f g h j k l" />
|
||||
<row keys="z x c v b n m" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifier="shift" id="shift">
|
||||
<layer modifiers="shift" id="shift">
|
||||
<row keys="untransformed-hat 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="Q W E R T Y U I O P" />
|
||||
<row keys="A S D F G H J K L" />
|
||||
|
|
@ -45,7 +41,7 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<transform from="\^${e}" to="ê"/> <!-- TODO-LDML: ^ should not need escape here ideally -->
|
||||
<transform from="\m{hat}${e}" to="ê"/> <!-- TODO-LDML: ^ should not need escape here ideally -->
|
||||
</transformGroup>
|
||||
<transformGroup>
|
||||
<!-- testing -->
|
||||
|
|
|
|||
|
|
@ -8,24 +8,20 @@
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" />
|
||||
<key id="that" to="ថា" />
|
||||
<key id="seven" to="7" />
|
||||
<key id="eee" to="e" />
|
||||
<key id="hmaqtugha" output="ħ" />
|
||||
<key id="that" output="ថា" />
|
||||
<key id="seven" output="7" />
|
||||
<key id="eee" output="e" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer id="base" modifier="none">
|
||||
<layers formId="us">
|
||||
<layer id="base" modifiers="none">
|
||||
<row keys="hmaqtugha that" /> <!-- number row -->
|
||||
</layer>
|
||||
<layer id="shift" modifier="shift">
|
||||
<layer id="shift" modifiers="shift">
|
||||
<row keys="seven eee" /> <!-- number row -->
|
||||
</layer>
|
||||
</layers>
|
||||
|
|
|
|||
|
|
@ -8,37 +8,33 @@
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys/> <!-- implied only -->
|
||||
|
||||
<layers form="us">
|
||||
<layer id="base" modifier="none">
|
||||
<layers formId="us">
|
||||
<layer id="base" modifiers="none">
|
||||
<row keys="a" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="shift">
|
||||
<layer modifiers="shift">
|
||||
<row keys="A" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="altL">
|
||||
<layer modifiers="altL">
|
||||
<row keys="b" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="altR">
|
||||
<layer modifiers="altR">
|
||||
<row keys="c" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="shift alt"> <!-- LALT+shift or RALT+shift -->
|
||||
<layer modifiers="shift alt"> <!-- LALT+shift or RALT+shift -->
|
||||
<row keys="d" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="ctrlL">
|
||||
<layer modifiers="ctrlL">
|
||||
<row keys="e" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="ctrlR">
|
||||
<layer modifiers="ctrlR">
|
||||
<row keys="f" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
<layer modifier="shift ctrl"> <!-- LALT+shift or RALT+shift -->
|
||||
<layer modifiers="shift ctrl"> <!-- LALT+shift or RALT+shift -->
|
||||
<row keys="g" /> <!-- K_BKQUOTE -->
|
||||
</layer>
|
||||
</layers>
|
||||
|
|
|
|||
|
|
@ -2,28 +2,24 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TransformKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TransformKbd"/>
|
||||
|
||||
<keys>
|
||||
<key id="equal" to="=" />
|
||||
<key id="hyphen" to="-" />
|
||||
<key id="untransformed-hat" to="^" transform="no"/>
|
||||
<key id="hat" to="^"/>
|
||||
<key id="equal" output="=" />
|
||||
<key id="hyphen" output="-" />
|
||||
<key id="untransformed-hat" output="^"/>
|
||||
<key id="hat" output="\m{hat}"/>
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="hat 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p" />
|
||||
<row keys="a s d f g h j k l" />
|
||||
<row keys="z x c v b n m" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifier="shift" id="shift">
|
||||
<layer modifiers="shift" id="shift">
|
||||
<row keys="untransformed-hat 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="Q W E R T Y U I O P" />
|
||||
<row keys="A S D F G H J K L" />
|
||||
|
|
@ -38,7 +34,7 @@
|
|||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<transform from="^${e}" to="ê"/>
|
||||
<transform from="\m{hat}${e}" to="ê"/>
|
||||
</transformGroup>
|
||||
<transformGroup>
|
||||
<!-- testing -->
|
||||
|
|
|
|||
|
|
@ -6,26 +6,21 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="k_007_transform_rgx" />
|
||||
<name value="Regex Transform Test" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="k_007_transform_rgx" />
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="`"/>
|
||||
<key id="grave" output="`"/>
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="grave 1 2 3 4 5 6 7 8 9 0" />
|
||||
<row keys="q w e r t y u i o p" />
|
||||
<row keys="a s d f g h j k l" />
|
||||
<row keys="z x c v b n m" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifier="shift" id="shift">
|
||||
<layer modifiers="shift" id="shift">
|
||||
<row keys="grave 1 2 3 4 5 6 7 8 9 0" />
|
||||
<row keys="Q W E R T Y U I O P" />
|
||||
<row keys="A S D F G H J K L" />
|
||||
|
|
|
|||
|
|
@ -6,30 +6,26 @@ from https://github.com/unicode-org/cldr/blob/keyboard-preview/docs/ldml/tr35-ke
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="k_008_transform_norm" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="k_008_transform_norm"/>
|
||||
|
||||
<keys>
|
||||
<key id="u-0320" to="\u{0320}" /> <!-- ◌̠ -->
|
||||
<key id="u-0300" to="\u{0300}" /> <!-- ◌̀ -->
|
||||
<key id="u-00e8" to="\u{00e8}" /> <!-- è -->
|
||||
<key id="nfd" to="e\u{0320}\u{0300}" />
|
||||
<key id="nfc" to="\u{00E8}\u{0320}" />
|
||||
<key id="not-nfd" to="e\u{0300}\u{0320}" />
|
||||
<key id="u-0320" output="\u{0320}" /> <!-- ◌̠ -->
|
||||
<key id="u-0300" output="\u{0300}" /> <!-- ◌̀ -->
|
||||
<key id="u-00e8" output="\u{00e8}" /> <!-- è -->
|
||||
<key id="nfd" output="e\u{0320}\u{0300}" />
|
||||
<key id="nfc" output="\u{00E8}\u{0320}" />
|
||||
<key id="not-nfd" output="e\u{0300}\u{0320}" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="u-0320 1 2 3 4 5 6 7 8 9 0" />
|
||||
<row keys="q w e r t y u i o p" />
|
||||
<row keys="a s d f g h j k l" />
|
||||
<row keys="z x c v b n m" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
<layer modifier="shift" id="shift">
|
||||
<layer modifiers="shift" id="shift">
|
||||
<row keys="u-0300 u-00e8 nfd nfc not-nfd" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
|
|
|||
|
|
@ -17,12 +17,7 @@ Gets part of the way,
|
|||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
</locales>
|
||||
<info author="Steven R. Loomis" normalization="NFC" layout="QWERTY" indicator="MT" />
|
||||
|
||||
<names>
|
||||
<name value="Maltese 47-key" />
|
||||
<name value="MSA 100:2002 47-key" />
|
||||
</names>
|
||||
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" name="Maltese 47-key" />
|
||||
|
||||
<keys>
|
||||
<!-- imports -->
|
||||
|
|
@ -30,37 +25,37 @@ Gets part of the way,
|
|||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
|
||||
|
||||
<!-- accent grave -->
|
||||
<key id="a-grave" to="à" />
|
||||
<key id="A-grave" to="À" />
|
||||
<key id="e-grave" to="è" />
|
||||
<key id="E-grave" to="È" />
|
||||
<key id="i-grave" to="ì" />
|
||||
<key id="I-grave" to="Ì" />
|
||||
<key id="o-grave" to="ò" />
|
||||
<key id="O-grave" to="Ò" />
|
||||
<key id="u-grave" to="ù" />
|
||||
<key id="U-grave" to="Ù" />
|
||||
<key id="a-grave" output="à" />
|
||||
<key id="A-grave" output="À" />
|
||||
<key id="e-grave" output="è" />
|
||||
<key id="E-grave" output="È" />
|
||||
<key id="i-grave" output="ì" />
|
||||
<key id="I-grave" output="Ì" />
|
||||
<key id="o-grave" output="ò" />
|
||||
<key id="O-grave" output="Ò" />
|
||||
<key id="u-grave" output="ù" />
|
||||
<key id="U-grave" output="Ù" />
|
||||
|
||||
<!-- tikka and maqtugha -->
|
||||
<key id="c-tikka" to="ċ" /> <!-- tikka is a dot -->
|
||||
<key id="C-tikka" to="Ċ" />
|
||||
<key id="g-tikka" to="ġ" />
|
||||
<key id="G-tikka" to="Ġ" />
|
||||
<key id="h-maqtugha" to="ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="H-maqtugha" to="Ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="z-tikka" to="ż" />
|
||||
<key id="Z-tikka" to="Ż" />
|
||||
<key id="c-tikka" output="ċ" /> <!-- tikka is a dot -->
|
||||
<key id="C-tikka" output="Ċ" />
|
||||
<key id="g-tikka" output="ġ" />
|
||||
<key id="G-tikka" output="Ġ" />
|
||||
<key id="h-maqtugha" output="ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="H-maqtugha" output="Ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="z-tikka" output="ż" />
|
||||
<key id="Z-tikka" output="Ż" />
|
||||
|
||||
<!-- Cedilla -->
|
||||
<key id="c-cedilla" to="ç" />
|
||||
<key id="c-cedilla" output="ç" />
|
||||
|
||||
<!-- gaps -->
|
||||
<key id="gap" gap="true" width="1" />
|
||||
</keys>
|
||||
|
||||
<!-- 47-key: MSA 100:2002, Appendix, figure A.1 -->
|
||||
<layers form="us">
|
||||
<layer modifier="none">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none">
|
||||
<row keys="c-tikka 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p g-tikka h-maqtugha z-tikka" />
|
||||
<row keys="a s d f g h j k l semi-colon apos" />
|
||||
|
|
@ -68,7 +63,7 @@ Gets part of the way,
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="shift">
|
||||
<layer modifiers="shift">
|
||||
<row keys="C-tikka bang at euro dollar percent caret amp asterisk open-paren close-paren underscore plus" />
|
||||
<row keys="Q W E R T Y U I O P G-tikka H-maqtugha Z-tikka" />
|
||||
<row keys="A S D F G H J K L colon double-quote" />
|
||||
|
|
@ -76,7 +71,7 @@ Gets part of the way,
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="altR">
|
||||
<layer modifiers="altR">
|
||||
<row keys="grave gap gap pound gap gap gap gap gap gap gap gap gap" />
|
||||
<row keys="gap gap e-grave gap gap gap u-grave i-grave o-grave gap open-square close-square backslash" />
|
||||
<row keys="a-grave gap gap gap gap gap gap gap gap gap gap" />
|
||||
|
|
@ -84,7 +79,7 @@ Gets part of the way,
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="altR shift">
|
||||
<layer modifiers="altR shift">
|
||||
<row keys="tilde gap gap gap gap gap gap gap gap gap gap gap gap" />
|
||||
<row keys="gap gap E-grave gap gap gap U-grave I-grave O-grave gap open-curly close-curly pipe" />
|
||||
<row keys="A-grave gap gap gap gap gap gap gap gap gap gap" />
|
||||
|
|
|
|||
|
|
@ -17,12 +17,7 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
<!-- English is also an official language in Malta.-->
|
||||
<locale id="en" />
|
||||
</locales>
|
||||
<info author="Steven R. Loomis" normalization="NFC" layout="QWERTY" indicator="MT" />
|
||||
|
||||
<names>
|
||||
<name value="Maltese" />
|
||||
<name value="MSA 100:2002" />
|
||||
</names>
|
||||
<info author="Steven R. Loomis" layout="QWERTY" indicator="MT" name="Maltese"/>
|
||||
|
||||
<keys>
|
||||
<!-- imports -->
|
||||
|
|
@ -30,34 +25,34 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml"/>
|
||||
|
||||
<!-- accent grave -->
|
||||
<key id="a-grave" to="à" />
|
||||
<key id="A-grave" to="À" />
|
||||
<key id="e-grave" to="è" />
|
||||
<key id="E-grave" to="È" />
|
||||
<key id="i-grave" to="ì" />
|
||||
<key id="I-grave" to="Ì" />
|
||||
<key id="o-grave" to="ò" />
|
||||
<key id="O-grave" to="Ò" />
|
||||
<key id="u-grave" to="ù" />
|
||||
<key id="U-grave" to="Ù" />
|
||||
<key id="a-grave" output="à" />
|
||||
<key id="A-grave" output="À" />
|
||||
<key id="e-grave" output="è" />
|
||||
<key id="E-grave" output="È" />
|
||||
<key id="i-grave" output="ì" />
|
||||
<key id="I-grave" output="Ì" />
|
||||
<key id="o-grave" output="ò" />
|
||||
<key id="O-grave" output="Ò" />
|
||||
<key id="u-grave" output="ù" />
|
||||
<key id="U-grave" output="Ù" />
|
||||
|
||||
<!-- tikka and maqtugha -->
|
||||
<key id="c-tikka" to="ċ" /> <!-- tikka is a dot -->
|
||||
<key id="C-tikka" to="Ċ" />
|
||||
<key id="g-tikka" to="ġ" />
|
||||
<key id="G-tikka" to="Ġ" />
|
||||
<key id="h-maqtugha" to="ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="H-maqtugha" to="Ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="z-tikka" to="ż" />
|
||||
<key id="Z-tikka" to="Ż" />
|
||||
<key id="c-tikka" output="ċ" /> <!-- tikka is a dot -->
|
||||
<key id="C-tikka" output="Ċ" />
|
||||
<key id="g-tikka" output="ġ" />
|
||||
<key id="G-tikka" output="Ġ" />
|
||||
<key id="h-maqtugha" output="ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="H-maqtugha" output="Ħ" /> <!-- maqtugħa, i.e. cut -->
|
||||
<key id="z-tikka" output="ż" />
|
||||
<key id="Z-tikka" output="Ż" />
|
||||
|
||||
<!-- Cedilla -->
|
||||
<key id="c-cedilla" to="ç" />
|
||||
<key id="c-cedilla" output="ç" />
|
||||
</keys>
|
||||
|
||||
<!-- 48-key -->
|
||||
<layers form="iso">
|
||||
<layer modifier="none">
|
||||
<layers formId="iso">
|
||||
<layer modifiers="none">
|
||||
<row keys="c-tikka 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p g-tikka h-maqtugha" />
|
||||
<row keys="a s d f g h j k l semi-colon hash" />
|
||||
|
|
@ -65,7 +60,7 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="shift">
|
||||
<layer modifiers="shift">
|
||||
<row keys="C-tikka bang double-quote euro dollar percent caret amp open-paren close-paren underscore plus" />
|
||||
<row keys="Q W E R T Y U I O P G-tikka H-maqtugha" />
|
||||
<row keys="A S D F G H J K L colon at tilde" />
|
||||
|
|
@ -73,7 +68,7 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="altR">
|
||||
<layer modifiers="altR">
|
||||
<row keys="grave gap gap pound gap gap gap gap gap gap gap gap gap" />
|
||||
<row keys="gap gap e-grave gap gap gap u-grave i-grave o-grave gap open-square close-square" />
|
||||
<row keys="a-grave gap gap gap gap gap gap gap gap gap gap gap" />
|
||||
|
|
@ -81,7 +76,7 @@ Exact copy of mt.xml from CLDR, but with:
|
|||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="altR shift">
|
||||
<layer modifiers="altR shift">
|
||||
<row keys="not gap gap gap gap gap gap gap gap gap gap gap gap" />
|
||||
<row keys="gap gap E-grave gap gap gap U-grave I-grave O-grave gap open-curly close-curly" />
|
||||
<row keys="A-grave gap gap gap gap gap gap gap gap gap gap gap" />
|
||||
|
|
|
|||
|
|
@ -9,19 +9,15 @@
|
|||
keyboard formats -->
|
||||
<!-- 'version' element is now optional -->
|
||||
<version number="1.0.1" />
|
||||
<info author="Team Keyboard" normalization="NFC" layout="AZERTY" indicator="FR" />
|
||||
<names>
|
||||
<name value="French Test Updated" />
|
||||
<name value="French Test AZERTY Updated" />
|
||||
</names>
|
||||
|
||||
<settings fallback="omit" /> <!-- "hide" makes this act like a dead keyTBD -->
|
||||
<info author="Team Keyboard"
|
||||
layout="AZERTY" indicator="FR" name="French Test Updated" />
|
||||
|
||||
<displays>
|
||||
<!-- Note: displays is only used for keycap presentation -->
|
||||
<!-- this example is not required for this keyboard as we use the spacing
|
||||
modifiers -->
|
||||
<display to="\u0300" display="\u02CB" /> <!-- display combining grave as modifier letter grave ˋ -->
|
||||
<display output="\u0300" display="\u02CB" /> <!-- display combining grave as modifier letter
|
||||
grave ˋ -->
|
||||
<!-- Note: We discussed why the existing displayMap was used for display.
|
||||
rather than adding something closer to the key layout. 1. This way we can
|
||||
tell the renderer what to do. Could be double diacritics, spacing issues,
|
||||
|
|
@ -36,62 +32,83 @@
|
|||
<import base="cldr" path="techpreview/keys-Zyyy-currency.xml" />
|
||||
|
||||
<!-- switch keys -->
|
||||
<key id="shift" switch="shift" />
|
||||
<key id="numeric" switch="numeric" />
|
||||
<key id="symbol" switch="symbol" />
|
||||
<key id="base" switch="base" />
|
||||
<key id="shift" layerId="shift" />
|
||||
<key id="numeric" layerId="numeric" />
|
||||
<key id="symbol" layerId="symbol" />
|
||||
<key id="base" layerId="base" />
|
||||
|
||||
<!-- TODO-LDML -->
|
||||
<!-- TODO-LDML -->
|
||||
<key id="bksp" gap="true" />
|
||||
<!-- TODO-LDML -->
|
||||
<!-- TODO-LDML -->
|
||||
<key id="extra" gap="true" />
|
||||
<!-- TODO-LDML -->
|
||||
<key id="enter" to="\u{000A}" />
|
||||
<!-- TODO-LDML -->
|
||||
<key id="enter" output="\u{000A}" />
|
||||
|
||||
<!-- extra keys -->
|
||||
<key id="u-grave" to="ü" />
|
||||
<key id="e-grave" to="é" /> <!-- 2 -->
|
||||
<key id="e-acute" to="è" /> <!-- 7 -->
|
||||
<key id="c-cedilla" to="ç" /> <!-- 9 -->
|
||||
<key id="a-acute" to="à" /> <!-- 0 -->
|
||||
<key id="u-grave" output="ü" />
|
||||
<key id="e-grave" output="é" /> <!-- 2 -->
|
||||
<key id="e-acute" output="è" /> <!-- 7 -->
|
||||
<key id="c-cedilla" output="ç" /> <!-- 9 -->
|
||||
<key id="a-grave" output="à" />
|
||||
<key id="a-acute" output="á" />
|
||||
<key id="a-caret" output="â" />
|
||||
<key id="a-umlaut" output="ä" />
|
||||
<key id="a-tilde" output="ã" />
|
||||
<key id="a-ring" output="å" />
|
||||
<key id="a-caron" output="ā" />
|
||||
|
||||
<key id="A-grave" output="À" /> <!-- 0 -->
|
||||
<key id="A-acute" output="Á" />
|
||||
<key id="A-caret" output="Â" />
|
||||
<key id="A-umlaut" output="Ä" />
|
||||
<key id="A-tilde" output="Ã" />
|
||||
<key id="A-ring" output="Å" />
|
||||
<key id="A-caron" output="Ā" />
|
||||
|
||||
<!-- extra symbols -->
|
||||
<key id="bullet" to="•" />
|
||||
<key id="umlaut" to="¨" />
|
||||
<key id="super-2" to="²" longPress="₂" />
|
||||
<key id="bullet" output="•" />
|
||||
<key id="umlaut" output="¨" />
|
||||
<key id="sub-2" output="₂" />
|
||||
<key id="super-2" output="²" longPressKeyIds="sub-2" />
|
||||
|
||||
<!-- test key -->
|
||||
<key id="a" flicks="a" to="a" longPress="à â á ä ã å ā" />
|
||||
<flicks id="a">
|
||||
<flick directions="nw" to="\u1234" />
|
||||
<flick directions="nw se" to="\uFFFF" />
|
||||
<flick directions="e" to="\uFFF0" />
|
||||
</flicks>
|
||||
|
||||
<!-- test key -->
|
||||
<key id="A" flicks="b" to="A" longPress="À Á Ä Ã Å Ā" />
|
||||
|
||||
<!-- test flick -->
|
||||
<flicks id="b">
|
||||
<flick directions="nw" to="\u4567" />
|
||||
<flick directions="nw se" to="\uFFFF" />
|
||||
<flick directions="e" to="\uFFF0" />
|
||||
</flicks>
|
||||
|
||||
<!-- note that a-caret is the default-->
|
||||
<key id="a" flickId="a" output="a"
|
||||
longPressKeyIds="a-grave a-caret a-acute a-umlaut a-tilde a-ring a-caron"
|
||||
longPressDefaultKeyId="a-caret" />
|
||||
<key id="A" flickId="b" output="A"
|
||||
longPressKeyIds="A-grave A-caret A-acute A-umlaut a-tilde A-ring A-caron"
|
||||
longPressDefaultKeyId="A-caret" />
|
||||
<!-- TODO: all additional maps, hardware and touch -->
|
||||
</keys>
|
||||
|
||||
<layers form="iso">
|
||||
<flicks>
|
||||
<flick id="b">
|
||||
<flickSegment directions="nw" keyId="A-grave" />
|
||||
<flickSegment directions="nw se" keyId="A-acute" />
|
||||
<flickSegment directions="e" keyId="A-caron" />
|
||||
<flickSegment directions="s" keyId="numeric" /> <!-- layer shifting flick-->
|
||||
</flick>
|
||||
<flick id="a">
|
||||
<flickSegment directions="nw" keyId="a-grave" />
|
||||
<flickSegment directions="nw se" keyId="a-acute" />
|
||||
<flickSegment directions="e" keyId="a-caron" />
|
||||
</flick>
|
||||
</flicks>
|
||||
|
||||
<layers
|
||||
formId="iso">
|
||||
<!-- in DTD: required if conformsTo ≥ 41 -->
|
||||
<layer modifier="none">
|
||||
<row keys="super-2 amp e-grave double-quote apos open-paren hyphen e-acute underscore c-cedilla a-acute close-paren equal" />
|
||||
<layer modifiers="none">
|
||||
<row
|
||||
keys="super-2 amp e-grave double-quote apos open-paren hyphen e-acute underscore c-cedilla a-acute close-paren equal" />
|
||||
<row keys="a z e r t y u i o p caret dollar" />
|
||||
<row keys="q s d f g h j k l m u-grave asterisk" />
|
||||
<row keys="open-angle w x c v b n comma semi-colon colon bang" />
|
||||
<row keys="space" />
|
||||
</layer>
|
||||
|
||||
<layer modifier="shift">
|
||||
<layer modifiers="shift">
|
||||
<row keys="1 2 3 4 5 6 7 8 9 0 degree plus" />
|
||||
<row keys="A Z E R T Y U I O P umlaut pound" />
|
||||
<row keys="Q S D F G H J K L M percent micro" />
|
||||
|
|
@ -100,7 +117,8 @@
|
|||
</layer>
|
||||
</layers>
|
||||
|
||||
<layers form="touch" minDeviceWidth="150">
|
||||
<layers formId="touch"
|
||||
minDeviceWidth="150">
|
||||
<!-- optional attribute for min physical device size -->
|
||||
<layer id="base">
|
||||
<row keys="a z e r t y u i o p" />
|
||||
|
|
@ -118,63 +136,66 @@
|
|||
|
||||
<layer id="numeric">
|
||||
<row keys="1 2 3 4 5 6 7 8 9 0" />
|
||||
<row keys="hyphen slash colon semi-colon open-paren close-paren dollar amp at double-quote" />
|
||||
<row
|
||||
keys="hyphen slash colon semi-colon open-paren close-paren dollar amp at double-quote" />
|
||||
<row keys="symbol period comma question bang double-quote" /> <!--TODO: + bksp -->
|
||||
<row keys="base extra space enter" />
|
||||
</layer>
|
||||
|
||||
<layer id="symbol">
|
||||
<row keys="open-square close-square open-curly close-curly hash percent caret asterisk plus equal" />
|
||||
<row
|
||||
keys="open-square close-square open-curly close-curly hash percent caret asterisk plus equal" />
|
||||
<row keys="underscore backslash pipe tilde open-angle close-angle euro pound yen bullet" />
|
||||
<row keys="numeric period comma question bang double-quote" /> <!--TODO: + bksp -->
|
||||
<row keys="base extra space enter" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
||||
<transforms type="simple">
|
||||
<transformGroup>
|
||||
<transform from="` " to="`" />
|
||||
<transform from="`a" to="à" />
|
||||
<transform from="`A" to="À" />
|
||||
<transform from="`e" to="è" />
|
||||
<transform from="`E" to="È" />
|
||||
<transform from="`i" to="ì" />
|
||||
<transform from="`I" to="Ì" />
|
||||
<transform from="`o" to="ò" />
|
||||
<transform from="`O" to="Ò" />
|
||||
<transform from="`u" to="ù" />
|
||||
<transform from="`U" to="Ù" />
|
||||
<transform from="^ " to="^" />
|
||||
<transform from="^a" to="â" />
|
||||
<transform from="^A" to=" " />
|
||||
<transform from="^e" to="ê" />
|
||||
<transform from="^E" to="Ê" />
|
||||
<transform from="^i" to="î" />
|
||||
<transform from="^I" to="Î" />
|
||||
<transform from="^o" to="ô" />
|
||||
<transform from="^O" to="Ô" />
|
||||
<transform from="^u" to="û" />
|
||||
<transform from="^U" to="Û" />
|
||||
<transform from="¨ " to="¨" />
|
||||
<transform from="¨a" to="ä" />
|
||||
<transform from="¨A" to="Ä" />
|
||||
<transform from="¨e" to="ë" />
|
||||
<transform from="¨E" to="Ë" />
|
||||
<transform from="¨i" to="ï" />
|
||||
<transform from="¨I" to="Ï" />
|
||||
<transform from="¨o" to="ö" />
|
||||
<transform from="¨O" to="Ö" />
|
||||
<transform from="¨u" to="ü" />
|
||||
<transform from="¨U" to="Ü" />
|
||||
<transform from="¨y" to="ÿ" />
|
||||
<transform from="~ " to="~" />
|
||||
<transform from="~a" to="ã" />
|
||||
<transform from="~A" to="Ã" />
|
||||
<transform from="~n" to="ñ" />
|
||||
<transform from="~N" to="Ñ" />
|
||||
<transform from="~o" to="õ" />
|
||||
<transform from="~O" to="Õ" />
|
||||
</transformGroup>
|
||||
<transforms
|
||||
type="simple">
|
||||
<transformGroup>
|
||||
<transform from="` " to="`" />
|
||||
<transform from="`a" to="à" />
|
||||
<transform from="`A" to="À" />
|
||||
<transform from="`e" to="è" />
|
||||
<transform from="`E" to="È" />
|
||||
<transform from="`i" to="ì" />
|
||||
<transform from="`I" to="Ì" />
|
||||
<transform from="`o" to="ò" />
|
||||
<transform from="`O" to="Ò" />
|
||||
<transform from="`u" to="ù" />
|
||||
<transform from="`U" to="Ù" />
|
||||
<transform from="^ " to="^" />
|
||||
<transform from="^a" to="â" />
|
||||
<transform from="^A" to=" " />
|
||||
<transform from="^e" to="ê" />
|
||||
<transform from="^E" to="Ê" />
|
||||
<transform from="^i" to="î" />
|
||||
<transform from="^I" to="Î" />
|
||||
<transform from="^o" to="ô" />
|
||||
<transform from="^O" to="Ô" />
|
||||
<transform from="^u" to="û" />
|
||||
<transform from="^U" to="Û" />
|
||||
<transform from="¨ " to="¨" />
|
||||
<transform from="¨a" to="ä" />
|
||||
<transform from="¨A" to="Ä" />
|
||||
<transform from="¨e" to="ë" />
|
||||
<transform from="¨E" to="Ë" />
|
||||
<transform from="¨i" to="ï" />
|
||||
<transform from="¨I" to="Ï" />
|
||||
<transform from="¨o" to="ö" />
|
||||
<transform from="¨O" to="Ö" />
|
||||
<transform from="¨u" to="ü" />
|
||||
<transform from="¨U" to="Ü" />
|
||||
<transform from="¨y" to="ÿ" />
|
||||
<transform from="~ " to="~" />
|
||||
<transform from="~a" to="ã" />
|
||||
<transform from="~A" to="Ã" />
|
||||
<transform from="~n" to="ñ" />
|
||||
<transform from="~N" to="Ñ" />
|
||||
<transform from="~o" to="õ" />
|
||||
<transform from="~O" to="Õ" />
|
||||
</transformGroup>
|
||||
</transforms>
|
||||
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -7,18 +7,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<keys>
|
||||
<!-- tests that gap="true" (with no to=) is OK -->
|
||||
<key id="gap" gap="true" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="a gap"/>
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -6,14 +6,10 @@
|
|||
-->
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<displays>
|
||||
<display to="a" display="(a)"/>
|
||||
<display output="a" display="(a)"/>
|
||||
<displayOptions baseCharacter="x"/>
|
||||
</displays>
|
||||
|
||||
|
|
@ -21,7 +17,7 @@
|
|||
<!-- no keys listed, keys-Latn-implied.xml will be implicitly imported -->
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="a" /> <!-- number row -->
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -7,13 +7,9 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
<!-- only implied keys - the <keys/> element is omitted. -->
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="a" /> <!-- number row -->
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -7,25 +7,22 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="nod" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="nod-Lana Test" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="nod-Lana Test"/>
|
||||
|
||||
<keys>
|
||||
<!-- keys in order for 'roast' -->
|
||||
<key id="kha" to="\u{1A21}" />
|
||||
<key id="sakot" to="\u{1A60}" />
|
||||
<key id="wa" to="\u{1A45}" />
|
||||
<key id="o" to="\u{1A6B}" />
|
||||
<key id="t2" to="\u{1A76}" />
|
||||
<key id="kha" output="\u{1A21}" />
|
||||
<key id="sakot" output="\u{1A60}" />
|
||||
<key id="wa" output="\u{1A45}" />
|
||||
<key id="o" output="\u{1A6B}" />
|
||||
<key id="t2" output="\u{1A76}" />
|
||||
|
||||
<!-- and a shortcut key for this common word -->
|
||||
<key id="roast" to="\u{1A21}\u{1A60}\u{1A45}\u{1A6B}\u{1A76}" />
|
||||
<key id="roast" output="\u{1A21}\u{1A60}\u{1A45}\u{1A6B}\u{1A76}" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="roast" />
|
||||
<row keys="gap wa gap gap t2 gap gap gap o gap" />
|
||||
<row keys="gap sakot gap gap gap gap gap kha gap" />
|
||||
|
|
|
|||
|
|
@ -6,25 +6,22 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
<names>
|
||||
<name value="Marker Test" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="Marker Test"/>
|
||||
|
||||
<displays>
|
||||
<display to="\m{grave}" display="`" />
|
||||
<display to="\m{acute}" display="´" />
|
||||
<display output="\m{grave}" display="`" />
|
||||
<display output="\m{acute}" display="´" />
|
||||
</displays>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="\m{grave}" />
|
||||
<key id="acute" to="\m{acute}" />
|
||||
<key id="caret" to="C" /> <!-- see transform -->
|
||||
<key id="hacek" to="H" /> <!-- see transform -->
|
||||
<key id="grave" output="\m{grave}" />
|
||||
<key id="acute" output="\m{acute}" />
|
||||
<key id="caret" output="C" /> <!-- see transform -->
|
||||
<key id="hacek" output="H" /> <!-- see transform -->
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer modifier="none" id="base">
|
||||
<layers formId="us">
|
||||
<layer modifiers="none" id="base">
|
||||
<row keys="grave acute caret hacek" />
|
||||
<row keys="q w e" /> <!-- etc -->
|
||||
<row keys="a s d" /> <!-- etc -->
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
];
|
||||
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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}` +
|
||||
|
|
|
|||
|
|
@ -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<string>, flickHash: Map<string, LDMLKeyboard.LKFlick>, usedKeys: Set<string>) {
|
||||
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<string, LDMLKeyboard.LKKey> {
|
||||
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<string, LDMLKeyboard.LKKey>, usedKeys: Set<string>) {
|
||||
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<string, LDMLKeyboard.LKKey>, layerKeyIds: string[], usedKeys: Set<string>) {
|
||||
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 <flick id=…>
|
||||
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<string, LDMLKeyboard.LKKey>) {
|
||||
const usedFlicks = new Set<string>();
|
||||
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<string, LDMLKeyboard.LKKey>,
|
||||
layerKeyIds: string[], usedKeys: Set<string>) {
|
||||
|
||||
// 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<string, LDMLKeyboard.LKKey>
|
||||
): 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 })
|
||||
);
|
||||
|
|
|
|||
|
|
@ -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,
|
||||
|
|
|
|||
|
|
@ -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 <form id="${o.id}"> element. Key layout may not be as expected.`);
|
||||
static WARN_CustomForm = SevWarn | 0x000A;
|
||||
|
||||
// 0x000B - available
|
||||
static Error_GestureKeyNotFoundInKeyBag = (o:{keyId: string, parentKeyId: string, attribute: string}) =>
|
||||
m(this.ERROR_GestureKeyNotFoundInKeyBag, `Key '${o.keyId}' not found in key bag, referenced from other '${o.parentKeyId}' in ${o.attribute}`);
|
||||
static ERROR_GestureKeyNotFoundInKeyBag = SevError | 0x000B;
|
||||
|
||||
// 0x000C - available
|
||||
|
||||
static Error_InvalidVersion = (o:{version: string}) =>
|
||||
|
|
@ -59,40 +62,40 @@ export class CompilerMessages {
|
|||
static FATAL_SectionCompilerFailed = SevFatal | 0x000F;
|
||||
|
||||
/** annotate the to= or id= entry */
|
||||
private static toOrId(o:{to?: string, id?: string}) {
|
||||
if (o.to && o.id) {
|
||||
return `to='${o.to}' id='${o.id}'`;
|
||||
} else if(o.id) {
|
||||
return `id='${o.id}'`;
|
||||
} else if (o.to) {
|
||||
return `to='${o.to}'`;
|
||||
private static outputOrKeyId(o:{output?: string, keyId?: string}) {
|
||||
if (o.output && o.keyId) {
|
||||
return `output='${o.output}' keyId='${o.keyId}'`;
|
||||
} else if(o.keyId) {
|
||||
return `keyId='${o.keyId}'`;
|
||||
} else if (o.output) {
|
||||
return `output='${o.output}'`;
|
||||
} else {
|
||||
return '';
|
||||
}
|
||||
}
|
||||
|
||||
static Error_DisplayIsRepeated = (o:{to?: string, id?: string}) =>
|
||||
m(this.ERROR_DisplayIsRepeated, `display ${CompilerMessages.toOrId(o)} has more than one display entry.`);
|
||||
static Error_DisplayIsRepeated = (o:{output?: string, keyId?: string}) =>
|
||||
m(this.ERROR_DisplayIsRepeated, `display ${CompilerMessages.outputOrKeyId(o)} has more than one display entry.`);
|
||||
static ERROR_DisplayIsRepeated = SevError | 0x0010;
|
||||
|
||||
static Error_KeyMissingToGapOrSwitch = (o:{keyId: string}) =>
|
||||
m(this.ERROR_KeyMissingToGapOrSwitch, `key id='${o.keyId}' must have either to=, gap=, or switch=.`);
|
||||
m(this.ERROR_KeyMissingToGapOrSwitch, `key id='${o.keyId}' must have either output=, gap=, or layerId=.`);
|
||||
static ERROR_KeyMissingToGapOrSwitch = SevError | 0x0011;
|
||||
|
||||
static Error_ExcessHardware = (o:{form: string}) => m(this.ERROR_ExcessHardware,
|
||||
`layers form=${o.form}: Can only have one non-'touch' element`);
|
||||
static Error_ExcessHardware = (o:{formId: string}) => m(this.ERROR_ExcessHardware,
|
||||
`layers formId=${o.formId}: Can only have one non-'touch' element`);
|
||||
static ERROR_ExcessHardware = SevError | 0x0012;
|
||||
|
||||
static Error_InvalidHardware = (o:{form: string}) => m(this.ERROR_InvalidHardware,
|
||||
`layers has invalid value form=${o.form}`);
|
||||
static Error_InvalidHardware = (o:{formId: string}) => m(this.ERROR_InvalidHardware,
|
||||
`layers has invalid value formId=${o.formId}`);
|
||||
static ERROR_InvalidHardware = SevError | 0x0013;
|
||||
|
||||
static Error_InvalidModifier = (o:{layer: string, modifier: string}) => m(this.ERROR_InvalidModifier,
|
||||
`layer has invalid modifier='${o.modifier}' on layer id=${o.layer}`);
|
||||
static Error_InvalidModifier = (o:{layer: string, modifiers: string}) => m(this.ERROR_InvalidModifier,
|
||||
`layer has invalid modifiers='${o.modifiers}' on layer id=${o.layer}`);
|
||||
static ERROR_InvalidModifier = SevError | 0x0014;
|
||||
|
||||
static Error_MissingFlicks = (o:{flicks: string, id: string}) => m(this.ERROR_MissingFlicks,
|
||||
`key id=${o.id} refers to missing flicks=${o.flicks}`);
|
||||
static Error_MissingFlicks = (o:{flickId: string, id: string}) => m(this.ERROR_MissingFlicks,
|
||||
`key id=${o.id} refers to missing flickId=${o.flickId}`);
|
||||
static ERROR_MissingFlicks = SevError | 0x0015;
|
||||
|
||||
static Error_DuplicateVariable = (o:{ids: string}) => m(this.ERROR_DuplicateVariable,
|
||||
|
|
@ -140,8 +143,8 @@ export class CompilerMessages {
|
|||
m(this.ERROR_MissingMarkers, `Markers used for matching but not defined: ${o.ids?.join(',')}`);
|
||||
static ERROR_MissingMarkers = SevError | 0x0021;
|
||||
|
||||
static Error_DisplayNeedsToOrId = (o:{to?: string, id?: string}) =>
|
||||
m(this.ERROR_DisplayNeedsToOrId, `display ${CompilerMessages.toOrId(o)} needs to= or id=, but not both`);
|
||||
static Error_DisplayNeedsToOrId = (o:{output?: string, keyId?: string}) =>
|
||||
m(this.ERROR_DisplayNeedsToOrId, `display ${CompilerMessages.outputOrKeyId(o)} needs output= or keyId=, but not both`);
|
||||
static ERROR_DisplayNeedsToOrId = SevError | 0x0022;
|
||||
}
|
||||
|
||||
|
|
|
|||
|
|
@ -1,14 +1,12 @@
|
|||
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
||||
import { KMXPlus } from '@keymanapp/common-types';
|
||||
|
||||
import { isValidEnumValue } from "../util/util.js";
|
||||
import { CompilerMessages } from "./messages.js";
|
||||
import { SectionCompiler } from "./section-compiler.js";
|
||||
import semver from "semver";
|
||||
|
||||
import DependencySections = KMXPlus.DependencySections;
|
||||
import Meta = KMXPlus.Meta;
|
||||
import Meta_NormalizationForm = KMXPlus.Meta_NormalizationForm;
|
||||
import KeyboardSettings = KMXPlus.KeyboardSettings;
|
||||
|
||||
export class MetaCompiler extends SectionCompiler {
|
||||
|
|
@ -20,7 +18,7 @@ export class MetaCompiler extends SectionCompiler {
|
|||
public validate(): boolean {
|
||||
let valid = true;
|
||||
|
||||
valid &&= this.validateNormalization(this.keyboard3.info?.normalization);
|
||||
valid &&= this.validateNormalization(this.keyboard3.settings?.normalization);
|
||||
valid &&= this.validateVersion(this.keyboard3.version?.number);
|
||||
|
||||
return valid;
|
||||
|
|
@ -42,11 +40,8 @@ export class MetaCompiler extends SectionCompiler {
|
|||
}
|
||||
|
||||
private validateNormalization(normalization?: string) {
|
||||
if (normalization !== undefined) {
|
||||
if (!isValidEnumValue(Meta_NormalizationForm, normalization)) {
|
||||
this.callbacks.reportMessage(CompilerMessages.Error_InvalidNormalization({ form: normalization }));
|
||||
return false;
|
||||
}
|
||||
if (normalization === 'disabled') {
|
||||
this.callbacks.reportMessage(CompilerMessages.Hint_NormalizationDisabled());
|
||||
}
|
||||
return true;
|
||||
}
|
||||
|
|
@ -56,13 +51,11 @@ export class MetaCompiler extends SectionCompiler {
|
|||
result.author = sections.strs.allocString(this.keyboard3.info?.author);
|
||||
result.conform = sections.strs.allocString(this.keyboard3.conformsTo);
|
||||
result.layout = sections.strs.allocString(this.keyboard3.info?.layout);
|
||||
result.normalization = sections.strs.allocString(this.keyboard3.info?.normalization);
|
||||
result.name = sections.strs.allocString(this.keyboard3.info?.name);
|
||||
result.indicator = sections.strs.allocString(this.keyboard3.info?.indicator);
|
||||
result.version = sections.strs.allocString(this.keyboard3.version?.number ?? "0.0.0");
|
||||
result.settings =
|
||||
(this.keyboard3.settings?.fallback == "omit" ? KeyboardSettings.fallback : 0) |
|
||||
(this.keyboard3.settings?.transformFailure == "omit" ? KeyboardSettings.transformFailure : 0) |
|
||||
(this.keyboard3.settings?.transformPartial == "hide" ? KeyboardSettings.transformPartial : 0);
|
||||
(this.keyboard3.settings?.normalization == "disabled" ? KeyboardSettings.normalizationDisabled : 0);
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -26,7 +26,7 @@ export class KMXPlusMetadataCompiler {
|
|||
// TSS_NAME: User friendly name of keyboard
|
||||
keyboard.stores.push({
|
||||
dpName: '&NAME',
|
||||
dpString: kmxplus.name?.names?.[0]?.value ?? 'unknown', // Empty name should not happen, so ok to use 'unknown' here
|
||||
dpString: kmxplus.meta?.name?.value ?? 'unknown', // Empty name should not happen, so ok to use 'unknown' here
|
||||
dwSystemID: KMXFile.TSS_NAME
|
||||
});
|
||||
|
||||
|
|
@ -54,4 +54,4 @@ export class KMXPlusMetadataCompiler {
|
|||
});
|
||||
}
|
||||
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -1,25 +0,0 @@
|
|||
import { constants } from "@keymanapp/ldml-keyboard-constants";
|
||||
import { KMXPlus } from '@keymanapp/common-types';
|
||||
import { SectionCompiler } from "./section-compiler.js";
|
||||
|
||||
import DependencySections = KMXPlus.DependencySections;
|
||||
import Name = KMXPlus.Name;
|
||||
|
||||
export class NameCompiler extends SectionCompiler {
|
||||
|
||||
public get id() {
|
||||
return constants.section.name;
|
||||
}
|
||||
|
||||
public validate(): boolean {
|
||||
let valid = true;
|
||||
valid = (this.keyboard3.names?.name?.length ?? 0) > 0;
|
||||
return valid;
|
||||
}
|
||||
|
||||
public compile(sections: DependencySections): Name {
|
||||
let result = new Name();
|
||||
result.names = this.keyboard3.names?.name?.map(v => sections.strs.allocString(v.value)) ?? [];
|
||||
return result;
|
||||
}
|
||||
}
|
||||
|
|
@ -27,7 +27,7 @@ export class TouchLayoutCompiler {
|
|||
// TODO-LDML: consider consolidation with keys.ts?
|
||||
|
||||
let fileLayer: TouchLayout.TouchLayoutLayer = {
|
||||
id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.modifier),
|
||||
id: this.translateLayerIdToTouchLayoutLayerId(layer.id, layer.modifiers),
|
||||
row: []
|
||||
};
|
||||
|
||||
|
|
@ -45,7 +45,7 @@ export class TouchLayoutCompiler {
|
|||
if(keydef) {
|
||||
const fileKey: TouchLayout.TouchLayoutKey = {
|
||||
id: this.translateKeyIdentifierToTouch(keydef.id) as TouchLayout.TouchLayoutKeyId,
|
||||
text: keydef.to || '',
|
||||
text: keydef.output || '',
|
||||
// TODO-LDML: additional properties
|
||||
};
|
||||
fileRow.key.push(fileKey);
|
||||
|
|
@ -73,7 +73,6 @@ export class TouchLayoutCompiler {
|
|||
// rightalt | altR
|
||||
// rightalt-shift | altR shift
|
||||
//
|
||||
|
||||
const map = {
|
||||
none: 'default',
|
||||
shift: 'shift',
|
||||
|
|
@ -83,6 +82,10 @@ export class TouchLayoutCompiler {
|
|||
};
|
||||
|
||||
// canonicalize modifier string, alphabetical
|
||||
// TODO-LDML: need to support multiple here
|
||||
if (modifier && modifier.indexOf(',') !== -1) {
|
||||
throw Error(`Internal error: TODO-LDML: multiple modifiers ${modifier} not yet supported.`);
|
||||
}
|
||||
modifier = (modifier||'').split(/\b/).sort().join(' ').trim();
|
||||
|
||||
if(Object.hasOwn(map, modifier)) {
|
||||
|
|
|
|||
|
|
@ -15,9 +15,9 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
result.header.unicodeFont = {...VisualKeyboard.DEFAULT_KVK_FONT};
|
||||
|
||||
for(let layers of source.keyboard3.layers) {
|
||||
const hardware = layers.form;
|
||||
const { formId } = layers;
|
||||
for(let layer of layers.layer) {
|
||||
this.compileHardwareLayer(source, result, layer, hardware);
|
||||
this.compileHardwareLayer(source, result, layer, formId);
|
||||
}
|
||||
}
|
||||
return result;
|
||||
|
|
@ -56,7 +56,7 @@ export class LdmlKeyboardVisualKeyboardCompiler {
|
|||
vk.keys.push({
|
||||
flags: VisualKeyboard.VisualKeyboardKeyFlags.kvkkUnicode,
|
||||
shift: shift,
|
||||
text: keydef.to, // TODO-LDML: displays
|
||||
text: keydef.output, // TODO-LDML: displays
|
||||
vkey: keymap[y][x],
|
||||
});
|
||||
}
|
||||
|
|
|
|||
|
|
@ -32,12 +32,29 @@ export function calculateUniqueKeys(keys?: LDMLKeyboard.LKKey[]): LDMLKeyboard.L
|
|||
return uniqueKeys;
|
||||
}
|
||||
|
||||
/** Convert an array of keys to a hash */
|
||||
export function hashKeys(keys?: LDMLKeyboard.LKKey[]) : Map<string, LDMLKeyboard.LKKey> {
|
||||
const m = new Map<string, LDMLKeyboard.LKKey>();
|
||||
for (const k of keys ?? []) {
|
||||
m.set(k.id, k);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
export function hashFlicks(flicks?: LDMLKeyboard.LKFlick[]) : Map<string, LDMLKeyboard.LKFlick> {
|
||||
const m = new Map<string, LDMLKeyboard.LKFlick>();
|
||||
for (const k of flicks ?? []) {
|
||||
m.set(k.id, k);
|
||||
}
|
||||
return m;
|
||||
}
|
||||
|
||||
|
||||
/**
|
||||
*
|
||||
* @param layersList list of layers elements, from `keyboard?.layers`
|
||||
* @returns set of key IDs
|
||||
*/
|
||||
export function allUsedKeyIdsInLayers(layersList : LDMLKeyboard.LKLayers[] | null): Set<string> {
|
||||
export function allUsedKeyIdsInLayers(layersList?: LDMLKeyboard.LKLayers[]): Set<string> {
|
||||
const s = new Set<string>();
|
||||
if (layersList) {
|
||||
for (const layers of layersList || []) {
|
||||
|
|
@ -55,6 +72,45 @@ export function allUsedKeyIdsInLayers(layersList : LDMLKeyboard.LKLayers[] | nul
|
|||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Extract all of the key ids that this key refers to, not counting flicks
|
||||
* @returns map from the key id to a set of attribute names (such as `multiTapDefaultKeyId` etc.) used by that key.
|
||||
*/
|
||||
export function allUsedKeyIdsInKey(key : LDMLKeyboard.LKKey) : Map<string, string[]> {
|
||||
const m = new Map<string, string[]>();
|
||||
/** add one key */
|
||||
function addKey(keyId : string | undefined, attr: string) {
|
||||
if (!keyId) return;
|
||||
if (!m.has(keyId)) m.set(keyId,[]);
|
||||
m.get(keyId).push(attr);
|
||||
}
|
||||
/** add a set of keys */
|
||||
function addKeys(keyIds : string | undefined, attr: string) {
|
||||
if (!keyIds) return;
|
||||
for (const keyId of keyIds?.split(' ')) {
|
||||
addKey(keyId, attr);
|
||||
}
|
||||
}
|
||||
|
||||
const {longPressKeyIds, longPressDefaultKeyId, multiTapKeyIds} = key;
|
||||
|
||||
addKey(longPressDefaultKeyId, 'longPressDefaultKeyId');
|
||||
addKeys(longPressKeyIds, 'longPressKeyIds');
|
||||
addKeys(multiTapKeyIds, 'multiTapKeyIds');
|
||||
|
||||
return m;
|
||||
}
|
||||
|
||||
export function allUsedKeyIdsInFlick(flick? : LDMLKeyboard.LKFlick) : Set<string> {
|
||||
const s = new Set<string>();
|
||||
if(flick) {
|
||||
for (const {keyId} of flick.flickSegment) {
|
||||
s.add(keyId);
|
||||
}
|
||||
}
|
||||
return s;
|
||||
}
|
||||
|
||||
/**
|
||||
* Helper function for validating child elements. Written for the convenience of message passing functions.
|
||||
*
|
||||
|
|
@ -103,10 +159,14 @@ export function verifyValidAndUnique(
|
|||
* @returns modifier
|
||||
*/
|
||||
export function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer) : number {
|
||||
const { modifier } = layer;
|
||||
if (modifier) {
|
||||
const { modifiers } = layer;
|
||||
if (modifiers) {
|
||||
// TODO-LDML
|
||||
if (modifiers.indexOf(',') !== -1) {
|
||||
throw Error(`TODO-LDML #9838: ”,” in modifiers not supported yet.`);
|
||||
}
|
||||
let mod = constants.keys_mod_none;
|
||||
for (let str of modifier.split(' ')) {
|
||||
for (let str of modifiers.split(' ')) {
|
||||
const submod = constants.keys_mod_map.get(str);
|
||||
mod |= submod;
|
||||
}
|
||||
|
|
@ -122,9 +182,12 @@ export function translateLayerAttrToModifier(layer: LDMLKeyboard.LKLayer) : numb
|
|||
*/
|
||||
export function validModifier(modifier?: string) : boolean {
|
||||
if (!modifier) return true; // valid to have no modifier, == none
|
||||
for (let str of modifier.split(' ')) {
|
||||
if (!constants.keys_mod_map.has(str)) {
|
||||
return false;
|
||||
// TODO-LDML: enforce illegal combinations per spec.
|
||||
for (let sub of modifier.split(',')) {
|
||||
for (let str of sub.split(' ')) {
|
||||
if (!constants.keys_mod_map.has(str)) {
|
||||
return false;
|
||||
}
|
||||
}
|
||||
}
|
||||
return true;
|
||||
|
|
|
|||
|
|
@ -1 +1 @@
|
|||
if(typeof keyman === 'undefined') {console.error('Keyboard requires KeymanWeb 16.0 or later');} else {KeymanWeb.KR(new Keyboard_basic());}function Keyboard_basic() {this.KI="Keyboard_basic";this.KN={"value":"TestKbd"};this.KMINVER="16.0";this.KV={F: ' 1em "Arial"', K102: 0};this.KV.KLS={TODO_LDML: 2};this.KDU=1;this.KH="";this.KM=0;this.KBVER="1.0.0";this.KMBM=0;this.KVKL={"desktop":{"defaultHint":"none","layer":[{"id":"base","row":[{"id":"0","key":[{"id":"T_hmaqtugha","text":"ħ"},{"id":"T_that","text":"ថា"}]}]}],"displayUnderlying":false}};this.gs=function(t,e){return 0;};}
|
||||
if(typeof keyman === 'undefined') {console.error('Keyboard requires KeymanWeb 16.0 or later');} else {KeymanWeb.KR(new Keyboard_basic());}function Keyboard_basic() {this.KI="Keyboard_basic";this.KN="TestKbd";this.KMINVER="16.0";this.KV={F: ' 1em "Arial"', K102: 0};this.KV.KLS={TODO_LDML: 2};this.KDU=1;this.KH="";this.KM=0;this.KBVER="1.0.0";this.KMBM=0;this.KVKL={"desktop":{"defaultHint":"none","layer":[{"id":"base","row":[{"id":"0","key":[{"id":"T_hmaqtugha","text":"ħ"},{"id":"T_that","text":"ថា"}]}]}],"displayUnderlying":false}};this.gs=function(t,e){return 0;};}
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ if(typeof keyman === 'undefined') {
|
|||
}
|
||||
function Keyboard_basic() {
|
||||
this.KI="Keyboard_basic";
|
||||
this.KN={"value":"TestKbd"};
|
||||
this.KN="TestKbd";
|
||||
this.KMINVER="16.0";
|
||||
this.KV={F: ' 1em "Arial"', K102: 0};
|
||||
this.KV.KLS={
|
||||
|
|
|
|||
58
developer/src/kmc-ldml/test/fixtures/basic.txt
vendored
58
developer/src/kmc-ldml/test/fixtures/basic.txt
vendored
|
|
@ -122,9 +122,6 @@ block(sectitems)
|
|||
6d 65 74 61
|
||||
diff(sect,meta)
|
||||
|
||||
6e 61 6d 65
|
||||
diff(sect,name)
|
||||
|
||||
73 74 72 73
|
||||
diff(sect,strs)
|
||||
|
||||
|
|
@ -249,12 +246,32 @@ block(endelem)
|
|||
block(keys) # struct COMP_KMXPLUS_KEYS {
|
||||
6b 65 79 73 # KMX_DWORD header.ident; // 0000 Section name - keys
|
||||
sizeof(keys) # KMX_DWORD header.size; // 0004 Section length
|
||||
02 00 00 00 # KMX_DWORD keyCount
|
||||
04 00 00 00 # KMX_DWORD keyCount
|
||||
01 00 00 00 # KMX_DWORD flicksCount
|
||||
00 00 00 00 # KMX_DWORD flickCount
|
||||
02 00 00 00 # KMX_DWORD kmapCount; // 0008 number of kmap
|
||||
# keys
|
||||
# (#0000) hmaqtugha
|
||||
# (#0000) a
|
||||
61 00 00 00 # 'a'
|
||||
00 00 00 00 # KMX_DWORD flags = extend
|
||||
index(strNull,strA,2) # KMXPLUS_STR 'a' (key id)
|
||||
00 00 00 00 # KMXPLUS_STR switch
|
||||
0A 00 00 00 # KMX_DWORD width*10
|
||||
00 00 00 00 # TODO: index(listNull,listNull,4) # LIST longPress
|
||||
00 00 00 00 # STR longPressDefault
|
||||
00 00 00 00 # TODO: index(listNull,listNull,4) # LIST multiTap
|
||||
00 00 00 00 # flicks
|
||||
# (#0001) e
|
||||
65 00 00 00 # 'e'
|
||||
00 00 00 00 # KMX_DWORD flags = extend
|
||||
index(strNull,strElemBkspFrom2,2) # KMXPLUS_STR 'e' (key id)
|
||||
00 00 00 00 # KMXPLUS_STR switch
|
||||
0A 00 00 00 # KMX_DWORD width*10
|
||||
00 00 00 00 # TODO: index(listNull,listNull,4) # LIST longPress
|
||||
00 00 00 00 # STR longPressDefault
|
||||
00 00 00 00 # TODO: index(listNull,listNull,4) # LIST multiTap
|
||||
00 00 00 00 # flicks
|
||||
# (#0002) hmaqtugha
|
||||
27 01 00 00 # UTF-32 'U+0127'
|
||||
00 00 00 00 # KMX_DWORD (flags: none)
|
||||
index(strNull,strHmaqtugha,2) # KMXPLUS_STR 'hmaqtugha'
|
||||
|
|
@ -264,7 +281,7 @@ block(keys) # struct COMP_KMXPLUS_KEYS {
|
|||
00 00 00 00 # STR longPressDefault
|
||||
00 00 00 00 # TODO: index(listNull,listNull,4) # LIST multiTap
|
||||
00 00 00 00 # flicks 0
|
||||
# (#0001) that
|
||||
# (#0003) that
|
||||
index(strNull,strKeys,2) # KMXPLUS_STR 'U+0127'
|
||||
01 00 00 00 # KMX_DWORD flags = extend
|
||||
index(strNull,strThat,2) # KMXPLUS_STR 'hmaqtugha'
|
||||
|
|
@ -284,10 +301,19 @@ block(keys) # struct COMP_KMXPLUS_KEYS {
|
|||
#00 00 00 00 # LIST directions
|
||||
#00 00 00 01 # flags
|
||||
#00 00 00 00 # str: to
|
||||
# kmapdata:
|
||||
|
||||
31 00 00 00 00 00 00 00 01 00 00 00 # KMX_DWORD vkey, mod, key;
|
||||
c0 00 00 00 00 00 00 00 00 00 00 00 # KMX_DWORD vkey, mod, key;
|
||||
# kmapdata:
|
||||
# note that 'a' and 'e' are omitted, as they aren't on the layers (just from gestures)
|
||||
|
||||
# #0
|
||||
31 00 00 00 # KMX_DWORD vkey
|
||||
00 00 00 00 # KMX_DWORD modifiers (none)
|
||||
03 00 00 00 # KMX_DWORD key index (that)
|
||||
|
||||
# #1
|
||||
c0 00 00 00 # KMX_DWORD vkey
|
||||
00 00 00 00 # KMX_DWORD modifiers (none)
|
||||
02 00 00 00 # KMX_DWORD key index (hmaqtugha)
|
||||
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
|
@ -372,21 +398,11 @@ block(meta) # struct COMP_KMXPLUS_META {
|
|||
index(strNull,strAuthor,2) # KMXPLUS_STR author;
|
||||
index(strNull,strConformsTo,2) # KMXPLUS_STR conform;
|
||||
index(strNull,strLayout,2) # KMXPLUS_STR layout;
|
||||
index(strNull,strNorm,2) # KMXPLUS_STR normalization;
|
||||
index(strNull,strName,2) # KMXPLUS_STR name;
|
||||
index(strNull,strIndicator,2) # KMXPLUS_STR indicator;
|
||||
index(strNull,strVersion,2) # KMXPLUS_STR version;
|
||||
00 00 00 00 # KMX_DWORD settings;
|
||||
# };
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# store_targets_name
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
|
||||
block(name) # struct COMP_KMXPLUS_META {
|
||||
6e 61 6d 65 # KMX_DWORD header.ident; // 0000 Section name - name
|
||||
sizeof(name) # KMX_DWORD header.size; // 0004 Section length
|
||||
01 00 00 00 # KMX_DWORD count; // 0008 number of names
|
||||
index(strNull,strName,2) # KMXPLUS_STR name; // 000C+ name string entry = 'TestKbd'
|
||||
# };
|
||||
|
||||
# ----------------------------------------------------------------------------------------------------
|
||||
# strs
|
||||
|
|
@ -404,7 +420,6 @@ block(strs) # struct COMP_KMXPLUS_STRS {
|
|||
|
||||
diff(strs,strNull) sizeof(strNull,2)
|
||||
diff(strs,strVersion) sizeof(strVersion,2)
|
||||
diff(strs,strNorm) sizeof(strNorm,2)
|
||||
diff(strs,strName) sizeof(strName,2)
|
||||
diff(strs,strFromSet) sizeof(strFromSet,2)
|
||||
diff(strs,strUSet) sizeof(strUSet,2)
|
||||
|
|
@ -439,7 +454,6 @@ block(strs) # struct COMP_KMXPLUS_STRS {
|
|||
#str #00
|
||||
block(strNull) block(x) 00 00 # the zero-length string
|
||||
block(strVersion) 31 00 2e 00 30 00 2e 00 30 00 block(x) 00 00 # '1.0.0'
|
||||
block(strNorm) 4e 00 46 00 43 00 block(x) 00 00 # 'NFC'
|
||||
block(strName) 54 00 65 00 73 00 74 00 4b 00 62 00 64 00 block(x) 00 00 # 'TestKbd'
|
||||
block(strFromSet) 5B 00 5C 00 75 00 31 00 41 00 37 00 35 00 2D 00 5C 00 75 00 31 00 41 00 37 00 39 00 5D 00 block(x) 00 00 # [\u1a75-\u1a79]
|
||||
block(strUSet) 5b 00 61 00 62 00 63 00 5d 00 block(x) 00 00 # '[abc]'
|
||||
|
|
|
|||
17
developer/src/kmc-ldml/test/fixtures/basic.xml
vendored
17
developer/src/kmc-ldml/test/fixtures/basic.xml
vendored
|
|
@ -8,25 +8,22 @@
|
|||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="1.0.0" />
|
||||
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="TestKbd" />
|
||||
</names>
|
||||
<info author="srl295" indicator="🙀" layout="qwerty" name="TestKbd"/>
|
||||
|
||||
<displays>
|
||||
<!-- values chosen to reuse strings -->
|
||||
<display to="a" display="^" />
|
||||
<display id="e" display="^e" />
|
||||
<display output="a" display="^" />
|
||||
<display keyId="e" display="^e" />
|
||||
<displayOptions baseCharacter="e" />
|
||||
</displays>
|
||||
|
||||
<keys>
|
||||
<key id="hmaqtugha" to="ħ" longPress="a e" />
|
||||
<key id="that" to="ថា" />
|
||||
<!-- Note: implied keys here: 'a' and 'e' -->
|
||||
<key id="hmaqtugha" output="ħ" longPressKeyIds="a e" />
|
||||
<key id="that" output="ថា" />
|
||||
</keys>
|
||||
|
||||
<layers form="us" minDeviceWidth="123">
|
||||
<layers formId="us" minDeviceWidth="123">
|
||||
<layer id="base">
|
||||
<row keys="hmaqtugha that" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="bksp-minimal" />
|
||||
</names>
|
||||
<info name="bksp-minimal"/>
|
||||
|
||||
<keys />
|
||||
|
||||
|
|
|
|||
|
|
@ -2,13 +2,11 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-escaped" />
|
||||
</names>
|
||||
<info name="disp-escaped"/>
|
||||
|
||||
<displays>
|
||||
<display to="\u{66}" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display to="\u{65}" display="(e)"/>
|
||||
<display output="\u{66}" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display output="\u{65}" display="(e)"/>
|
||||
<displayOptions baseCharacter="\u{78}" />
|
||||
</displays>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,12 +2,10 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
<info name="disp-invalid"/>
|
||||
|
||||
<displays>
|
||||
<display to="e" id="e" display="(e)"/> <!-- both to and id -->
|
||||
<display output="e" keyId="e" display="(e)"/> <!-- both to and id -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
<info name="disp-invalid"/>
|
||||
|
||||
<displays>
|
||||
<display to="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display id="e" display="(e)"/>
|
||||
<display id="e" display="(e)"/> <!-- duplicate -->
|
||||
<display output="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display keyId="e" display="(e)"/>
|
||||
<display keyId="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
<info name="disp-invalid"/>
|
||||
|
||||
<displays>
|
||||
<display to="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display to="e" display="(e)"/>
|
||||
<display to="e" display="(e)"/> <!-- duplicate -->
|
||||
<display output="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display output="e" display="(e)"/>
|
||||
<display output="e" display="(e)"/> <!-- duplicate -->
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-invalid" />
|
||||
</names>
|
||||
<info name="disp-invalid"/>
|
||||
|
||||
<displays>
|
||||
<display display="(f)"/> <!-- Neither to nor id -->
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
<info name="disp-maximal"/>
|
||||
|
||||
<displays>
|
||||
<display id="g" display="(g)"/>
|
||||
<display to="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display to="${eee}" display="(${eee})"/>
|
||||
<display keyId="g" display="(g)"/>
|
||||
<display output="f" display="(f)"/> <!-- Note: in opposite lexical order, as the compiler will sort -->
|
||||
<display output="${eee}" display="(${eee})"/>
|
||||
<displayOptions baseCharacter="x" />
|
||||
</displays>
|
||||
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-minimal" />
|
||||
</names>
|
||||
<info name="disp-minimal"/>
|
||||
|
||||
<displays />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-maximal" />
|
||||
</names>
|
||||
<info name="disp-maximal"/>
|
||||
|
||||
<displays>
|
||||
<displayOptions baseCharacter="x" />
|
||||
|
|
|
|||
|
|
@ -2,11 +2,9 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="disp-typical" />
|
||||
</names>
|
||||
<info name="disp-typical"/>
|
||||
|
||||
<displays>
|
||||
<display to="\u{0300}" display="`" />
|
||||
<display output="\u{0300}" display="`" />
|
||||
</displays>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="finl-minimal" />
|
||||
</names>
|
||||
<info name="finl-minimal"/>
|
||||
|
||||
<keys />
|
||||
|
||||
|
|
|
|||
|
|
@ -2,29 +2,35 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-escaped" /> <!-- see maximal.xml -->
|
||||
</names>
|
||||
<info name="hardware-escaped" />
|
||||
|
||||
<keys>
|
||||
<key id="eee" output="\u{ea 0301}"/>
|
||||
<key id="a-acute" output="á" />
|
||||
<key id="e-acute" output="\u{00e9}" />
|
||||
<key id="i-acute" output="í" />
|
||||
<key id="a-umlaut" output="ä" />
|
||||
<key id="e-umlaut" output="\u{eb}" />
|
||||
<key id="i-umlaut" output="ï" />
|
||||
<key id="Q" gap="true" />
|
||||
<key id="W" switch="shift" />
|
||||
<key id="W" layerId="shift" />
|
||||
<!-- This key gets a bunch of other status -->
|
||||
<key id="q" flicks="flick0" to="\u{71}" longPress="á \u{00e9} í" longPressDefault="\u{e9}"
|
||||
multiTap="ä \u{eb} ï" transform="no" width="3.14159" />
|
||||
<key id="w" to="\u{77}" />
|
||||
<flicks id="flick0">
|
||||
<flick directions="nw se" to="ç" />
|
||||
<flick directions="ne sw" to="\u{ea 0301}" /> <!-- ế -->
|
||||
</flicks>
|
||||
<key id="q" flickId="flick0" output="\u{71}" longPressKeyIds="a-acute e-acute i-acute" longPressDefaultKeyId="e-acute"
|
||||
multiTapKeyIds="a-umlaut e-umlaut i-umlaut" width="3.14159" />
|
||||
<key id="w" output="\u{77}" />
|
||||
</keys>
|
||||
|
||||
<layers form="touch" minDeviceWidth="300">
|
||||
<flicks>
|
||||
<flick id="flick0">
|
||||
<flickSegment directions="nw se" keyId="c" />
|
||||
<flickSegment directions="ne sw" keyId="eee" /> <!-- ế -->
|
||||
</flick>
|
||||
</flicks>
|
||||
<layers formId="touch" minDeviceWidth="300">
|
||||
<layer id="base">
|
||||
<row keys="Q q W w" />
|
||||
</layer>
|
||||
</layers>
|
||||
<layers form="iso">
|
||||
<layers formId="iso">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="Q W" />
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-escaped2" />
|
||||
</names>
|
||||
<info name="keys-escaped2"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="\u{1faa6}" />
|
||||
<key id="grave" output="\u{1faa6}" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="grave" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,18 +2,16 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-gap-switch" />
|
||||
</names>
|
||||
<info name="hardware-gap-switch"/>
|
||||
|
||||
<keys>
|
||||
<key id="Q" gap="true" />
|
||||
<key id="W" switch="shift" />
|
||||
<key id="q" to="q" />
|
||||
<key id="w" to="w" />
|
||||
<key id="W" layerId="shift" />
|
||||
<key id="q" output="q" />
|
||||
<key id="w" output="w" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="Q W" />
|
||||
|
|
|
|||
|
|
@ -2,23 +2,21 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
<info name="hardware-minimal"/>
|
||||
|
||||
<keys>
|
||||
<key id="qqq" to="qqq" />
|
||||
<key id="www" to="www" />
|
||||
<key id="QQQ" to="QQQ" />
|
||||
<key id="WWW" to="WWW" />
|
||||
<key id="qqq" output="qqq" />
|
||||
<key id="www" output="www" />
|
||||
<key id="QQQ" output="QQQ" />
|
||||
<key id="WWW" output="WWW" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer id="base" modifier="none">
|
||||
<layers formId="us">
|
||||
<layer id="base" modifiers="none">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="qqq www" />
|
||||
</layer>
|
||||
<layer id="shift" modifier="shift">
|
||||
<layer id="shift" modifiers="shift">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="QQQ WWW" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
<info name="hardware-minimal"/>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
|
||||
</keys>
|
||||
|
||||
<layers form="iso">
|
||||
<layer id="base" modifier="none">
|
||||
<layers formId="iso">
|
||||
<layer id="base" modifiers="none">
|
||||
<row keys="grave 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p open-square close-square" />
|
||||
<row keys="a s d f g h j k l semi-colon apos" />
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-minimal" />
|
||||
</names>
|
||||
<info name="hardware-minimal"/>
|
||||
|
||||
<keys>
|
||||
<import base="cldr" path="techpreview/keys-Zyyy-punctuation.xml"/>
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layer id="base" modifier="none">
|
||||
<layers formId="us">
|
||||
<layer id="base" modifiers="none">
|
||||
<row keys="grave 1 2 3 4 5 6 7 8 9 0 hyphen equal" />
|
||||
<row keys="q w e r t y u i o p open-square close-square backslash" />
|
||||
<row keys="a s d f g h j k l semi-colon apos" />
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
<info name="keys-minimal"/>
|
||||
|
||||
<keys />
|
||||
|
||||
<layers form="us">
|
||||
<layer id="base" modifier="altR-shift"> <!-- invalid, should be "altR shift" -->
|
||||
<layers formId="us">
|
||||
<layer id="base" modifiers="altR-shift"> <!-- invalid, should be "altR shift" -->
|
||||
<row keys="a b c" />
|
||||
</layer>
|
||||
</layers>
|
||||
|
|
|
|||
|
|
@ -2,29 +2,27 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
<info name="keys-minimal"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="`" />
|
||||
<key id="one" to="1" />
|
||||
<key id="two" to="2" />
|
||||
<key id="three" to="3" />
|
||||
<key id="four" to="4" />
|
||||
<key id="five" to="5" />
|
||||
<key id="six" to="6" />
|
||||
<key id="seven" to="7" />
|
||||
<key id="eight" to="8" />
|
||||
<key id="nine" to="9" />
|
||||
<key id="zero" to="0" />
|
||||
<key id="ten" to="10" />
|
||||
<key id="eleven" to="11" />
|
||||
<key id="minus" to="-" />
|
||||
<key id="equal" to="=" />
|
||||
<key id="grave" output="`" />
|
||||
<key id="one" output="1" />
|
||||
<key id="two" output="2" />
|
||||
<key id="three" output="3" />
|
||||
<key id="four" output="4" />
|
||||
<key id="five" output="5" />
|
||||
<key id="six" output="6" />
|
||||
<key id="seven" output="7" />
|
||||
<key id="eight" output="8" />
|
||||
<key id="nine" output="9" />
|
||||
<key id="zero" output="0" />
|
||||
<key id="ten" output="10" />
|
||||
<key id="eleven" output="11" />
|
||||
<key id="minus" output="-" />
|
||||
<key id="equal" output="=" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="grave one two three four five six seven eight nine ten eleven minus equal" />
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
<info name="keys-minimal"/>
|
||||
|
||||
<keys>
|
||||
<key id="Q" to="qqq" />
|
||||
<key id="W" to="www" />
|
||||
<key id="Q" output="qqq" />
|
||||
<key id="W" output="www" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="Q W" />
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-attrs" />
|
||||
</names>
|
||||
<info name="hardware-missing-attrs"/>
|
||||
|
||||
<keys>
|
||||
<key id="Q" /> <!-- missing to, gap, and switch -->
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping `! -->
|
||||
<row keys="Q" />
|
||||
|
|
|
|||
|
|
@ -1,20 +1,18 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-missing-flick" />
|
||||
</names>
|
||||
<info name="hardware-missing-flick" />
|
||||
|
||||
<keys>
|
||||
<key id="Q" to="Q" flicks="an-undefined-flick-id"/>
|
||||
<key id="W" to="W" flicks="flick0" />
|
||||
<flicks id="flick0">
|
||||
<flick directions="nw se" to="ç" />
|
||||
</flicks>
|
||||
<key id="Q" output="Q" flickId="an-undefined-flick-id" />
|
||||
<key id="W" output="W" flickId="flick0" />
|
||||
</keys>
|
||||
|
||||
<layers form="iso">
|
||||
<flicks>
|
||||
<flick id="flick0">
|
||||
<flickSegment directions="nw se" keyId="c" />
|
||||
</flick>
|
||||
</flicks>
|
||||
<layers formId="iso">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="Q W" />
|
||||
|
|
|
|||
|
|
@ -2,15 +2,13 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
<info name="keys-minimal"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="🪦" />
|
||||
<key id="grave" output="🪦" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="foo" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,18 +2,22 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-markers" />
|
||||
</names>
|
||||
<info name="keys-markers"/>
|
||||
|
||||
<keys>
|
||||
<key id="ww" to="\m{w}" flicks="flickw" longPress="\m{w}" longPressDefault="\m{w}" multiTap="\m{w}" />
|
||||
<flicks id="flickw">
|
||||
<flick directions="nw" to="\m{w}" />
|
||||
</flicks>
|
||||
<key id="aa" output="\m{aa}" />
|
||||
<key id="bb" output="\m{bb}" />
|
||||
<key id="cc" output="\m{cc}" />
|
||||
<key id="dd" output="\m{dd}" />
|
||||
<key id="ww" output="\m{w}" flickId="flickw" longPressKeyIds="aa bb" longPressDefaultKeyId="bb" multiTapKeyIds="cc" />
|
||||
</keys>
|
||||
<flicks>
|
||||
<flick id="flickw">
|
||||
<flickSegment directions="nw" keyId="dd" />
|
||||
</flick>
|
||||
</flicks>
|
||||
|
||||
<layers form="iso">
|
||||
<layers formId="iso">
|
||||
<layer id="base">
|
||||
<row keys="ww" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,33 +2,45 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="hardware-gap-switch" />
|
||||
</names>
|
||||
<info name="hardware-gap-switch"/>
|
||||
|
||||
<keys>
|
||||
<key id="a-acute" output="á"/>
|
||||
<key id="e-acute" output="é"/>
|
||||
<key id="i-acute" output="í"/>
|
||||
|
||||
<key id="a-umlaut" output="ä"/>
|
||||
<key id="e-umlaut" output="ë"/>
|
||||
<key id="i-umlaut" output="ï"/>
|
||||
|
||||
<key id="c-cedilla" output="ç"/>
|
||||
<key id="e-caret" output="${ecaret}"/>
|
||||
|
||||
<key id="Q" gap="true" />
|
||||
<key id="W" switch="shift" />
|
||||
<key id="W" layerId="shift" />
|
||||
|
||||
<!-- This key gets a bunch of other status -->
|
||||
<key id="q" flicks="flick0" to="q" longPress="á é í" longPressDefault="é"
|
||||
multiTap="ä ë ï" transform="no" width="3.14159" />
|
||||
<key id="w" to="${www}" />
|
||||
<flicks id="flick0">
|
||||
<flick directions="nw se" to="ç" />
|
||||
<flick directions="ne sw" to="${ecaret}" />
|
||||
</flicks>
|
||||
<key id="q" flickId="flick0" output="q" longPressKeyIds="a-acute e-acute i-acute" longPressDefaultKeyId="e-acute"
|
||||
multiTapKeyIds="a-umlaut e-umlaut i-umlaut" width="3.14159" />
|
||||
<key id="w" output="${www}" />
|
||||
</keys>
|
||||
<layers form="touch" minDeviceWidth="300">
|
||||
<flicks>
|
||||
<flick id="flick0">
|
||||
<flickSegment directions="nw se" keyId="c-cedilla" />
|
||||
<flickSegment directions="ne sw" keyId="e-caret" />
|
||||
</flick>
|
||||
</flicks>
|
||||
<layers formId="touch" minDeviceWidth="300">
|
||||
<layer id="base">
|
||||
<row keys="Q q W w" />
|
||||
</layer>
|
||||
</layers>
|
||||
<layers form="iso">
|
||||
<layers formId="iso">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="Q W" />
|
||||
</layer>
|
||||
<layer id="shift" modifier="shift">
|
||||
<layer id="shift" modifiers="shift">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="q w" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="keys-minimal" />
|
||||
</names>
|
||||
<info name="keys-minimal"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="🪦" />
|
||||
<key id="mistake" to="oops" />
|
||||
<key id="grave" output="🪦" />
|
||||
<key id="mistake" output="oops" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="grave mistake" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-hint-custom-form" />
|
||||
</names>
|
||||
<info name="layr-hint-custom-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="one" to="1" />
|
||||
<key id="two" to="2" />
|
||||
<key id="three" to="3" />
|
||||
<key id="one" output="1" />
|
||||
<key id="two" output="2" />
|
||||
<key id="three" output="3" />
|
||||
</keys>
|
||||
<forms>
|
||||
<!-- this will emit a warning about custom scancodes -->
|
||||
|
|
@ -18,7 +16,7 @@
|
|||
<scanCodes codes="25 12 FF" />
|
||||
</form>
|
||||
</forms>
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="one two three" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-error-custom-form" />
|
||||
</names>
|
||||
<info name="layr-error-custom-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="one" to="1" />
|
||||
<key id="two" to="2" />
|
||||
<key id="three" to="3" />
|
||||
<key id="one" output="1" />
|
||||
<key id="two" output="2" />
|
||||
<key id="three" output="3" />
|
||||
</keys>
|
||||
<forms>
|
||||
<!-- warning, custom scancodes -->
|
||||
|
|
@ -18,7 +16,7 @@
|
|||
<scanCodes codes="25 12 FF" />
|
||||
</form>
|
||||
</forms>
|
||||
<layers form="zzz">
|
||||
<layers formId="zzz">
|
||||
<layer id="base">
|
||||
<row keys="one two three" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-invalid-form" />
|
||||
</names>
|
||||
<info name="layr-invalid-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="`" />
|
||||
<key id="one" to="1" />
|
||||
<key id="grave" output="`" />
|
||||
<key id="one" output="1" />
|
||||
</keys>
|
||||
|
||||
<layers form="holographic"> <!-- INVALID: 'holographic' is not a valid form. -->
|
||||
<layers formId="holographic"> <!-- INVALID: 'holographic' is not a valid form. -->
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="grave one" />
|
||||
|
|
|
|||
|
|
@ -2,16 +2,13 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-invalid-form" />
|
||||
</names>
|
||||
|
||||
<info name="layr-invalid-form"/>
|
||||
<keys>
|
||||
<key id="grave" to="`" />
|
||||
<key id="one" to="1" />
|
||||
<key id="grave" output="`" />
|
||||
<key id="one" output="1" />
|
||||
</keys>
|
||||
|
||||
<layers> <!-- INVALID: Missing 'form=' attribute -->
|
||||
<layers> <!-- INVALID: Missing 'formId=' attribute -->
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="grave one " />
|
||||
|
|
|
|||
|
|
@ -2,16 +2,14 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-invalid-form" />
|
||||
</names>
|
||||
<info name="layr-invalid-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="`" />
|
||||
<key id="one" to="1" />
|
||||
<key id="grave" output="`" />
|
||||
<key id="one" output="1" />
|
||||
</keys>
|
||||
|
||||
<layers form="touch">
|
||||
<layers formId="touch">
|
||||
<!-- INVALID: need at least one layer. -->
|
||||
</layers>
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-invalid-missing-layer2" />
|
||||
</names>
|
||||
<info name="layr-invalid-missing-layer2"/>
|
||||
|
||||
<keys />
|
||||
<!-- invalid: need a layer! -->
|
||||
|
|
|
|||
|
|
@ -2,23 +2,21 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-invalid-form" />
|
||||
</names>
|
||||
<info name="layr-invalid-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="grave" to="`" />
|
||||
<key id="one" to="1" />
|
||||
<key id="grave" output="`" />
|
||||
<key id="one" output="1" />
|
||||
</keys>
|
||||
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="grave one" />
|
||||
</layer>
|
||||
</layers>
|
||||
<!-- INVALID: can't have multiple 'hardware' layers -->
|
||||
<layers form="iso">
|
||||
<layers formId="iso">
|
||||
<layer id="base">
|
||||
<!-- beware: this is mapping ` and 1! -->
|
||||
<row keys="one grave" />
|
||||
|
|
|
|||
|
|
@ -2,14 +2,12 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-hint-custom-form" />
|
||||
</names>
|
||||
<info name="layr-hint-custom-form"/>
|
||||
|
||||
<keys>
|
||||
<key id="one" to="1" />
|
||||
<key id="two" to="2" />
|
||||
<key id="three" to="3" />
|
||||
<key id="one" output="1" />
|
||||
<key id="two" output="2" />
|
||||
<key id="three" output="3" />
|
||||
</keys>
|
||||
<forms>
|
||||
<!-- this will emit a warning about custom scancodes -->
|
||||
|
|
@ -18,7 +16,7 @@
|
|||
<scanCodes codes="25 12 15" />
|
||||
</form>
|
||||
</forms>
|
||||
<layers form="us">
|
||||
<layers formId="us">
|
||||
<layer id="base">
|
||||
<row keys="one two three" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,14 +2,11 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="und" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="layr-error-custom-form" />
|
||||
</names>
|
||||
|
||||
<info name="layr-error-custom-form"/>
|
||||
<keys>
|
||||
<key id="one" to="1" />
|
||||
<key id="two" to="2" />
|
||||
<key id="three" to="3" />
|
||||
<key id="one" output="1" />
|
||||
<key id="two" output="2" />
|
||||
<key id="three" output="3" />
|
||||
</keys>
|
||||
<forms>
|
||||
<!-- warning, custom scancodes -->
|
||||
|
|
@ -17,7 +14,7 @@
|
|||
<scanCodes codes="25 12 15" />
|
||||
</form>
|
||||
</forms>
|
||||
<layers form="zzz">
|
||||
<layers formId="zzz">
|
||||
<layer id="base">
|
||||
<row keys="one two three" />
|
||||
</layer>
|
||||
|
|
|
|||
|
|
@ -2,8 +2,6 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="en-*" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="invalid-loca" />
|
||||
</names>
|
||||
<info name="invalid-loca"/>
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="loca-minimal" />
|
||||
</names>
|
||||
<info name="loca-minimal"/>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -10,9 +10,7 @@
|
|||
<locale id="en-fonipa" />
|
||||
</locales>
|
||||
|
||||
<names>
|
||||
<name value="loca-multiple" />
|
||||
</names>
|
||||
<info name="loca-multiple"/>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="My First Keyboard" />
|
||||
</names>
|
||||
|
||||
<info name="meta-hint-normalization"/>
|
||||
<settings normalization="disabled" />
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
@ -1,12 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<info normalization="NFQ" />
|
||||
|
||||
<names>
|
||||
<name value="meta-minimal" />
|
||||
</names>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
@ -4,9 +4,7 @@
|
|||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="1.0" /> <!-- invalid because it's not "1.0.0" as required by semver -->
|
||||
|
||||
<names>
|
||||
<name value="meta-minimal" />
|
||||
</names>
|
||||
<info name="meta-minimal"/>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -4,9 +4,7 @@
|
|||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="v1.0.3" />
|
||||
|
||||
<names>
|
||||
<name value="meta-minimal" />
|
||||
</names>
|
||||
<info name="meta-minimal"/>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,16 +1,9 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<version number="1.2.3" />
|
||||
|
||||
<info author="The Keyman Team" indicator="QW" layout="QWIRKY" normalization="NFC" />
|
||||
|
||||
<names>
|
||||
<name value="meta-maximal" />
|
||||
</names>
|
||||
|
||||
<settings fallback="omit" />
|
||||
<info author="The Keyman Team" indicator="QW" layout="QWIRKY" name="meta-maximal" />
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="meta-minimal" />
|
||||
</names>
|
||||
<info name="meta-minimal"/>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
|
|||
|
|
@ -1,15 +0,0 @@
|
|||
<?xml version="1.0" encoding="UTF-8"?>
|
||||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="My Second Keyboard" />
|
||||
<name value="My 2nd Keyboard" />
|
||||
<!-- so these following names are really just a made up idea of how multiple names *could* be used -->
|
||||
<name value="win:kbd2" />
|
||||
<name value="mac:keybd_2" />
|
||||
<name value="web:keyboard-2" />
|
||||
</names>
|
||||
|
||||
<keys />
|
||||
</keyboard3>
|
||||
|
|
@ -2,9 +2,7 @@
|
|||
|
||||
<!DOCTYPE keyboard3 SYSTEM "../../../../../../../resources/standards-data/ldml-keyboards/techpreview/dtd/ldmlKeyboard3.dtd">
|
||||
<keyboard3 locale="mt" conformsTo="techpreview">
|
||||
<names>
|
||||
<name value="ordr-minimal" />
|
||||
</names>
|
||||
<info name="ordr-minimal"/>
|
||||
|
||||
<keys />
|
||||
|
||||
|
|
|
|||
Some files were not shown because too many files have changed in this diff Show more
Loading…
Add table
Reference in a new issue