Commit graph

5447 commits

Author SHA1 Message Date
Marc Durdin
a53a1593ec feat(common): add v19 sections to KMX+ in Core and Developer
The disp and layr sections have new v19 layouts, to support the Keyman
OSK requirements for epic/embed-osk-in-kmx. This supports writing the
new versions of these sections in Developer and loading them into Core,
doing transformations where necessary so that Core always works with v19
structures after load.

This does not implement the transformations required to support the OSK
APIs; that will be implemented in a follow-up PR. Nor is support for
writing the OSK data from source .kvks and .keyman-touch-layout
supported; this is just the scaffolding for supporting the structures in
the KMX+ data.

Test-bot: skip
2025-11-18 13:55:01 +01:00
Marc Durdin
fc0ff90684 refactor(developer): rename layr.lists to layr.forms
The name `form` better represents the semantic meaning of the
structure, and reduces confusion with the `list` section and other uses
of `list` in KMX+.

Test-bot: skip
2025-11-12 11:29:58 +01:00
Keyman Server
b7c93d9e37
Merge branch 'epic/embed-osk-in-kmx' into auto/A19S15-merge-master-into-embed-osk-in-kmx 2025-11-07 14:06:33 +01:00
Darcy Wong
36c1e47bed
Merge pull request #15053 from keymanapp/chore/common/test9469
chore(common): Consolidate test9469.js keyboard to `/common/test/keyboards/` 🚛
2025-11-06 13:24:47 +07:00
Darcy Wong
f908546969
Merge pull request #15034 from keymanapp/chore/common/platform-rules
chore(common): Consolidate platformtest.js keyboard to `/common/test/keyboards/` 🚛
2025-11-06 13:24:14 +07:00
Marc Durdin
85b46c3f2c
Merge pull request #15091 from keymanapp/chore/windows/new-timestamp-server
maint(windows): new timestamp server for test signing
2025-11-05 08:06:12 +01:00
Marc Durdin
e96cab6307 maint(windows): new timestamp server for test signing
Old timestamp servers are no longer working

Test-bot: skip
Build-bot: skip
2025-11-04 10:02:42 +01:00
Marc Durdin
23b5dca1b3 fix(developer): remove package version if FollowKeyboardVersion is set in Package Editor
To reduce confusion when 'Follow Keyboard Version' is set, clear the
cached package version data from UI and .kps source when saving the
package or making changes to it.

Fixes: #11892
Test-bot: skip
2025-11-03 10:54:44 +01:00
Marc Durdin
21c3a630bf chore(windows): upgrade VC++ projects to v143 (VS2022)
Test-bot: skip
Build-bot: skip release:developer,windows
2025-10-31 13:33:30 +01:00
Marc Durdin
9e1fe8e6de chore(windows): upgrade VC++ projects to v143 (VS2022)
Test-bot: skip
Build-bot: skip release:developer,windows
2025-10-30 16:31:45 +01:00
Darcy Wong
b566bcfaf4 fix(common): Set test9469 to Keyman 14 for build warnings 2025-10-30 15:39:19 +07:00
Darcy Wong
3872f57cbf fix(common): Update references to test9469 keyboard 2025-10-30 13:03:09 +07:00
Darcy Wong
66b5aeb614 chore(common): Move test9469 keyboard to common/test/keyboards/ 2025-10-30 11:56:07 +07:00
Marc Durdin
df212364a2 maint(resources): add repository record for all published packages
While not documented as such, it appears that the repository record is
required with trusted publishing of npm packages.

Test-bot: skip
Build-bot: skip
2025-10-29 14:35:31 +01:00
Marc Durdin
f2d4dff1f7
Merge pull request #14993 from keymanapp/feat/developer/add-targetversion-parameter
feat(developer): add targetVersion support to kmc and kmc-kmn 🔱
2025-10-29 11:04:12 +01:00
Darcy Wong
a45e7dccf7
Merge pull request #14989 from keymanapp/chore/common/consolidate-test-keyboards
chore(web,android): Consolidate chirality.js test keyboard to `/common/test/resources/keyboards/`
2025-10-29 06:42:40 +07:00
Marc Durdin
b08f18e029
Merge pull request #14991 from keymanapp/feat/developer/add-kmx-plus-version-header
feat(common): add version header to KMX+ Typescript modules 🔱
2025-10-28 14:27:44 +01:00
Marc Durdin
e6a3a31ce9
Merge pull request #14990 from keymanapp/refactor/common/consolidate-kmx-plus-header-struct
refactor(common): consolidate header struct to kmx-plus-file.ts 🔱
2025-10-28 14:27:35 +01:00
Darcy Wong
9b426a432a fix(common): Add keyboard description 2025-10-28 15:58:59 +07:00
Darcy Wong
66bf1c5f73 fix(common): Move source files to source/ 2025-10-28 14:11:17 +07:00
Darcy Wong
2e9dfec30c fix(common): Revert kpj changes 2025-10-28 13:33:22 +07:00
Darcy Wong
5bf5a5941f chore(common): Move platformtest to common/test/keyboards 2025-10-28 07:18:49 +07:00
Marc Durdin
ba411774f6 maint(resources): move NPM package publishing to GitHub Actions
Due to recent changes in NPM package publishing security requirements,
we have to move from TeamCity build to a GitHub Action to publish our
NPM packages, so we can take advantage of trusted publishing. This
change also consolidates and centralizes the npm publishing into
resources/build/ci/npm-publish.sh, which removes a lot of boilerplate
from each of the build.sh scripts, and ensures consistency.

Packages will be `npm pack`ed on PR and test builds, and published in
release builds.

Ref: https://docs.npmjs.com/trusted-publishers
Ref: https://github.blog/changelog/2025-09-29-strengthening-npm-security-important-changes-to-authentication-and-token-management/
Fixes: #14963
Test-bot: skip
Build-bot: release:developer
2025-10-27 16:31:55 +01:00
Keyman Server
87420e15c1
Merge branch 'epic/embed-osk-in-kmx' into chore/A19S14-merge-master-into-embed-osk-in-kmx 2025-10-24 11:14:03 +02:00
Marc Durdin
83b6247139
Update common/web/types/src/kmx/kmx.ts 2025-10-23 13:32:57 +02:00
Marc Durdin
e3fbe510e7
Merge branch 'feat/core/add-kmx-plus-version-header' into feat/developer/add-targetversion-parameter 2025-10-22 15:08:38 +02:00
Marc Durdin
0227b277f0
Merge branch 'refactor/common/consolidate-kmx-plus-header-struct' into feat/developer/add-kmx-plus-version-header 2025-10-22 15:08:22 +02:00
Marc Durdin
95a5bcc362
Merge branch 'epic/embed-osk-in-kmx' into refactor/common/consolidate-kmx-plus-header-struct 2025-10-22 15:08:07 +02:00
Marc Durdin
f16545380a docs(common): clarify usage of KMXPlus structures
Build-bot: skip
2025-10-22 14:32:30 +02:00
Marc Durdin
8d74d2c8a6 feat(developer): add targetVersion support to kmc and kmc-kmn
Make the target version parameter for kmc-ldml into a generic build
parameter, so we can use it for any compiler. Add support and tests
to kmc-kmn, kmcmplib, kmc-ldml, kmc.

Support not yet in place for lexical models, or packages. However,
packages will be picking up the min version from the embedded keyboards.
Lexical models need work on minimum version support before this can be
implemented there.
2025-10-22 05:48:24 +02:00
Darcy Wong
d0ea16b975 chore(web): Move chirality.js to common/test/resources/keyboards/ 2025-10-21 13:49:37 +07:00
Marc Durdin
693c741884 feat(common): add version header to KMX+ Typescript modules
Add support for header.version to KMX+ files, with differentiation
between v17 and v19 in the compiler, and associated tests. This does not
yet make the target version accessible to authors using `kmc`, but the
interfaces from `kmc-ldml` are available.

A v17 KMX+ file will have:
* comp_header.version = VERSION_17
* initial 'sect' section in KMX+ data
* no sect.header.version field in any section

A v19+ KMX+ file will have:
* comp_header.version = VERSION_19
* initial 'sec2' section in KMX+ data
* sect.header.version field for all sections
* each section 4 bytes larger to accommodate
* 'sec2' must have sect.header.version = KMXPlusVersion.Version19
* currently all other sections have sect.header.version = Version17
2025-10-17 11:23:09 +02:00
Marc Durdin
b4bb07ecc4 refactor(common): consolidate header struct to kmx-plus-file.ts
Consolidate the header structure in KMX+ to make it easier to add a
version value to the header for v19+ KMX+ files; also DRYs out the
header definitions a little.
2025-10-17 08:46:53 +02:00
Marc Durdin
1f8c6fbf58
Merge branch 'epic/embed-osk-in-kmx' into feat/common/add-osk-embed-support-to-kmx-plus 2025-10-16 12:46:07 +02:00
Marc Durdin
bcafb34f42 chore(common): add .model_info schema
Add the v2.0 .model_info schema file, from api.keyman.com. Does not add
the schema to list of compiled schemas in common/types; this can be done
on an as-needed basis.

Test-bot: skip
Build-bot: skip
2025-10-16 08:24:57 +02:00
Marc Durdin
9406e16294 refactor(common): split KMX+ binary format from in-memory representation
Split kmx-plus.ts into two files, so that the in-memory parsed
representation of the file can be maintained separately from the binary
structures, which need to maintain version metadata.

This refactor makes no functional changes.

Test-bot: skip
Build-bot: build
2025-10-15 10:21:17 +02:00
Marc Durdin
fd17bb5f81
Merge pull request #14869 from keymanapp/feat/common/kmx-plus-osk-flag-in-header
feat(common): add KF_KMXPLUSOSK and VERSION_190 to kmx_file.h 🔱
2025-10-13 14:43:54 +02:00
Marc Durdin
9358deedd8
Merge pull request #14947 from keymanapp/refactor/windows/consolidate-mc_kmxfile.h
refactor(windows): consolidate mc_kmxfile.h 🔱
2025-10-13 14:40:39 +02:00
Marc Durdin
e4a2aa70d3
Merge pull request #14866 from keymanapp/refactor/windows/consolidate-legacy_kmx_file.h
refactor(windows): consolidate legacy_kmx_file.h into kmx_file.h 🔱
2025-10-13 13:35:18 +02:00
Marc Durdin
50ffbb2722 fix(windows): osk: handle simulated left Control event when AltGr pressed
When a European layout is active, and the user presses AltGr, Windows
generates a simulated VK_LCONTROL event alongside the VK_RMENU event.
This was causing the OSK to show LCtrl as depressed alongside RAlt, so
the OSK would show the wrong modifier layer, which was unhelpful and
confusing to the end user.

It is possible to detect the simulated VK_LCONTROL in the WH_KEYBOARD_LL
hook, because the scan code generated is 0x21D, instead of 0x1D.
Warning: this is not a documented value. (But, this 0x21D scan code is
not passed to the WM_KEYDOWN event!) Therefore, we use Keyman's existing
kmnLowLevelKeyboardProc to pass modifier key events on to the visual
keyboard.

This patch handles only this specific scenario, by watching for that
specific scan code in the new handler in the UfrmOSKOnScreenKeyboard
module, together with some minor refactoring so that it fits neatly.

A future improvement would be to have all modifier key processing go
through this new handler, and eliminate the timer-based polling of the
keyboard. However, there is some additional risk around missing events,
leading to 'stuck modifiers'.

Fixes: #14890
Build-bot: skip release:windows
2025-10-08 14:32:40 +02:00
Eberhard Beilharz
229bdf8270
maint(resources): nest unit tests under parent block
This adds a modified `mocha-teamcity-reporter` that allows to nest the
unit tests under the parent block.

Fixes: #14839
Test-bot: skip
2025-10-06 16:09:47 +02:00
Marc Durdin
c17ea6722a docs(common): make KF_KMXPLUSOSK flag independent of KF_KMXPLUS 2025-10-02 13:24:43 +02:00
Eberhard Beilharz
34c43b1e15
refactor(web): cleanup in test scripts
Also use common function for running web types tests.

Test-bot: skip
2025-09-30 17:40:15 +02:00
Marc Durdin
49846fea2d feat(common): add KF_KMXPLUSOSK and VERSION_190 to kmx_file.h
Add version 19.0 flags and metadata relating to embed-osk-in-kmx to
kmx_file.h and corresponding headers for other languages.

Test-bot: skip
2025-09-30 14:51:40 +02:00
Marc Durdin
31c8f09155 refactor(windows): consolidate mc_kmxfile.h
Use legacy_kmx_memory.h instead of mc_kmxfile.h for mcompile. Removing
the unused 'hbitmap' and replacing with the binary file dword data.

Test-bot: skip
2025-09-30 14:35:02 +02:00
Marc Durdin
3be434aa65 refactor(windows): consolidate legacy_kmx_file.h into kmx_file.h
These two files were largely the same, with legacy_kmx_file.h trailing
kmx_file.h in features. The primary difference was that
legacy_kmx_file.h still had Windows-specific types, but the types in
km_types.h made this a drop-in replacement.

Test-bot: skip
2025-09-30 14:13:11 +02:00
Marc Durdin
39b4d630dd docs(windows): add documentation for localization functions
Build-bot: skip
2025-09-25 09:46:24 +02:00
Marc Durdin
ad9ab53c72 feat(windows): improve startup time by caching locale names
This was flagged years ago as a potential performance hotspot: each
locale is loaded at process start for any kmcomapi-involved process,
which takes quite a long time. This refactor moves the locale
enumeration out of kmcomapi and into the build process, so we have a
static list of locales put into locale/index.xml.

This includes a minor breaking change to Keyman Engine API on Windows:
`MessageFromID(id, locale)` now only allows the three ids
SKUILanguageName, SKUILanguageNameWithEnglish, and SKLanguageCode, for
performance reasons. At this point, only SKUILanguageNameWithEnglish is
actually used anywhere in Keyman, and it is unlikely that any other
consumers are requesting alternate IDs.

Fixes: #14787
Build-bot: skip release:windows
2025-09-19 14:11:37 +02:00
Marc Durdin
fa5278a361 fix(developer): transform slashes to backslashes in paths in Package Editor
When loading package files generated by kmc or edited on non-Windows
systems, the Package Editor will now convert any forward slashes in the
path to backslashes. This is necessary because the path manipulation
functions in Keyman Developer work only with backslashes.

Fixes: #14719
Build-bot: skip release:developer
2025-09-10 14:58:13 +02:00
Marc Durdin
00b98f2286 fix(windows): emit nunit report path correctly and update TeamCity links
* Windows and Developer sources
* Fixes the report path to be fully qualified
* Adds the TeamCity report logger to remaining DUnitX automated tests

Fixes: #14197
Build-bot: skip build:windows,developer
Test-bot: skip
2025-08-20 07:21:03 +02:00