Commit graph

786 commits

Author SHA1 Message Date
Marc Durdin
6b77c4fd91 fix(windows): set default locale correctly
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-21 11:17:25 +02: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
rc-swag
c3e8d648c7 chore: Merge branch 'master' into chore/merge-master-to-epic-win-arm 2025-12-18 15:45:55 +10:00
Marc Durdin
930ae121c4 feat(windows): report a sentry event when low level hook is reinstalled
Reports also on errors during install / uninstall of the low level hook.

Fixes: #15218
Test-bot: skip
2025-12-10 08:27:12 +00:00
Marc Durdin
d7f21e80ec chore: Merge remote-tracking branch 'origin/epic/win-arm' into auto/A19S17-merge-master-into-win-arm
Significant conflict resolution fixes required to:
*	windows/src/engine/keyman32/build.sh
*	windows/src/engine/keyman32/keyman-engine.vcxproj
*	windows/src/engine/keyman32/keyman32.vcxproj
*	windows/src/engine/keyman32/keyman32.vcxproj.filters
*	windows/src/engine/keyman32/tests/keyman32.tests.vcxproj
2025-12-05 10:16:37 +01:00
rc-swag
ad34a44c9f chore(windows): Merge branch 'epic/win-arm' into feat/windows/11905/keymanx64-keymanarm64 2025-11-21 18:36:13 +10:00
Marc Durdin
ef64af0155
Merge branch 'master' into fix/windows/8064-low-level-hook-watch-dog 2025-11-17 17:07:23 +01:00
Marc Durdin
711541be60 fix(windows): reinstall low level keyboard hook if it gets removed
This change improves the stability of Keyman for Windows by monitoring
the health of the low level keyboard hook. If keyman.exe is unresponsive
at any time, Windows can silently uninstall its low level keyboard hook,
which results in (at least) two problems:

* Keyman's hotkeys stop working
* A modifier key can become stuck, if it was pressed around the time
  Keyman became unresponsive.

The most common scenario in which Keyman can become unresponsive is high
system load, e.g. rendering graphics, videoconference calls, compiling
software.

Restarting Keyman always resolved both of these two issues in the past,
but with this patch, I hope that this will no longer be necessary.

A related 'fakefreeze' project is included for simulating a keyman.exe
hang by posting a `wm_keyman_control:KMC_WATCHDOG_FAKEFREEZE` message to
it, which keyman.exe responds to by `Sleep()`ing for 5 seconds. While
keyman.exe is freezing, any keystroke will cause the low level hook to
be uninstalled by Windows.

Logging has been updated; look for "LowLevelHookWatchDog" in the log for
related events.

One final small change in keyman32.cpp, as I refactored the
WH_KEYBOARD_LL hook installation/uninstallation, was to always clear out
hook variables when uninstalling a hook, because if the hook fails to
uninstall, there's really nothing we can do about it anyway, and we
probably shouldn't be trying again.

Fixes: #8064
2025-11-17 16:30:43 +01:00
Marc Durdin
bf4d707662 change(windows): use circular buffer for logging
Test-bot: skip
2025-11-14 05:23:32 +01:00
rc-swag
d52b48cbbb feat(windows): handle arm64 complier environment
Update the build.bat to handle configuring the build
environment with vsdevcmd correctly for arm64 2019 doesn't
work very well so have to have pretty weird if statement.
also checked in some missed updates to function name change
2025-10-28 16:40:42 +10:00
rc-swag
472c8e2027 feat(windows): add keymanarm64.def update gitignore 2025-10-22 22:20:48 +10:00
rc-swag
9a7cb42fc7 feat(windows): add keymanarm64.def 2025-10-20 16:03:39 +10: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
f394245636 maint(common): consolidate builder scripts
Clarifies the confusing builder.inc.sh / build-utils.sh distinction by
giving the scripts more appropriate names. Most build scripts should use
builder-full.inc.sh; some helper scripts can use builder-basic.inc.sh.
Documented in resources/build/README.md.

Renames:
* resources/build/builder.inc.sh to resources/build/builder-full.inc.sh
* resources/build/build-utils.sh to resources/build/builder-basic.inc.sh

Other changes:
* Moves Android-specific functions out of builder-basic.inc.sh and into
  android/build.sh.
* Renames functions in builder-basic.inc.sh

More functions may be moved from builder-basic.inc.sh into utils.inc.sh
or other scripts in the future.

Fixes: #14065
Build-bot: build all
Test-bot: skip
2025-08-02 08:11:24 +10:00
Marc Durdin
ef60c08d7c chore: add build.sh edit action for Delphi projects
This opens up the Delphi IDE with the correct KEYMAN_ROOT environment,
which allows for debugging. This is very helpful when working with
multiple worktrees, and also helps to avoid editing a project in the
wrong tree.
2025-02-22 06:18:47 +01:00
rc-swag
b074c2c0ef feat(windows): add release ownership rename mutex owned
Add a ReleaseOwnership member to TKeymanMutex.
Rename MutexOwned to TakeOwnership.

Fixes: #13167
2025-02-10 13:50:18 +10:00
rc-swag
9eec271011 feat(windows): check updates and automatic update merged
Check updates meaning has slightly changed it is now automatic updates
and it will now check, download and when possible start the install.

Previously it just meant a check for upates was made and notified
the user of updates.

Fixes:#13114
2025-02-03 14:25:44 +10:00
rc-swag
4ad5f0fc64 chore(windows): Merge branch 'epic/windows-updates' into feat/windows/add-apply-now-update 2024-10-01 17:38:59 +10:00
rc-swag
bfe1b45983 feat(windows): automatic updates option to config reg 2024-09-09 15:51:32 +10:00
rc-swag
f1d9f53048 feat(windows): add right modifier included in HotKey 2024-08-22 16:32:39 +10:00
rc-swag
05d52463f9 feat(windows): remove registerhotkey and cache modifier
Remove the feature flags that allows the use of cached modifier for
hotkeys. Remove the feature flag that uses the Win 32 API
RegisterHotkeys.
2024-08-22 15:45:23 +10:00
rc-swag
b7b17686ec feat(windows): add rmodifier hk to keyman config UI 2024-08-19 14:01:43 +10:00
rc-swag
be55dabdc4 feat(windows): add right modifier key option pt1 2024-08-16 22:15:42 +10:00
Marc Durdin
c06dd480df chore(windows): add new build scripts for Windows builds 2024-05-20 08:27:31 +07:00
Marc Durdin
9f7eff122e chore(windows): remove legacy build Makefiles 2024-05-20 08:16:52 +07:00
Marc Durdin
4c07b6c49c feat(developer): remove kmcmpdll 2023-09-02 12:25:29 +04:00
Ross
1f3e8f768d chore(windows): remove RefreshPreservedKeys pt2 2023-05-11 14:57:01 +10:00
Marc Durdin
978b93aa64 refactor(common): move keymanversion_build.in to /common/include 2023-03-24 14:42:12 +07:00
Marc Durdin
ce93901a5f chore(windows): Add safecall for internal CustomisationStorage API interface
This makes it easier to track what is happening for errors where
otherwise we found that exception messages were being cropped; for
example, see KEYMAN-WINDOWS-X.

The error messages were being cropped because the exception handler was
in the exe module, but the exception was being raised in kmcomapi
module. When the exception was handled, the handler tested to see if
the exception object inherited from exemodule.Exception, but it was
inheriting from kmcomapi.Exception instead, and so it did not attempt
to load the message detail.

By adding `safecall` calling convention to `KeymanCustomisation`, we
move responsibility for handling the exception to the
`TKeymanAutoObject.SafeCallException` function, and we get full detail
for the exception.
2022-11-14 09:40:14 +11:00
Marc Durdin
385045e978 chore(windows): fixup refs and move StockFileNames
* StockFileNames.pas was missed in earlier moves.
* Cleaned up references in various dproj files
* Fixed up broken references to common files
2022-06-23 09:47:59 +10:00
Marc Durdin
393083509a chore(windows): move tike files from global to developer
These files used only by TIKE so moved into that project.

Noticed obsolete refs to UMD5Hash and removed those at the same time.
2022-06-23 09:34:03 +10:00
Marc Durdin
9bb4c27e61 chore(windows): move general developer files to developer/ 2022-06-23 09:28:34 +10:00
Marc Durdin
8cbebf7ade chore(windows): move general package units to common 2022-06-23 06:36:23 +10:00
Marc Durdin
2aaa31eae2 chore(windows): move general keyboard units to common 2022-06-23 06:33:16 +10:00
Marc Durdin
7895cf2382 chore(windows): move utilicon.pas to common 2022-06-22 14:03:19 +10:00
Marc Durdin
96c1e10874 chore(windows): move Keyman.System.RegExGroupHelperRSP19902 unit to common 2022-06-22 14:02:03 +10:00
Marc Durdin
331c9d2d71 chore(windows): move shared general units to common 2022-06-22 13:58:58 +10:00
Marc Durdin
eba8a4ab35 chore(windows): move CRC32.pas to common 2022-06-22 10:36:55 +10:00
Marc Durdin
46c314cbb7 chore(windows): move BCP47Tag.pas to common 2022-06-22 10:35:18 +10:00
Marc Durdin
092c149f31 chore(windows): delete unused WideStringClass.pas 2022-06-21 09:55:52 +10:00
Marc Durdin
ac587286bf chore(windows): delete unused utilmsxml.pas 2022-06-21 09:55:16 +10:00
Marc Durdin
c6102eb75b chore(windows): delete unused UnitDrawArrow.pas 2022-06-21 09:54:30 +10:00
Marc Durdin
99cc0f6360 chore(windows): delete unused UExtractFileDir.pas 2022-06-21 09:54:03 +10:00
Marc Durdin
5369799ab8 chore(windows): delete duplicate test_iconsave.dpr 2022-06-21 09:53:31 +10:00
Marc Durdin
419d8c2483 chore(windows): delete unused SyncRegistryKeyboards.pas 2022-06-21 09:52:13 +10:00
Marc Durdin
03e755d3f0 chore(windows): delete unused PackageFile.pas 2022-06-21 09:51:51 +10:00
Marc Durdin
34d3ea5899 chore(windows): delete unused MLang.pas 2022-06-21 09:51:02 +10:00
Marc Durdin
c548631b78 chore(windows): delete unused Keyman.System.KeymanVersionInfo.pas 2022-06-21 09:48:24 +10:00
Marc Durdin
e1701a9e73 chore(windows): delete unused InternetState.pas 2022-06-21 09:47:19 +10:00