Keyman Engine 14.0 API changes
Windows
-
Keyman for Windows version numbers will be presented with only three components rather than four, matching other platforms. Executable files will continue to use Windows standard resource four-component versions.
-
BREAKING: Keyman Configuration now uses Chromium rather than Internet Explorer for its user interface. There may be Internet Explorer-specific code in older integrations that will need to be brought into standards compliance.
-
Keyman Engine for Windows now supports
IKeymanKeyboardsInstalled2,IKeymanKeyboardFile2,IKeymanPackagesInstalled2andIKeymanPackageFile2, all of which add a single new methodInstall2. This new method enables installation of a Keyman keyboard without a corresponding install of the input method for the default language, allowing for a single user step install of keyboard + specific language. This is the recommended way of installing keyboard languages for Keyman Engine for Windows 14.
iOS
-
Keyman Engine 14 requires linking with Sentry.framework.
-
The old
LanguageResourceprotocolhas been reworked, withAnyLanguageResourcetaking its place.LanguageResourcestill exists, but now uses anassociatedtype, which restricts its use in return types and some variable declarations.AnyLanguageResourceis equivalent for cases that don't rely upon the specific resource type, perfectly matching the original version of theprotocol.
-
New API:
ResourceDownloadManager.downloadPackage(withKey:from:withNotifications:completionBlock)- This function downloads a package from a known location and automatically
parses it (as with
KeymanPackage.parse), preparing it for installation or returning errors that arise during such attempts. - If the
completionBlockparameter's closure declares its first parameter as a specific type of package,downloadPackagewill perform error-handling should the package type not match.
- This function downloads a package from a known location and automatically
parses it (as with
-
New API:
ResourceFileManager.install(resourceWithID:from:)- Given a parsed/prepared package and the ID of a resource within it it, this function installs that resource within KeymanEngine.
- It will also examine the contents of the package for potential updates and perform them automatically.
-
The
KeymanPackageclass is now much more fully fleshed-out, providing many package-oriented properties and methods. -
The keyboard and lexical model download notifications (such as
KeyboardDownloadCompleted) have been removed in favor of package-oriented variants (such asPackageDownloadCompleted).- They generally return a
KeymanPackage.Keyidentifying the triggering package. - As the
Completedversion represents a successful download, it will instead provide the downloadedKeymanPackageinstance.
- They generally return a
-
User installation of new keyboards should utilize the new
KeyboardSearchViewController. -
KeymanPackage.parseno longer needs a completion block- The new version has been added that is explicitly synchronous and directly returns the old completion block's parameter.
- The old version is still in-place and functions as before - synchronously.
-
Similarly, multiple
ResourceFileManagermethods no longer need completion blocks, also directly returning the values they provided.- Exception:
promptPackageInstall, which is asynchronous due to user interaction. - Affects two
prepareKMPInstallversions andfinalizePackageInstall.
- Exception:
-
Manager:addKeyboardandaddLexicalModeldeprecated in favor of the newResourceFileManager.installvariantspreloadFilesalso deprecated in favor of KMP-based installation, which should also use the method listed above.
-
APIKeyboardRepositoryand related classes/protocols are now deprecated. -
APILexicalModelRepositoryand related classes/protocols have been removed. -
LanguageViewControllerandLanguageDetailViewController, both views previously used by users to install keyboards, have been removed. -
Note that applications using the KeymanEngine framework should consider use of the
Migrations.migrate(storage:)method, as the file organization scheme and file lookup patterns used internally by KeymanEngine have changed slightly.
Android
- BREAKING: Moved from API 19 to minimum API level 21 (Lollipop / Android 5.0) with corresponding Chromium minimum release M37.
-
BREAKING: Replaced Fabric/Crashlytics with Sentry for crash reporting
- build.gradle changes:
android { compileOptions { sourceCompatibility = JavaVersion.VERSION_1_8 targetCompatibility = JavaVersion.VERSION_1_8 } } dependencies { implementation 'io.sentry:sentry-android:2.0.1' } - BREAKING: Additional dependencies needed for 14.0
- androidx.preference:preferences:1.1.1. (Needed for Keyman Engine to update display language)
- BREAKING: Deprecated
KMManagerAPIs- KMManager.showLanguageList()
- Keyman Engine no longer uses cloud keyboard catalog, so
showLanguageList()no longer displays. (Embedded browser used to search for keyboards) (Updated) KMManager.KMKey_CustomKeyboard- "Custom" property for keyboards no longer tracked (no change to help.keyman.com)KMManager.KMKey_CustomModel- "Custom" property for lexical models no longer tracked (no change to help.keyman.com)addKeyboard- Deprecate syntax usingHashMap<string, string>. Replace with<Keyboard>
- BREAKING: Changed KMManager APIs
- [KMManager.getLatestKeyboardFileVersion()] - Syntax may change from
(String packageID, String keyboardID)to(String languageID, String keyboardID)
- [KMManager.getLatestKeyboardFileVersion()] - Syntax may change from
- Feature: Add
getDefaultKeyboard()andsetDefaultKeyboard() - Feature: Add action
GLOBE_KEY_ACTION_SHOW_SYSTEM_KEYBOARDSthat brings up Android input method picker (Updated) - Addition: Add
getLanguagePredictionPreferenceKey()andgetLanguageCorrectionPreferenceKey()but note they're intended only for Keyman for Android, not 3rd party apps. - Use keyboard / lexical model packages instead of standalone .js files
- Keyboards are now strictly installed from .kmp keyboard packages. 3rd party
apps should include their "default" keyboard and lexical model packages at
the project's
assets/level.KMManagerwill extract them intoassets/packages/andassets/models/respectively. (No longer append version string to .js keyboard file and manually copy toassets/cloud/folder) - build.gradle changes:
android { // Don't compress kmp files so they can be copied via AssetManager aaptOptions { noCompress "kmp" } } - Keyman Engine no longer includes
sil_euro_latinas a default installed keyboard.
- Keyboards are now strictly installed from .kmp keyboard packages. 3rd party
apps should include their "default" keyboard and lexical model packages at
the project's
Web
- BREAKING: Ceased support for Internet Explorer.
- BREAKING: No longer testing against legacy Edge.
- DEPRECATED: When language-specific wordbreaking is needed, custom lexical
models (dictionaries) should specify a core
wordbreakeralgorithm that can break all words in a string at once, rather than only the last word in a context.wordbreakwill still be useful when running under Keyman 12 and 13.- if
wordbreakis specified butwordbreakeris not, it will be incompatible with version 14.0's enhanced correction features.
- 14.0 brings significant enhancements to predictive text when models are able
to provide a way to efficiently "traverse" the lexicon.
- This is handled automatically for compiled wordlist-based models, even those compiled in previous versions of Keyman.
- Custom models (which are currently not possible to compile within Developer)
should refer to the new
LexiconTraversaltype specified within the@keymanapp/models-typespackage. Models must implement this type and the relatedLexicalModel.traverseFromRoot()to be compatible with these enhancements.



