diff --git a/common/web/types/src/kvk/kvk-file-writer.ts b/common/web/types/src/kvk/kvk-file-writer.ts index a9845c0d853..6b7d2831564 100644 --- a/common/web/types/src/kvk/kvk-file-writer.ts +++ b/common/web/types/src/kvk/kvk-file-writer.ts @@ -29,33 +29,33 @@ export default class KvkFileWriter { header: { identifier: BUILDER_KVK_HEADER_IDENTIFIER, version: BUILDER_KVK_HEADER_VERSION, - associatedKeyboard: {len:0,str:''}, + associatedKeyboard: {len:1,str:''}, flags: source.header.flags, ansiFont:{ color: VISUAL_KEYBOARD_TEXT_COLOR, size: source.header.ansiFont.size, - name: {len:0,str:''} + name: {len:1,str:''} }, unicodeFont:{ color: VISUAL_KEYBOARD_TEXT_COLOR, size: source.header.unicodeFont.size, - name: {len:0,str:''} + name: {len:1,str:''} }, }, keyCount: source.keys.length, keys:[] }; - this.setString(binary.header.associatedKeyboard, source.header.associatedKeyboard); - this.setString(binary.header.ansiFont.name, source.header.ansiFont.name); - this.setString(binary.header.unicodeFont.name, source.header.unicodeFont.name); + this.setString(binary.header.associatedKeyboard, source.header.associatedKeyboard || ''); + this.setString(binary.header.ansiFont.name, source.header.ansiFont.name || ''); + this.setString(binary.header.unicodeFont.name, source.header.unicodeFont.name || ''); for(let sourceKey of source.keys) { const binaryKey: BUILDER_KVK_KEY = { flags: sourceKey.flags, vkey: sourceKey.vkey, shift: sourceKey.shift, - text: { len: 0, str: '' }, + text: { len: 1, str: '' }, bitmapSize: sourceKey.bitmap ? sourceKey.bitmap.byteLength : 0, bitmapData: sourceKey.bitmap ? Array.from(sourceKey.bitmap) : [] }; diff --git a/common/web/types/tests/kvk/kvk-file-writer.tests.ts b/common/web/types/tests/kvk/kvk-file-writer.tests.ts index b579446cf62..4553123199c 100644 --- a/common/web/types/tests/kvk/kvk-file-writer.tests.ts +++ b/common/web/types/tests/kvk/kvk-file-writer.tests.ts @@ -68,7 +68,7 @@ describe('Test of KVK-File-Writer', () => { const binary: BUILDER_KVK_FILE = writer['build'](vk); checkBuilderKvkFile(binary, vk); }); - it.skip('can handle a null associatedKeyboard', () => { + it('can handle a null associatedKeyboard', () => { const vk_associatedKeyboard: string = null; const vk = initVisualKeyboard([ initVisualKeyboardKey(0), @@ -86,7 +86,7 @@ describe('Test of KVK-File-Writer', () => { const binary: BUILDER_KVK_FILE = writer['build'](vk); checkBuilderKvkFile(binary, vk); }); - it.skip('can handle a null ansiFont name', () => { + it('can handle a null ansiFont name', () => { const vk_ansiFont_name: string = null; const vk = initVisualKeyboard([ initVisualKeyboardKey(0), @@ -104,7 +104,7 @@ describe('Test of KVK-File-Writer', () => { const binary: BUILDER_KVK_FILE = writer['build'](vk); checkBuilderKvkFile(binary, vk); }); - it.skip('can handle a null unicodeFont name', () => { + it('can handle a null unicodeFont name', () => { const vk_unicodeFont_name: string = null; const vk = initVisualKeyboard([ initVisualKeyboardKey(0),