Keyman cross platform input methods system running on Android, iOS, Linux, macOS, Windows and mobile and desktop web
Find a file
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
.github fix(common): registry clean-up enabled, no terminal in github action 2025-09-24 17:24:16 +02:00
android docs(android): Document getNavigationBarHeight API 2025-09-25 14:54:05 +07:00
common fix(windows): osk: handle simulated left Control event when AltGr pressed 2025-10-08 14:32:40 +02:00
core maint(common): move build-utils-ci.inc.sh to ci/ci-publish.inc.sh 2025-08-05 12:54:56 +10:00
developer Update developer/docs/help/reference/file-types/metadata.md 2025-09-17 08:12:14 +02:00
docs chore(linux): Merge remote-tracking branch 'origin/master' into maint/linux/remotedbgdocker 2025-09-30 08:29:02 +02:00
ios maint(resources): rename KEYMAN_VERSION_FOR_PR_FILENAME 2025-09-10 11:17:41 +02:00
linux maint(linux): suppress output of stopping processes after test run 2025-10-06 16:13:44 +02:00
mac maint(resources): rename KEYMAN_VERSION_FOR_PR_FILENAME 2025-09-10 11:17:41 +02:00
oem/firstvoices fix(android): Fix bottom insets for Sample and FirstVoices apps 2025-09-25 11:20:11 +07:00
resources maint(linux): suppress output of stopping processes after test run 2025-10-06 16:13:44 +02:00
web maint(resources): nest unit tests under parent block 2025-10-06 16:09:47 +02:00
windows fix(windows): osk: handle simulated left Control event when AltGr pressed 2025-10-08 14:32:40 +02:00
.clang-format feat(linux): work on 2nd round of comments on PR 11816 2024-06-20 17:44:21 +02:00
.editorconfig chore(linux): Address a few more lintian warnings 2022-03-15 15:32:10 +01:00
.eslintrc.cjs maint: patchup eslint configuration 2025-05-02 14:06:33 +07:00
.flake8 chore(linux): Add integration tests for ibus-keyman 2021-11-04 09:22:28 +01:00
.gitattributes maint(common): use LF line endings for scripts 2025-08-18 17:50:28 +02:00
.gitignore maint(mac): use mac_ prefix for functions in mac.inc.sh 2025-08-20 05:40:32 +02:00
.nycrc.json feat(developer): fixup and prepare build scripts and docs for kmc 2022-09-19 06:36:06 +10:00
.shellcheckrc maint(linux): remove several shellcheck directives and warnings 2025-09-23 18:30:16 +02:00
build.sh maint(common): consolidate builder scripts 2025-08-02 08:11:24 +10:00
CODE_OF_CONDUCT.md Create CODE_OF_CONDUCT.md 2021-10-08 10:46:53 +11:00
configure-repo.sh chore: update docs and non-standard readlink refs 2023-02-22 10:41:54 +07:00
CONTRIBUTING.md chore: add maint to CONTRIBUTING.md 2025-04-29 11:15:55 +07:00
crowdin.yml fix(mac): Specify el.lproj folders 2024-08-07 10:01:42 +07:00
HISTORY.md auto: increment master version to 19.0.135 2025-10-07 13:01:21 -05:00
LICENSE.md maint(linux): fix lintian warnings 2025-05-13 20:07:32 +02:00
package-lock.json maint(resources): nest unit tests under parent block 2025-10-06 16:09:47 +02:00
package.json maint(resources): nest unit tests under parent block 2025-10-06 16:09:47 +02:00
README.md docs(common): update README with number of languages and keyboards 2025-05-21 20:36:20 +02:00
TIER.md Update TIER.md 2022-11-14 07:34:26 +11:00
tsconfig.base.json refactor: move langtags to @keymanapp/langtags npm module 2025-01-27 09:59:38 +07:00
tsconfig.json chore: address review comments 2025-01-30 14:00:34 +07:00
VERSION.md auto: increment master version to 19.0.135 2025-10-07 13:01:21 -05:00

Keyman

Keyman makes it possible for you to type in any language on Windows, macOS, Linux, iPhone, iPad, Android tablets and phones, and even instantly in your web browser. Create keyboard layouts with Keyman Developer and share them with the community in the keyboards repository. The Keyman Community have so far contributed well over 1,000 keyboard layouts for over 2,500 languages!

License

Copyright (c) SIL Global.

Keyman is an open source project distributed under the MIT license.

Get Involved

Development Status

Important Links