Commit graph

5496 commits

Author SHA1 Message Date
Marc Durdin
cda7dc6d24 chore: remove deprecated "X-UA-Compatible" and "apple-mobile-web-app-capable" metas
For Keyman Developer Server, add app.webmanifest so that it can be saved
to the home screen; other pages should not require this.

Fixes: #16172
Test-bot: skip
2026-07-01 10:27:22 +02:00
Marc Durdin
647a9ebc98 fix(developer): prevent clone of legacy keyboards with no source
If a Keyman Cloud keyboard is legacy and has no source available, make
this more obvious to the author when they attempt to clone it. Add also
messages to help the author complete the other required steps to clone
a keyboard.

Fixes: #15606
Test-bot: skip
2026-06-22 17:17:18 +02:00
Eberhard Beilharz
c1113ac21d
chore(web): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Also change a few places that I missed.
2026-06-08 19:27:12 +02:00
Marc Durdin
bb66bf42f0
Merge branch 'chore/web-core-preflight' into chore/web-core-strip-core 2026-06-02 00:48:52 +10:00
Marc Durdin
fc82f28b2d chore(web): web-core preflight - strip core references
In order to maintain roughly the current build artifact size, strip out
the unfinished core integration from what we merge with preflight.

Test-bot: skip
Build-bot: release:android,ios,developer,web
2026-06-01 14:44:45 +02:00
Eberhard Beilharz
81bae574b9 maint(web): output name of TC reporter
This change outputs the name of the TC reporter used for a test. This
will help in troubleshooting.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:57:27 +02:00
Eberhard Beilharz
697e6972ee fix(web): further simplification
Turns out `end(result, true)` didn't actually do anything except calling
`end(result, true)` on each child, which resulted basically in a no-op.
Therefore this change removes the `force` parameter from `end()`.
2026-05-29 11:34:07 +02:00
Eberhard Beilharz
5dab671f22 fix(web): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-05-29 11:34:06 +02:00
Eberhard Beilharz
73a0dd5318 maint(web): fix Playwright TC reporter
Previously the loop at the beginning of `end` had an infinite loop
because the child was never removed from `childrenToVisit`. This change
refactors and fixes the loop.

Build-bot: skip build:web
Test-bot: skip
2026-05-29 11:34:05 +02:00
Marc Durdin
729c71d64d chore: minor cleanup prior to merge of web-core preflight
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-28 14:16:19 +02:00
Marc Durdin
6a98a39b8a
Merge branch 'master' into chore/web-core-preflight 2026-05-27 22:37:12 +10:00
Marc Durdin
6a71c1d07c
Merge pull request #15984 from keymanapp/fix/windows/15164-locale-missing-after-lang-switch
fix(windows): Ensure default locale always appears in list of locales
2026-05-22 22:42:05 +10:00
Marc Durdin
34d6eb89fa fix(windows): Ensure default locale always appears in list of locales
* Add `TKeymanPaths.KeymanLocalePath` for consistent access to locales
  folder, and update references.
* Remove the `SKDefaultLanguageCode` string and hard code the default
  language in CustomisationMessages.pas.
* Hide the test locale 'qqq' on release builds.

Fixes: #15164
2026-05-20 15:51:25 +02:00
Marc Durdin
94723ba556 chore(common): move common cpp files and remove unused files
* Move the following files from common/windows/cpp/include/ to
  common/include/:
  * keymanversion.h
  * vkeys.h

* Move the following file from common/windows/cpp/ to common/cpp/:
  * vkeys.cpp

* Move crc32.cpp,crc32.h into kmcmplib, as they are only used there.

* Remove unused ConvertUTF.c and ConvertUTF.h.

* Update references to the above files.

* Remove precompiled header refs from vkeys.cpp and change data type to
  `char*` for types in vkeys.cpp (unless `USE_CHAR16_T` is defined), so
  that it is more cross-platform accessible, update usages accordingly,
  fixup project definitions accordingly.

* Remove unused define `KMN_KBP_EXPORTING` from kmcmplib/meson.build.

Fixes: #15565
Test-bot: skip
2026-05-20 13:44:05 +02:00
Marc Durdin
593aa1448b chore: move to .localhost for local server URLs
Match website-local-proxy nginx server setup.

Test-bot: skip
2026-05-18 13:15:51 +02:00
Eberhard Beilharz
d93fc5aa7e
refactor(web): output id in console error of playwright TC reporter
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-17 10:05:33 +02:00
Keyman Server
94e1b26825
Merge branch 'epic/web-core' into auto/A19S26-merge-master-into-web-core 2026-04-13 15:47:18 +02:00
Marc Durdin
d97fb2c5bb fix(common): add missing default property to keyman-touch-layout.clean.spec.json
Matches property in keyman-touch-layout.spec.json. Update to version 2.1.2.

Test-bot: skip
See-also: keymanapp/api.keyman.com#338
2026-03-26 14:54:20 +01:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Marc Durdin
529a49431e maint(developer): make TestCompilerCallbacks usage more consistent and simplify
Simplify usage of `TestCompilerCallbacks` by making it responsible for
the `beforeEach` and `afterEach` incantations itself. There are a couple
of more complex usages of `TestCompilerCallbacks` which have been
excluded from this change on purpose.

Renamed `testCallbacks` to `callbacks` in the one place where it was
different.

Hoist @types/node and @types/mocha because inconsistent versions of
@types/mocha were causing compiler errors with this change.

Also added a cast to `fs.readFileSync` to `Uint8Array` to eliminate
compiler warnings/errors in test files.

Fixes: #15654
Test-bot: skip
2026-03-03 16:44:06 +01:00
Marc Durdin
9666227b48 chore(developer): add null guard to TframeCEFHost.SetFocus
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-03-02 14:04:00 +01:00
Marc Durdin
0bd6f59382 fix(developer): handle window already destroyed when closing editor
Fixes: #15617
Fixes: KEYMAN-DEVELOPER-1JD
Fixes: KEYMAN-DEVELOPER-36K
Fixes: KEYMAN-DEVELOPER-2P5
Test-bot: skip
2026-02-24 15:35:44 +01:00
Eberhard Beilharz
933361a520
feat(web): add and use RTL test keyboard
Build-bot: skip:all, build:web
Test-bot: skip
2026-01-29 14:52:56 +01:00
Eberhard Beilharz
485ea55800
chore(web): Merge remote-tracking branch 'origin/epic/web-core' into feat/web/15287_doModifierPress 2026-01-20 11:41:05 +01:00
Marc Durdin
f6b8bfb463
Merge branch 'epic/web-core' into auto/A19S20-merge-master-into-web-core 2026-01-16 08:40:12 +01:00
Eberhard Beilharz
b339a9772c
docs(common): improve documentation for .kmn test files
Build-bot: skip
Test-bot: skip
2026-01-14 18:16:57 +01:00
Eberhard Beilharz
08a94ad961
docs(web): document purpose of key codes > 50000
Build-bot: skip
Test-bot: skip
2026-01-09 11:05:20 +01:00
Eberhard Beilharz
afe6f467e3
Merge branch 'epic/web-core' into test/web/problem 2026-01-07 11:37:49 +01:00
Eberhard Beilharz
5666b4296e
Merge branch 'epic/web-core' into test/common/baseline 2026-01-06 18:54:37 +01:00
Eberhard Beilharz
65642ae2d4
Merge pull request #15341 from keymanapp/test/web/jsbaseline
test(web): add baseline tests for .js keyboards

This change adds baseline tests for .js keyboards. Several of those tests fail and so are skipped for now (#15342).

This test also includes the .js files of the baseline keyboards because they can't easily be generated on non-Windows platforms. This is similar to the .kmx files that are also included in the repo for the same reason.
2026-01-06 18:52:45 +01:00
Eberhard Beilharz
f65a752b47
test(web): address code review comments 2026-01-06 18:19:07 +01:00
Eberhard Beilharz
7447c49ede
chore(web): escape some additional values in TC service messages
See: https://www.jetbrains.com/help/teamcity/service-messages.html#Escaped+Values.

Follow-up-of: #15374
Build-bot: skip:all build:web
Test-bot: skip
2025-12-22 14:47:37 +01:00
Eberhard Beilharz
0dbbcc452e
maint(web): escape single quotes in TC service messages
This fixes a problem where TC shows an error because it can't find the
end of the service message for a failed test. Single quotes (and some
other characters) have to be escaped with `|'` inside of a message.

Build-bot: skip:all build:web
Test-bot: skip
2025-12-19 19:53:06 +01:00
Eberhard Beilharz
e6a6b75115
test(common): add new baseline test k_0202___alt.kmn
This is basically the same test as `k_0201___ralt_2.kmn` but uses
ALT instead of RALT in the rule.

Also update `k_0201___ralt_2.kmn` to be a bit more extensive.

Note: since the change in `k_0201___ralt_2.kmn` is only in the test
data, i.e. the comments, the .js and .kmx files don't change.

Related-to: #15358
Test-bot: skip
2025-12-16 16:52:13 +01:00
Eberhard Beilharz
6de40e903b
test(common): better group baseline tests
This change groups similar tests together. Also update `build.sh` to
compile .js files.

Follow-up-of: #15341
Test-bot: skip
2025-12-15 18:12:01 +01:00
Eberhard Beilharz
80c1f8864a
test(web): add baseline tests for .js keyboards
Test-bot: skip
2025-12-12 18:23:39 +01:00
Eberhard Beilharz
c87f29648b
Merge pull request #15278 from keymanapp/test/web/tcreporter 2025-12-09 20:04:27 +01:00
Eberhard Beilharz
8cea94dd8c
test(web): add TC reporter for Playwright tests
This adds a custom reporter used when building on TeamCity that outputs
the test results in a form that TeamCity can show them nicely.

Build-bot: skip:all build:web
Test-bot: skip
2025-12-05 19:16:27 +01:00
Marc Durdin
00e88d37a4 chore: Merge remote-tracking branch 'origin/epic/web-core' into auto/A19S17-merge-master-into-web-core 2025-12-05 08:07:35 +01:00
Marc Durdin
f813442c40
Merge pull request #15276 from keymanapp/revert-14799-change/windows/include-map2pdb-for-relevant-projects
change(windows): Revert "change(windows): include map2pdb generation for relevant Delphi projects"
2025-12-05 07:10:52 +01:00
Marc Durdin
6c99f33bcc
Revert "change(windows): include map2pdb generation for relevant Delphi projects" 2025-12-03 14:13:54 +01:00
Marc Durdin
94ac669ec1 maint(resources): verify order of builder_describe_internal_dependency
Test-bot: skip
2025-12-01 16:47:50 +01:00
Eberhard Beilharz
5320865f6c
Merge pull request #15169 from keymanapp/docs/web/todos 2025-11-21 11:16:06 +01:00
Marc Durdin
c2204e4dfc chore: Merge remote-tracking branch 'origin/epic/web-core' into auto/A19S16-merge-master-into-web-core
Test-bot: skip
Build-bot: skip build:web
2025-11-20 15:06:01 +01:00
Eberhard Beilharz
825573d8f1
docs(web): address code review comment 2025-11-18 15:26:10 +01:00
Marc Durdin
89597cf8a2
Merge pull request #15156 from keymanapp/fix/windows/handle-keyman-root-forward-slash
fix(windows): handle forward slash for KEYMAN_ROOT env var
2025-11-17 17:02:41 +01:00
Marc Durdin
274d0f836a
docs(web): update TODO-web-core after code review
Reviewed work remaining on web-core and updated TODOs accordingly; some
have been moved to epic/embed-osk-in-kmx.

Test-bot: skip
2025-11-14 15:23:56 +01:00
Marc Durdin
edca16f508 change(windows): include map2pdb generation for relevant Delphi projects
Adds a call to map2pdb for Delphi projects, if map2pdb is an executable
on the path. This way, we get .pdb files we can use for debugging and
for performance profiling. This also replaces tds2dbg.

If map2dbg is available, then the build and install actions will copy
the PDB to be alongside the corresponding executable, making most debug
actions relatively seamless for finding symbols.

Also fixes up setup.exe in Windows and Developer to extend setup.exe to
a 512-byte boundary after map2pdb patches the PE.

Relates-to: #14787
Build-bot: skip release:developer,windows
Test-bot: skip
2025-11-13 14:48:18 +01:00
Marc Durdin
7c9c21d260 fix(windows): handle exceptions when walking stack in exception handler
This change wraps the stack walk with an exception handler, which will
enable some crash handlers to continue. However, in some circumstances,
such as the stack captured below, it appears to be an unrecoverable
crash.

So, to mitigate this scenario, we also now only capture stack traces for
crashes that we know are serious -- the set of exception types listed in
the patch.

I experienced this issue on my machine after a Windows update; it is not
clear to me if this is related to the Windows update or if it is due to
my debugging environment for Keyman. The symptoms were that Keyman
Configuration would start up, but show just a blank white dialog, and a
few seconds later would abort. Observing process history showed that
kmshell.exe and kmbrowserhost.exe would both crash, with related call
stacks -- see below for a sample. These call stacks are coming out of
keyman32 calling OutputDebugString from DllMain, which may not be a safe
thing to do, because of the exception side-effect. A separate patch will
be submitted to address that - probably just removing any
OutputDebugString calls from DllMain paths.

In any case, this change adds robustness and should mitigate other
unexpected exceptions.

```
0:026> kb
 # ChildEBP RetAddr      Args to Child
00 08a1d4c8 750d6e3d     750d6e20 750bd307 04447396 ucrtbase!abort+0x31
01 08a1d4d0 750bd307     04447396 051caaa0 629f52f0 ucrtbase!_purecall+0x1d
02 08a1d508 62ab2914     0495e1c8 00000000 08a1d5fc ucrtbase!__crt_state_management::wrapped_invoke<int (__cdecl*)(void),int>+0x2a
03 08a1d528 62aba00e     0495e1c8 00000000 08a1d5fc dbghelp!SymbolDataSimpleImpl<1,3>::getData+0x24
04 08a1d580 62ac649d     0495e1c8 08a1d5fc 08a1da34 dbghelp!GetData::getSymData+0x6e
05 08a1d5dc 62ac3272     08a1d5fc 05497580 08a1da5c dbghelp!CPubByAddrTrav::get+0xad
06 08a1d948 62ac7340     08a1da00 08a1da34 08a1da5c dbghelp!findBetterSymbol+0x62
07 08a1da40 62ac87eb     08a1da5c 08a1da64 62a05ea0 dbghelp!CAllSymsByAddrTrav::getEnclosingSymbol+0x80
08 08a1da6c 62abfb10     00000001 00030ed1 05497580 dbghelp!CAllSymsByAddrTrav::init+0xeb
09 08a1da88 62a876e9     00000001 00030ed1 043e9008 dbghelp!CAllSymsByAddrTrav::FInit+0xa0
0a 08a1daac 62a87846     043e9008 00000001 00030ed1 dbghelp!CDiaSession::findSymbolByAddr+0x2a9
0b 08a1dadc 62a87899     043e9008 00031ed1 00000000 dbghelp!CDiaSession::findSymbolByRVA+0x76
0c 08a1db10 62aed8f0     043e9008 00031ed1 00000000 dbghelp!CDiaSession::findSymbolByRVAEx+0x39
0d 08a1dbac 62b1a980     533b1ed1 00000000 00000000 dbghelp!FindSymbolByVA+0x117
0e 08a1dc00 629ed8da     533b1ed1 00000000 93b94d79 dbghelp!diaGetFpoFromAddr+0x6c
0f 08a1dc4c 629ed647     533b1ed1 00000000 93b94dad dbghelp!LookupFunctionEntryX86+0x23d
10 08a1dc98 629ed4c7     ffffffff 533b1ed1 00000000 dbghelp!SymFunctionTableAccess64AccessRoutines+0x167
11 08a1dcb4 629ec7a1     ffffffff 533b1ed1 00000000 dbghelp!FunctionTableAccessRoutineLocal+0x17
12 08a1dcd8 629eba25     533b1ed1 00000000 08a1dd10 dbghelp!DbhStackServices::GetFunctionEntry+0x31
13 08a1dd58 629eb126     00000001 08a1de00 08a1eda0 dbghelp!DbsStackUnwinder::StaticAdjustForNoReturn+0x4a
14 08a1ddbc 629e8a76     08a1ddf8 08a1dea8 08a1dec8 dbghelp!DbsX86StackUnwinder::UnwindAndUpdateInternalContext+0x136
15 08a1deec 629e88b4     08a1eda0 00000005 05482908 dbghelp!DbsStackUnwinder::DoDbhUnwind+0x177
16 08a1df1c 629e87b8     08a1eda0 00000005 05482908 dbghelp!DbsStackUnwinder::DbhUnwind+0x58
17 08a1e038 629e867e     08a1eda0 08a1f000 00725a60 dbghelp!PickX86Walk+0x109
18 08a1ecf4 62af77c9     08a1eda0 08a1f000 00000000 dbghelp!DoUnwindStackFrameUsingServices+0xbb
19 08a1ed4c 62b3ad4b     0000014c ffffffff fffffffe dbghelp!StackWalk2+0x1c9
1a 08a1eebc 2c7667c4     0000014c ffffffff fffffffe dbghelp!StackWalk64+0x8b
WARNING: Stack unwind information not available. Following frames may be wrong.
1b 08a1f2cc 2c765ad4     00000000 04e57318 08a1f32c kmshell+0x3667c4
1c 08a1f2dc 7726369f     08a1f2f8 08a1f428 08a1f3d8 kmshell+0x365ad4
1d 08a1f32c 7725eb04     00000000 5338cc66 08a1fbac ntdll!RtlpCallVectoredHandlers+0xf8
1e 08a1f3c0 7726b66f     08a1f3d8 08a1f428 08a1f3d8 ntdll!RtlDispatchException+0x67
1f 08a1f3c0 753e5004     08a1f3d8 08a1f428 08a1f3d8 ntdll!KiUserExceptionDispatcher+0xf
20 08a1f8ec 754c7ab0     40010006 00000000 00000002 KERNELBASE!RaiseException+0x64
21 08a1fb54 533ab6a2     08a1fbac 5338cc66 08a1fe38 KERNELBASE!OutputDebugStringA+0x50
22 08a1fcb0 533b1ba3     53673110 5338cc66 08a1fe38 keyman32!_OutputThreadDebugString+0x42 [D:\Projects\keyman\app\windows\src\engine\keyman32\K32_DBG.CPP @ 291]
23 08a1fd18 533b1ed2     00000000 5338cc66 08a1fe38 keyman32!ReleaseKeyboards+0x13 [D:\Projects\keyman\app\windows\src\engine\keyman32\keyman32.cpp @ 841]
24 08a1fd70 533b1fad     00000000 5338cc66 08a1fe38 keyman32!UninitialiseProcess+0x22 [D:\Projects\keyman\app\windows\src\engine\keyman32\keyman32.cpp @ 160]
25 08a1fdcc 53431b12     53380000 00000003 00000000 keyman32!DllMain+0x5d [D:\Projects\keyman\app\windows\src\engine\keyman32\keyman32.cpp @ 143]
26 08a1fe10 53431cf0     53380000 00000003 00000000 keyman32!dllmain_dispatch+0xb2 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 281]
27 08a1fe24 77268ff6     53380000 00000003 00000000 keyman32!_DllMainCRTStartup+0x20 [D:\a\_work\1\s\src\vctools\crt\vcstartup\src\startup\dll_dllmain.cpp @ 334]
28 08a1fe44 772a0df3     5338cc66 53380000 00000003 ntdll!LdrxCallInitRoutine+0x16
29 08a1fe68 7722b11c     00000003 00000000 fb42ae4c ntdll!LdrpCallInitRoutineInternal+0x22
2a 08a1feb0 77229812     00000003 00000000 fb42af9c ntdll!LdrpCallInitRoutine+0xae
2b 08a1ff60 77261670     1138e500 00000000 052cbe98 ntdll!LdrShutdownThread+0x1b2
2c 08a1ff74 757c5d50     00000000 757c5d30 08a1ffdc ntdll!RtlExitUserThread+0x30
2d 08a1ff84 7725d6db     052cbe98 fb42af20 00000000 kernel32!BaseThreadInitThunk+0x20
2e 08a1ffdc 7725d661     ffffffff 772a4680 00000000 ntdll!__RtlUserThreadStart+0x2b
2f 08a1ffec 00000000     1138e500 052cbe98 00000000 ntdll!_RtlUserThreadStart+0x1b
```
2025-11-13 14:47:14 +01:00
Marc Durdin
5879f087c7 fix(windows): handle forward slash for KEYMAN_ROOT env var
Test-bot: skip
2025-11-13 14:45:23 +01:00