diff --git a/web/src/engine/src/core-processor/coreKeyboardInterface.ts b/web/src/engine/src/core-processor/coreKeyboardInterface.ts index f2203e53ad..fbee9956e5 100644 --- a/web/src/engine/src/core-processor/coreKeyboardInterface.ts +++ b/web/src/engine/src/core-processor/coreKeyboardInterface.ts @@ -1,9 +1,8 @@ /* * Keyman is copyright (C) SIL Global. MIT License. */ -import { KM_Core, km_core_option_item, KM_CORE_OPTION_SCOPE } from 'keyman/engine/core-adapter'; +import { KM_Core, km_core_option_item } from 'keyman/engine/core-adapter'; import { KeyboardMinimalInterface, Keyboard, VariableStoreSerializer, KMXKeyboard } from 'keyman/engine/keyboard'; -import { toPrefixedKeyboardId } from 'keyman/engine/keyboard-storage'; export class CoreKeyboardInterface implements KeyboardMinimalInterface { private _activeKeyboard: Keyboard; @@ -26,8 +25,11 @@ export class CoreKeyboardInterface implements KeyboardMinimalInterface { private loadSerializedOptions(keyboard: Keyboard): km_core_option_item[] { - const stores = this.variableStoreSerializer.findStores(toPrefixedKeyboardId(keyboard.id)); + // TODO-WEB-CORE: use km_core_keyboard_get_attrs to get list of all variable + // store names and then iterate through those rather than reading from + // cookie props const options: km_core_option_item[] = []; + /*const stores = this.variableStoreSerializer.findStores(toPrefixedKeyboardId(keyboard.id)); for (const store of stores) { for (const key in store) { if (store.hasOwnProperty(key)) { @@ -39,7 +41,7 @@ export class CoreKeyboardInterface implements KeyboardMinimalInterface { options.push(item); } } - } + }*/ return options; } } diff --git a/web/src/engine/src/core-processor/coreKeyboardProcessor.ts b/web/src/engine/src/core-processor/coreKeyboardProcessor.ts index 968c66d7d5..429a83f5ed 100644 --- a/web/src/engine/src/core-processor/coreKeyboardProcessor.ts +++ b/web/src/engine/src/core-processor/coreKeyboardProcessor.ts @@ -11,7 +11,6 @@ import { StateKeyMap, Deadkey, Codes, - VariableStore, VariableStoreSerializer } from "keyman/engine/keyboard"; import { KM_CORE_EVENT_FLAG, KM_CORE_OPTION_SCOPE } from '../core-adapter/KM_Core.js'; @@ -316,9 +315,7 @@ export class CoreKeyboardProcessor extends EventEmitter implements Key console.error(`Unsupported option scope: ${option.scope}`); continue; } - const valueObj: VariableStore = {}; - valueObj[option.key] = option.value; - this.keyboardInterface.variableStoreSerializer.saveStore(toPrefixedKeyboardId(this.activeKeyboard.id), option.key, valueObj); + this.keyboardInterface.variableStoreSerializer.saveStore(toPrefixedKeyboardId(this.activeKeyboard.id), option.key, option.value); } } }