Commit graph

1031 commits

Author SHA1 Message Date
rc-swag
71ccb1ab6f fix(windows): merge resloution fix unused var
This fixes a merge resolution from master to the
branch. It also removes unused variables, from
a previous change.
2026-09-23 11:41:45 +10:00
rc-swag
6c775d5819 chore(windows): Merge branch 'master' into fix/windows/15152/basekeyboard-install-non-admin-2 2026-09-23 10:50:53 +10:00
rc-swag
f8ee1b7c8a
Merge pull request #16162 from keymanapp/fix/windows/15152/basekeyboard-user-not-admin
fix(windows): set basekeyboard as current user not the admin user on an elevated process
2026-09-23 09:52:25 +10:00
rc-swag
bb20b89034 fix(windows): rename filename builder functions
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-18 21:16:54 +10:00
rc-swag
b6f475a382 fix(windows): add basekeyboard filename functions
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-09-16 17:37:59 +10:00
Marc Durdin
6b8d267fde chore(windows): remove references unused extensions .kma and .kxx
Test-bot: skip
2026-09-15 14:57:32 +02:00
rc-swag
0889b5f608 fix(windows): merge base branch
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-08 10:08:20 +10:00
rc-swag
63d12b671a fix(windows): remove UpdateBaseLayout deadcode
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-09-07 20:43:26 +10:00
rc-swag
163806b712 fix(windows): git revert error fix
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-09-07 17:17:39 +10:00
rc-swag
20d5a4c104 fix(windows): typos and return type in interface declaration 2026-09-04 11:22:41 +10:00
rc-swag
f40e075413 fix(windows): strtoint for command line basekeyboardid
Also rebuild kmcomapi_TLB.pas
2026-09-04 11:21:33 +10:00
rc-swag
91a1a4267e fix(windows): pass basekeyboardid to installation api
The updates all the apis so that the basekeyboardid or klid
can be passed in as an argument. This in needed so that
elevated process required to compile the keyboard has
the call users keyboard base id.
2026-09-04 11:21:09 +10:00
rc-swag
48923665d9 chore(windows): Revert "fix(windows): pass basekeyboardid to installation api"
This reverts commit 82fb40002b.
2026-09-03 17:30:21 +10:00
rc-swag
5e89946c00 chore(windows): Revert "fix(windows): strtoint for command line basekeyboardid"
This reverts commit 155b8e15ed.
2026-09-03 17:29:51 +10:00
rc-swag
c3160944e5 chore(windows): Revert "fix(windows): typos and return type in interface declaration"
This reverts commit 0c68b1e031.
2026-09-03 17:29:04 +10:00
rc-swag
3c1b47eedc fix(windows): Free the correct object
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-09-02 12:37:03 +10:00
rc-swag
0c68b1e031 fix(windows): typos and return type in interface declaration 2026-09-02 10:10:16 +10:00
Marc Durdin
d496f8d59b
Merge pull request #16443 from keymanapp/maint/windows/16433-remove-koSwitchLanguageForAllApplications-and-cleanup
maint(windows): remove `koSwitchLanguageForAllApplications`, `koAutoSwitchOSKPages`, osVista, osWin7, osWin8, cleanup
2026-09-01 16:11:29 +07:00
Marc Durdin
947dbe9910
Merge pull request #16439 from keymanapp/refactor/windows/15333-cleanup
refactor(windows): cleanup unused wm_keyman_control values
2026-09-01 16:11:18 +07:00
Marc Durdin
3c44f8ab5b
Merge branch 'master' into fix/windows/15333-simplify-keyboard-refresh 2026-09-01 15:44:05 +07:00
rc-swag
155b8e15ed fix(windows): strtoint for command line basekeyboardid
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
Also rebuild kmcomapi_TLB.pas
2026-09-01 15:53:48 +10:00
rc-swag
82fb40002b fix(windows): pass basekeyboardid to installation api
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
The updates all the apis so that the basekeyboardid or klid
can be passed in as an argument. This in needed so that
elevated process required to compile the keyboard has
the call users keyboard base id.
2026-08-31 15:34:45 +10:00
Marc Durdin
33e64f1edd refactor(windows): rename GetCapsAndNumlockState() to RefreshModifierState()
Fixes: #16434
Test-bot: skip
2026-08-27 08:20:21 +02:00
Marc Durdin
e7bc51fcda chore(windows): formatting
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Co-authored-by: Ross Cruickshank <rc-swag@users.noreply.github.com>
2026-08-27 07:53:40 +02:00
Marc Durdin
0f281a6a9d maint(windows): remove koSwitchLanguageForAllApplications, koAutoSwitchOSKPages, osVista, osWin7, osWin8, cleanup
* Remove references to `koSwitchLanguageForAllApplications` and
  `koAutoSwitchOSKPages` options, translated strings for them, and
  related `GlobalKeyboardChangeManager` -- no longer required since
  Win8.
* Remove Windows Vista-, 7-, and 8-specific code paths - except for the
  one user-facing setting for installing keyboards on downlevel
  operating systems.
* Remove commented code

Fixes: #16433
Test-bot: skip
2026-08-27 07:47:25 +02:00
Marc Durdin
2c7bba8d10 refactor(windows): cleanup unused wm_keyman_control values
Cleanup of unused `wm_keyman_control` and `wm_keyman_refresh` values,
and some other unused messages, which were making the implementation
harder to understand.

Relates-to: #15333
Follows: #16435
2026-08-26 10:18:00 +02:00
Marc Durdin
0e332b6f6c fix(windows): simplify keyboard refresh and make it more on-demand
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
Clean up the keyboard refresh process. Keyman COM API will post a
`wm_keyman_refresh`, `KR_REQUEST_REFRESH` message when changes have been
made to the list of installed keyboards (or some other keyboard-related
settings change).

Keyman Engine (any arch) will handle this message, in any process, and
post a message to the master controller (keyman.exe, TfrmKeyman7Main),
`wm_keyman_refresh`, `KR_PRE_REFRESH`.

Keyman Engine (keyman32) will handle _this_ message in the master
controller thread context, and increment the global refresh tag. It also
asks the other architecture host process(es) to update their global
refresh counter to the same value (by posting `wm_keyman_refresh`,
`KM_PRE_REFRESH` to those process(es).)

This refresh tag is then compared on-demand in each thread to the
thread's current refresh tag value, when a keyboard activation is
received, on set focus, or on a keystroke, and the keyboard list is
refreshed at that point.

This means that keyboard installation no longer triggers a large amount
of activity reloading all the keyboards on all windowed threads, but
rather they will gradually reload as the user interacts with them. It
also fixes #15333, which related to having threads with only child
windows -- that is, that were parented by top-level windows from other
threads -- which thus never received the global broadcast in the earlier
design. For example, VSCode, Notepad in Win11, Chrome.

Fixes: #15333
2026-08-26 10:15:46 +02:00
Matthew Lee
446559c221
Update windows/src/engine/keyman32/capsstate.cpp
Co-authored-by: rc-swag <58423624+rc-swag@users.noreply.github.com>
2026-08-24 09:19:47 -04:00
Matthew Lee
fb91d2fc75
Update windows/src/engine/keyman32/capsstate.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-08-22 10:26:53 +03:00
Matthew Lee
dcbfcf810f
Update windows/src/engine/keyman32/capsstate.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-08-22 10:26:23 +03:00
Matthew Lee
13326b4091
Update windows/src/engine/keyman32/capsstate.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-08-22 10:25:46 +03:00
Matthew Lee
f586e94cf5
Update windows/src/engine/keyman32/appint/aiTIP.cpp
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-08-22 10:25:22 +03:00
Matthew Lee
5d073fa44f fix(windows): resync caps lock state when Keyman keyboard is activated
The Caps Lock and Num Lock flags in Globals::ShiftState() are updated
only as key events pass through the engine, so they go stale when the
toggle is changed while a non-Keyman layout is active. The existing
resync in GetCapsAndNumlockState() runs on window focus change, which a
keyboard switch does not trigger, so the core processor was told Caps
Lock was off until the user toggled it twice.

Extract the toggle resync as RefreshToggleState() and call it from
TIPActivateKeyboard(), which is the profile activation path for both
Win+Space and the Windows language selector.

Fixes #16422

Co-Authored-By: Claude Opus 5 <noreply@anthropic.com>
Claude-Session: https://claude.ai/code/session_011GdFpFi5eqJP6C1YjuQytY
2026-08-21 23:21:34 +03:00
rc-swag
62dd0de786 fix(windows): add compile for base keyoard to api
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
What we was needed was the ability to recompile
installed keyboards against a basekeyboard id.
MCompileForBaseKeyboard which will take the
base keyboard id. This allows the call to be done
elevated and seperates out the actuall selecting
the base keyboard.
2026-08-21 13:53:26 +10:00
Marc Durdin
adaf2337c5
Merge pull request #12191 from keymanapp/epic/kmc-convert
epic: kmc-convert 😎
2026-08-20 16:14:11 +07:00
Marc Durdin
f498400b86
Merge pull request #16363 from keymanapp/fix/windows/12812-handle-invalid-font-files-in-package-install
fix(windows): handle font and package .zip format errors during package installation
2026-08-19 13:53:28 +07:00
Marc Durdin
3a4803c359
Merge pull request #16362 from keymanapp/fix/windows/12905-support-png-icon-in-tray
fix(windows): support .png format icon in tray icon
2026-08-19 13:53:04 +07:00
SabineSIL
882ede0c54
feat(developer): kmc-convert: new conversion .keylayout->kmn 😎 (#12564)
kmc-convert provides tooling to convert between various common keyboard
description file formats. Each conversion will be implemented in its
single, separate module (and each module will done in its own PR)

This PR will address the conversion **keylayout → kmn**

Co-authored-by: Marc Durdin <marc@durdin.net>
2026-08-18 15:16:02 +02:00
rc-swag
9108af2ed2 chore(windows): Merge branch 'master' into fix/windows/15152/basekeyboard-user-not-admin
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
# Keyman Conventional Commit suggestions:
#
# - Link to a Sentry issue with git trailer:
#     Fixes: _MODULE_-_ID_
# - Give credit to co-authors:
#     Co-authored-by: _Name_ <_email_>
# - Use imperative, present tense ('attach' not 'attaches', 'attached' etc)
# - Don't include a period at the end of the title
# - Always include a blank line before trailers
# - More: https://github.com/keymanapp/keyman/wiki/Pull-Request-and-Commit-workflow-notes
2026-08-18 16:16:55 +10:00
Marc Durdin
4a378252b0 fix(windows): improve icon resource management and avoid double-destroy
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Copy the handle of the icon from kmcomapi rather than assigning, so that
we do not end up calling DestroyIcon twice on the same handle (once by
FTrayIcon destruction, and once by kmcomapi).

Co-authored-by: Ross Cruickshank <rc-swag@users.noreply.github.com>
2026-08-18 08:01:12 +02:00
Marc Durdin
9f8717e4f8
Merge pull request #16361 from keymanapp/fix/windows/12611-release-shift-on-osk-with-right-shift
fix(windows): release shift key on OSK when user releases physical right shift
2026-08-14 11:30:39 +02:00
Marc Durdin
aff7665c07 refactor(windows): remove one use of with in kpinstallfont
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
Co-authored-by: Ross Cruickshank <rc-swag@users.noreply.github.com>
2026-08-14 07:57:57 +02:00
Marc Durdin
16559f9a31 docs(windows): update comment for TfrmOSKOnScreenKeyboard.OskModifierEvent 2026-08-14 07:54:20 +02:00
Marc Durdin
e18df382f5 fix(windows): handle font and package .zip format errors during package installation
Quietly handle invalid font files while installing, and cleanly abort
install of broken packages. Report the errors to Sentry but do not
crash.

Fixes: #12812
Fixes: KEYMAN-WINDOWS-45K
Fixes: KEYMAN-WINDOWS-6S8
Fixes: KEYMAN-WINDOWS-430
Fixes: KEYMAN-WINDOWS-7T3
Fixes: KEYMAN-WINDOWS-7SY
Fixes: KEYMAN-WINDOWS-42Z
2026-08-13 14:42:50 +02:00
Marc Durdin
5d0f6f50db fix(windows): ignore invalid keyboard icons in kmcomapi
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-08-13 14:41:50 +02:00
Marc Durdin
d7c88b6bae fix(windows): support .png format icon in tray icon
Fixes: KEYMAN-WINDOWS-3CT
Fixes: #12905
2026-08-13 11:34:46 +02:00
Marc Durdin
2e7772b87c fix(windows): release shift key on OSK when user releases physical right shift
When the user clicks either Shift key on the OSK, that emits a VK_LSHIFT
down key event. If the user subsequently presses and releases the Right
Shift key on their hardware keyboard, that does not reset the isDown
state for the Left Shift key, so the key is not released on the OSK, and
the state becomes inconsistent for apps also.

This change emits a key up event, if when Right Shift is released,
Keyman detects that Left Shift is still "down". Note that if the user
presses and holds Left Shift, and presses and releases Right Shift, the
left shift state will be reset before the users releases Left Shift. But
that's a pathological state!

Fixes: #12611
2026-08-13 10:49:13 +02:00
Sabine
a2bf976e5e chore(common): remove commented old #defines; in some files remove paths for #include km_vkey 2026-08-11 09:46:49 +02:00
Sabine
0b7af5b771 chore(common): include km_vkey.h 2026-08-07 16:00:19 +02:00
Sabine
dde35c87cc chore(common): undo last changes 2026-08-07 12:55:06 +02:00