keyman
keyman copied to clipboard
bug(developer): kmc does not support `<key gap>` or implied keys 🙀
Three ldml keyboards that fail to compile. Will be attached to PR
Looks like the issues are:
keys withoutto=are not supported, which means gaps and switches are not supported.- the default keys
<key id="a" to="a"/>are not supported and must be put in explicitly
trying this patch out… basically, making the 'gap' etc be a 0-length string
diff --git a/common/web/types/src/kvk/kvk-file-writer.ts b/common/web/types/src/kvk/kvk-file-writer.ts
index 78a484284..701b538b4 100644
--- a/common/web/types/src/kvk/kvk-file-writer.ts
+++ b/common/web/types/src/kvk/kvk-file-writer.ts
@@ -50,7 +50,11 @@ export default class KvkFileWriter {
text: { len: 0, str: '' },
bitmap: 0
};
- this.setString(binaryKey.text, sourceKey.text);
+ if (sourceKey.text) {
+ this.setString(binaryKey.text, sourceKey.text);
+ } else {
+ this.setString(binaryKey.text, '');
+ }
binary.keys.push(binaryKey);
}
actually one of the issues, elsewhere, was a non-gap key with no to (oops)
<key id="space" width="5" />
so perhaps on !sourceKey.text it should check if it's a gap, etc. and fail if to is missing AND it's not a gap or switch.
gap is coming in in #7630 implied keys will be imports and will come in in #7534