Open ermshiperete opened 1 week ago
The .kmx loader should detect at load time if first bytes are KXTS and treat it as kmx, otherwise eval() as a script.
I don't think we want to do sniffing and eval as script. The pathway for loading a .js keyboard right now is injecting as a <script>
element. The new pathway will take a blob from a source tbd and should just reject it if it doesn't start with the KMX magic bytes KXTS.
Introduction
Currently Keyman Core is only used on the desktop platforms (Windows, Mac, Linux). Keyman Core supports KMN as well as LDML keyboards.
Keyman Engine for Web has a separate implementation that only supports KMN based keyboards. This is also used by Keyman for Android and Keyman for iOS.
Keyman Engine for Web currently doesn't use the .kmx keyboard files but .js files that get generated by
kmc
as well.Keyman Core doesn't deal with touch and OSK aspects of a keyboard.
LDML keyboards use an enhanced version of KMX (KMX+).
We would like to integrate Keyman Core in Keyman Engine for Web.
Architecture
Implementation
Refactorings/Cleanup in Keyman Engine for Web
gesture-recognizer
,input-processor
,keyboard-processor
fromcommon
toweb/src
(do we still need{input,keyboard}-processor
in the future or will this be replaced by Core?)KeymanEngine.core
toKeymanEngine.inputProcessor
keyboardCache
tokeyboardStore
(andStubAndKeyboardCache
toStubAndKeyboardStore
?)Changes required to Keyman Engine for Web
nothingDeletable
- make sure LDML's return is understood by the K_BKSP fixup codeKeyboardHarness
(orKeyboardInterface
, or in-between) for LDMLKeyboardHarness
->AbstractKeyboardInterface
->KeyboardInterface
CoreKeyboardInterface
KeyboardProcessor
needs to know when to loadCoreKeyboardInterface
KeyboardProcessor.activeKeyboard
called by another layer.kmx
instead of a.js
KMX Loader
Keyman Engine for Web will load .kmx files instead of .js. The .kmx loader should detect at load time if first bytes are
KXTS
and treat it as kmx, otherwisereject it and it will be loaded by the existing .js loader.eval()
as a scriptChanges required to Core API
layerId
Related issues and discussions