Commit graph

58 commits

Author SHA1 Message Date
Marc Durdin
54e7b6c8d2 fix(windows): ensure valid base layout on install
Fixes #4437.

Makes sure that we don't end up with a base layout that is not using
Latin script at install time.
2021-03-09 15:17:21 +11:00
Marc Durdin
1171290877 fix(windows): update order of disabling keyboard
We should uninstall transient languages before disabling them
because once we have disabled them, we lose the language
association and cannot find the entry to uninstall. catch-22.
2021-02-11 10:15:38 +11:00
Marc Durdin
558c8013ee feat(developer): improve BCP 47 canonicalization
Ensures we get a canonical tag per langtags.json as far as we possibly
can. This is a breaking change for the compiler as tags which were
formerly regarded as canonical are no longer regarded that way. This
mostly relates to script subtag but a secondary bug meant that some
other tags would have lost data in the canonicalization process
(because we did a lookup based only on the language subtag previously,
which is a no-no).

See keymanapp/keyboards#1452 for related work.
2021-02-05 16:56:21 +11:00
Marc Durdin
348b29687e fix(windows): avoid invalid language codes in Add Language dialog
Fixes #4343.

This patch makes all language codes from the langtags.json dataset
visible through the Add Language dialog. This avoids situations where
an incomplete code such as "cmo" can result in an error (a script is
required for "cmo" as it is written in either Latn or Khmr).
2021-02-01 10:20:19 +11:00
Marc Durdin
b7fb5066bc
Merge pull request #4180 from keymanapp/fix/windows/1285-amharic-sinhala-tigrigna-mitigation
fix(windows): Update mitigation for Keyman 14 and Windows 10 19597
2021-01-14 09:15:50 +11:00
Marc Durdin
95a6e1b446 fix(windows): fixup mitigation for legacy keyboards
Fixes #4184.

If a package had a keyboard with language metadata, it would not
load that language data correctly, which then meant it would not
apply the mitigation correctly either, leading to a double elevation
dialog as Keyman tried to fallback to primary language.
2020-12-21 11:23:53 +11:00
Marc Durdin
e83061ef80 fix(windows): ensure mitigation works with new registration strategy
The keyboard profile and registration strategy was not taking into
account the mitigation for Win10 1803 (#1285) and this meant that the
Amharic, Tigrigna and Sinhala keyboards would not install correctly.
2020-12-21 08:20:28 +11:00
Marc Durdin
e664e93de7 fix(windows): Improve refresh reliablilty
This change has three fixes to improve the reliability of notifying
Keyman Engine of updates to settings or keyboard installs:

1. It removes the closure pattern of the refresh thread, because that
   was closing on a variable on a different thread (`RefreshHandle`) and
   that could cause races and/or exceptions in the case of early free.
   What's more, the closure was actually unnecessary as the variable was
   really only used by the refresh thread!

2. It moves responsibility for setting the refresh token to the calling
   thread so that the caller can depend on the token being the one that
   is actually sent, removing a race.

3. Most important, the refresh thread now flushes all messages in its
   queue, as there may be multiple messages relating to the window
   construction that need to be processed before the wm_keyman_refresh
   message can be handled. This greatly improves the chance of the
   notification actually being sent!
2020-12-18 08:06:03 +11:00
Marc Durdin
f73b2912ef fix(windows): exception handling list error
Fixes #4006.

This fixes the list error exception which was masking the actual cause
of #4006, which is already fixed by #4164.

Related issue #4119 is also fixed by #4164.
2020-12-17 11:54:39 +11:00
Marc Durdin
17b444bff2 fix(windows): Settings refresh management
Fixes #4011.
Fixes #4039.
Fixes #4121.

This change completes the immediate-change model for Keyman
Configuration, by refactoring the refresh of settings out of the render
phase and more appropriately splitting applying and refreshing. It adds
a new message flag for wm_keyman_refresh, KR_SETTINGS_CHANGED, which
uses a random token approach broadcast to all applications on the
desktop to ensure that the refresh is received and multiple
notifications for the same event can be appropriately coalesced.

Most of the files touched are stripping out the refresh flags from the
render phase.

There is one small bug resolved at the same time with the options
properties, which were not reset to default if they had been deleted
from the registry prior to a refresh (see utilkeymanoption.pas).
2020-12-17 10:50:21 +11:00
Marc Durdin
9e46b555d9 fix(windows): Rename to Keyman
Fixes #4003.

This addresses the majority of locations where we use the name "Keyman
Desktop" in code. There will be some filenames and paths that do not
change at this point -- particularly at a source level. For now, the
focus is on the user interface changes.

While making these changes, I also made the VERSION and MANIFEST
resources more consistent.
2020-12-02 09:56:14 +11:00
Marc Durdin
fd5845a912
Merge pull request #3805 from keymanapp/fix/windows/3801-crash-installing-malformed-package
fix(windows): crash installing package with a race
2020-10-30 17:31:23 +11:00
Marc Durdin
76f77857c5 fix(windows): crash installing package with a race
Fixes #3801.
Fixes #3802.
Fixes KEYMAN-WINDOWS-5M.
Fixes KEYMAN-WINDOWS-5N.

This is a two-part fix for Keyman Configuration where it appears there
was a race with creating a temporary file, and which caused a cascading
exception.

The first part resolves the race; the second part (in
UfrmInstallKeyboard.pas) adds a little extra robustness (probably not
totally necessary).
2020-10-30 16:52:17 +11:00
Marc Durdin
5a4287a68d fix(windows): disabling/enabling a profile could have wrong association
Transient language profiles would get the wrong language association
when they were disabled and re-enabled.

Fixes #3798.
2020-10-30 14:20:00 +11:00
Marc Durdin
11a2cf53c5 fix(windows): Keyman Configuration changes apply instantly
Fixes #3518.

Changes in Keyman Configuration will now apply immediately. This removes
the OK and Cancel buttons from the dialog and means that all actions
are consistent in when they are applied, unlike previously. This also
matches the Windows 10 Settings metaphor and metaphors for most modern
apps and devices.

For now, I have placed a message where the OK and Buttons were
previously, to help existing users understand the change. In time, I
expect us to be able to remove that message entirely.
2020-10-26 15:18:04 +11:00
Marc Durdin
82e15bead0 fix(windows): remove obsolete Reboot flag
The Reboot flag was never set by any Keyman code any longer. Thus,
removing to simplify code pathways for applying config changes.
2020-10-26 09:10:02 +11:00
Marc Durdin
3edec559ec fix(windows): disabled keyboards listed in hotkeys
Fixes #2942.
2020-10-09 11:13:11 +11:00
Marc Durdin
ded5ed94ad fix(windows): cleanup 2020-09-23 17:44:26 +10:00
Marc Durdin
8fc7421391 fix(windows): add back support for disabling keyboards
Fixes #3560. This reworks the functionality for disabling
keyboards to work with the new TIP registration pattern. Much
of the code is the same as in Keyman 13, but there are some
significant differences, so it all needs to be reviewed.
2020-09-23 17:37:08 +10:00
Marc Durdin
f1b63cc95b
Merge pull request #3558 from keymanapp/fix/windows/language-name
fix(windows): lookup language name on create
2020-09-21 15:32:34 +10:00
Marc Durdin
5f3987b988 fix(windows): lookup language name on create
Lookup a language name from various sources rather than using the
BCP 47 code, where possible.
2020-09-04 13:17:10 +10:00
Marc Durdin
9f2d99b5c7
Merge pull request #3552 from keymanapp/fix/windows/upgrade-profile-scenarios
fix(windows): upgrade of profiles from 13.0
2020-09-04 11:33:23 +10:00
Marc Durdin
2df50c07ba
Merge pull request #3545 from keymanapp/fix/windows/3485-canonicalization
fix(windows): BCP 47 tag canonicalization
2020-09-04 11:33:09 +10:00
Marc Durdin
69227beb2a fix(windows): upgrade of profiles from 13.0
This upgrades a 11.0-13.0 install to the 14.0 model for registered TIPs.
It does not yet deal with transient TIPs or disabled keyboards (these
will come in a separate PR). There is also more tidy up coming in a
future PR for language names.
2020-09-02 16:46:58 +10:00
Marc Durdin
6d5ccbd719 fix(windows): add tests and improve canonical options 2020-09-01 09:41:33 +10:00
Marc Durdin
84f0219541 fix(windows): canonicalization
Reworks the BCP 47 tag canonicalization algorithm.
2020-09-01 08:42:56 +10:00
Marc Durdin
b3f5f586cb fix(windows): simplify profile uninstall 2020-08-31 16:32:53 +10:00
Marc Durdin
b1b3f62b18 feat(windows): map installed bcp47
This PR handles the case where Windows installs a BCP 47 tag that may not
match our tag 100% precisely. In this case, Keyman maps the Windows BCP 47
tag to the in-memory data for consistency. It also allows for install of
more complex tags.
2020-08-31 14:11:25 +10:00
Marc Durdin
6cf3368ada feat(windows): select language at keyboard install
For packages with a single keyboard, we now make it
possible to select a language at install time.

Fixes #1456.
2020-08-27 13:59:11 +10:00
Marc Durdin
7f8457dbce fix(windows): remove unneeded OriginalBCP47Tag 2020-08-26 14:29:50 +10:00
Keyman Server
97a16e8535 feat(windows): profile installation - engine 2020-08-26 11:06:10 +10:00
Marc Durdin
6b748239ed chore(windows): cleanup of i18n
- remove expandidentifiers
- remove messages.txt
- remove desktop.pot
- remove stock message ditor
- stop using captions altogether for translation
2020-07-27 16:54:23 +10:00
Marc Durdin
7552c91f94 fix: Install2 methods need new interfaces 2020-07-06 15:19:00 +10:00
Marc Durdin
a0c0141092 feat: more work towards bootstrap 2020-07-03 13:42:12 +10:00
Marc Durdin
fed63d4690 feat(windows): sentry integration test points 2020-03-31 16:16:56 +11:00
Marc Durdin
9779792059 fix(windows): remove errlogpath and cleanup 2020-03-27 11:23:51 +11:00
Marc Durdin
e99a6677e1 feat(windows): kmcomapi callstacks for sentry 2020-03-27 09:54:48 +11:00
Marc Durdin
1ebe2f5fa1 fix(windows): Windows touch keyboard would cancel on each keystroke
Fixes #2450. When Keyman serialized input, it would cause the touch keyboard to cancel
because the touch keyboard thought the received event meant the user was touching the
physical keyboard. This resolves that problem, using a watch timer to check the visibility
of the touch input panel.
2020-02-04 16:18:18 +11:00
Marc Durdin
16aba3ae8e [Windows] If a language was dynamically loaded by Windows, then the hotkey entry is never assigned when a keyboard is installed 2019-01-04 12:08:38 +11:00
Marc Durdin
62a8cab1ca
Merge pull request #1410 from keymanapp/windows-fix-1279
[Windows] Fixes #1279. Avoid crash when security software blocks Keyman Configuration from setting various registry values.
2018-12-11 13:20:53 +11:00
Marc Durdin
17c08d53f6 [Windows] Fixes #1336. Fixes #1270. Package info was not being read from JSON even when available which meant we lost Unicode values 2018-12-11 11:23:17 +11:00
Marc Durdin
6d8451b818 [Windows] Fixes #1279. Avoid crash when security software blocks Keyman Configuration from setting various registry values. 2018-12-10 18:08:17 +11:00
Marc Durdin
7e2c21b8a7 [Windows] Refactor serialized input to use a low level keyboard hook to avoid conflicts 2018-10-03 15:22:38 +10:00
Marc Durdin
cdeb36977a Fixes IKeymanControl::OpenConfiguration giving noop 2018-06-18 14:24:44 +07:00
Marc Durdin
1b091c15c6 Fixes sillsdev/keyman-issues#5613. Keyboard Options dialog no longer crashes on save. 2018-05-30 08:22:12 +07:00
Marc Durdin
6e72c1a2a7 Fixes #858. Incorrect icons caused by lookup against non-installed language profile. 2018-05-28 07:35:13 +07:00
Marc Durdin
eb8a52dbf8 Fixes #515, IKeymanKeyboardFile.DefaultHotkey not implemented 2018-05-08 13:27:13 +07:00
Marc Durdin
ac2b6ed87e Add test cases and complete code paths for keyboard language info in COM API 2018-02-21 23:28:58 +07:00
Marc Durdin
26980fd5c3 Refactor kpinstallkeyboard slightly for language information passing 2018-02-21 14:30:08 +07:00
Marc Durdin
da3056c25f Basic support for reading language information from package data 2018-02-21 14:14:14 +07:00