Commit graph

3302 commits

Author SHA1 Message Date
Marc Durdin
7b032aff26
Merge pull request #4717 from keymanapp/chore/windows/finalize-help
chore(windows): finalize help
2021-03-18 18:50:50 +11:00
Marc Durdin
7c67ffd93c chore(windows): finalize help 2021-03-18 16:39:24 +11:00
Marc Durdin
96939521b1 fix(windows): Download keyboard dialog TLS protocol support
Fixes #4709.
2021-03-18 14:24:44 +11:00
Marc Durdin
5eb0aec0e8
Merge pull request #4691 from keymanapp/fix/developer/named-code-constants-end-of-line-test
fix(developer): support named character codes at end of line
2021-03-16 23:26:03 +11:00
Marc Durdin
9ae541940a
Merge pull request #4699 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
chore(developer): upgrade bcp 47 canonicalisation to warning
2021-03-16 23:25:28 +11:00
Marc Durdin
de74fddbc2 chore(developer): upgrade bcp 47 canonicalisation to warning
This does not trigger a build failure; validation warnings currently always pass.
Info messages are currently suppressed with -s which also suppresses the banner,
which is more plumbing than we should change just now.
2021-03-16 20:07:27 +11:00
Marc Durdin
aa8538a8d9
Merge pull request #4689 from keymanapp/fix/developer/validate-keyboard_info-bcp47-canonicalisation-info
fix(developer): validate keyboard_info should give info on non-canonical bcp47
2021-03-16 19:32:36 +11:00
Marc Durdin
5ec0dbff3b
Merge pull request #4690 from keymanapp/fix/developer/mnemoniclayout-and-casedkeys-not-compatible
fix(developer): &CasedKeys and &MnemonicLayout are not compatible together
2021-03-16 17:19:47 +11:00
Marc Durdin
eeeda6195b
Merge pull request #4681 from keymanapp/fix/windows/4520-setup-start-keyman-only-if-not-running
fix(windows): start Keyman after setup only if not running
2021-03-16 17:17:38 +11:00
Marc Durdin
a01000ba4b chore(developer): update tests 2021-03-16 16:56:43 +11:00
Marc Durdin
12184f1857 fix(developer): support named character codes at end of line
If a named character code was followed by a `\n`, it would not be
recognised.
2021-03-16 13:49:55 +11:00
Marc Durdin
4f958985a0 fix(developer): &CasedKeys and &MnemonicLayout are not compatible together
The test for `&mnemoniclayout` was incorrectly failing to check the
actual state of `&casedkeys`, which broke all mnemonic layouts.
2021-03-16 13:46:34 +11:00
Marc Durdin
4c82c2b545 fix(developer): validate keyboard_info should give info on non-canonical bcp47 2021-03-16 13:44:23 +11:00
Marc Durdin
aebfdecf7a chore(windows): breadcrumbs
Some of our Sentry reports are difficult to track down. Adding user
interaction breadcrumbs to Keyman Configuration (to start with) may
simplify this. I may add more breadcrumbs to other projects now that
this is available.
2021-03-16 06:57:57 +11:00
Marc Durdin
bd4f5b5c67 fix(windows): start Keyman after setup only if not running
Fixes #4520.

Start Keyman after Setup finishes only if Keyman is not already running.

The pattern in this code change is found in a few places. It would be
nice to centralise that in a unit somewhere but I don't want to do
that much refactoring at this point in beta.
2021-03-16 05:32:34 +11:00
Marc Durdin
49f4514b1a
Merge pull request #4663 from keymanapp/fix/windows/4447-trigger-language-sync
fix(windows): Trigger language sync after changes
2021-03-16 05:20:29 +11:00
Marc Durdin
d455967393
Merge pull request #4665 from keymanapp/chore/windows/whatsnew-im-visibility
chore(windows): Update whatsnew.md
2021-03-15 20:25:48 +11:00
Darcy Wong
718279b574 chore(common): Update crowdin for km 2021-03-15 13:11:17 +07:00
Marc Durdin
7c7850631c
Update whatsnew.md 2021-03-15 14:14:19 +11:00
Marc Durdin
075062b320
Merge pull request #4649 from keymanapp/fix/windows/4467-setup-restart-save-install-state
fix(windows): setup must save install state for restarts
2021-03-15 14:12:19 +11:00
Marc Durdin
8acee6ac00
Merge pull request #4661 from keymanapp/fix/windows/4554-online-update-focus
fix(windows): keep online update in focus
2021-03-15 14:11:58 +11:00
Marc Durdin
ed6391996f
Merge pull request #4658 from keymanapp/chore/windows/fully-disable-autostart-task
chore(windows): fully disable auto start task
2021-03-15 14:11:33 +11:00
Marc Durdin
53df62f0b7 chore(windows): 17763 sdk version for kmrefresh 2021-03-15 10:42:21 +11:00
Marc Durdin
38f1d602ad chore(windows): change flag default 2021-03-15 10:40:25 +11:00
Marc Durdin
1c4e956a20 chore(windows): fixup engine makefile 2021-03-15 10:18:05 +11:00
Marc Durdin
6155b544ea fix(windows): Trigger language sync after changes
Fixes #4447.
Fixes #4222.

The symptoms for these two issues are related: the language associations
change and keyboards stop functioning correctly. The issue is described
in detail in #4447.

Although this fix should be considered 'experimental', we should
probably include it in the release of 14.0, because it fixes a
longstanding issue with Keyman and Windows languages.
2021-03-15 09:43:07 +11:00
Marc Durdin
10c0ae8388 fix(windows): keep online update in focus
Fixes #4554.

The Online Update form did not have the correct owner window for some
operations, meaning that the elevation dialog would not get foreground.
2021-03-13 06:30:46 +11:00
Marc Durdin
aae0cb19c4 chore(windows): fully disable auto start task
If the registry setting `HKCU\Software\Keyman
Engine\Debug:Flag_UseAutoStartTask[REG_WORD]` is not `0`, then the this
will enable the restart task. Otherwise, all aspects of it are disabled.

For Keyman 14.0 initial release, we will have this flag disabled. If we
can improve stability of it, we'll consider turning it on.
2021-03-12 16:45:30 +11:00
Marc Durdin
523cf39d10 chore(developer): add B11 ISO code for ABNT2 keyboard 2021-03-12 11:11:42 +11:00
Marc Durdin
c3b70d0186 fix(windows): setup must save install start for restarts
Fixes #4467.

Background: in some scenarios, e.g. files in use, Setup must restart
before it completes. This is particularly the case if kmcomapi.dll is
locked and Windows will move the new version into place after a restart.
In this scenario, we would end up calling the old version of
kmcomapi.dll to install keyboards, etc, which is definitely not
desirable.

Problem: Setup was not saving complete state before the restart, so when
it resumed post-restart, would get a blank slate to work from, losing
command-line options passed in and any choices that the end user may
have made during the installation.

Fix: This PR adds serialization of the `TInstallInfo` state data, so
that the install state can be saved to disk before restart, and reloaded
after the restart. This also means that the `-c` parameter now takes a
filename, being the temporary state JSON file, and when in
"ContinueSetup" mode, no longer needs to perform all the checks it did
previously, making the second half of Setup somewhat faster.

Testing: Added a unit test for the serialization of `TInstallInfo`, and
have tested on a VM in various scenarios without problems.

This fix is somewhat broader than I really like to make while in Beta,
but I don't think there was a viable alternative.
2021-03-11 15:15:26 +11:00
Marc Durdin
1311d100e6
Merge pull request #4635 from keymanapp/fix/windows/4490-4435-transient-profiles-and-invalid-language-codes
fix(windows): Handle disabled profiles and invalid language ids
2021-03-11 09:11:44 +11:00
Marc Durdin
7436643726
Merge pull request #4628 from keymanapp/fix/windows/4619-hotkeys-correctly-ignore-right-modifiers
fix(windows): hotkeys correctly ignore right modifier keys
2021-03-11 09:11:32 +11:00
Marc Durdin
3e45d9d1cb
Merge pull request #4626 from keymanapp/fix/windows/4558-context-help-links
fix(windows): context help links
2021-03-11 09:11:25 +11:00
Marc Durdin
67bfdb970b fix(windows): Handle disabled profiles and invalid language ids
Fixes #4490.
Fixes #4435.

There are three parts to this:

1. Ensure that transient language profiles associated with a disabled
   keyboard are enumerated correctly
2. Stop trusting `LocaleNameToLCID` when it returns a transient language
   id, as it sometimes reports out-of-date values. We don't need to
   trust it in these cases anyway, because we have already collected the
   relevant transient language data from Win8Languages.
3. Finally, setting the profile GUID to `GUID_NULL` is simply tidyup,
   which does not have impact on the running code currently but makes
   state consistent.

I believe that part 2 fixes #4435 because the symptoms are identical.
But as I am unable to repro that particular issue on my machine thus
far, that is an assumption. Hopefully we can get a good test result from
@MakaraSok.
2021-03-10 10:34:55 +11:00
Marc Durdin
591fffce36 fix(windows): fix name of app in help title 2021-03-10 10:32:52 +11:00
Marc Durdin
24ba51ad70
Merge pull request #4627 from keymanapp/fix/windows/4437-ensure-valid-base-layout-on-install
fix(windows): ensure valid base layout on install
2021-03-09 16:56:36 +11:00
Marc Durdin
8f16d1a19f
Merge pull request #4623 from keymanapp/fix/windows/4409-show-version-selector-for-msi
fix(windows): show version selector for Keyman in installer
2021-03-09 16:56:25 +11:00
Marc Durdin
5c8d21b204 fix(windows): hotkeys correctly ignore right modifier keys
Fixes #4619.

The hotkey check in keyman32 would ignore right modifier keys, but the
behaviour was not quite right: it actually needs to take the modifier
into account, but just not treat it as a valid modifier.

While fixing this, I noticed that some of the tests in the
`KeyLanguageSwitchPress` function were using the wrong modifier flags. I
wish I had fewer different modifier flag sets but that ship has probably
sailed.
2021-03-09 16:02:14 +11:00
Marc Durdin
1536a5fe1c chore(windows): address review comments 2021-03-09 15:48:52 +11:00
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
9fd5e11e62 fix(windows): context help links
Fixes #4558.

This makes a number of fixes to get the context help working correctly
in Keyman 14:

1. Adds support for `redirect:` header in help .md files so that we can
   do redirects for the context content in Keyman for Windows help in the
   lua filters.
2. Renames Keyman for Windows help files to .htm, because that's what
   the .chm format is expecting, and what Delphi assumes for its .chm
   integration, and thus splits the html and htm lua filters.
3. Renames and makes more consistent the various context help pages.
4. Adds redirects for all pages that have sufficient content on other
   pages.
5. Fixes the instantiation of help in various Keyman for Windows forms.
6. Defaults to opening help from the Keyman source repo if the calling
   app is running in the source repo (this is just a development-side
   tweak that simplifies my life).
2021-03-09 12:35:43 +11:00
Marc Durdin
12a7d818bc fix(windows): show version selector for Keyman in installer
Fixes #4409.

If a user attempts to install an older version of Keyman, they need to
be able to choose to install the older version, and not the newer one
offered to them from online. However, the selector was hidden in the
Install Options dialog, even when it should have been accessible.
2021-03-09 08:42:33 +11:00
Marc Durdin
4a74d4767f fix(windows): represerve keys on setfocus
Fixes #4557.

When focus changes, we need to re-run `_PreserveAltKeys` as settings may
have changed, meaning we have to preserve a different set of keys. I
also made the `_PreserveAltKeys` function idempotent so that we don't
have to worry about cleanup before calling it -- by calling the cleanup
function internally instead.
2021-03-09 08:19:23 +11:00
Marc Durdin
44be3541af
Merge pull request #4606 from keymanapp/fix/developer/4583-expand-file-names-before-load
fix(developer): Expand filenames before load
2021-03-05 19:38:54 +11:00
Marc Durdin
791edee8ba
Merge pull request #4596 from keymanapp/fix/windows/4591-incxstr-potential-buffer-overrun
fix(windows): incxstr could run over buffer with malformed data
2021-03-05 14:18:02 +11:00
Marc Durdin
c10b010d59 fix(developer): Expand filenames before load
Fixes #4583.
2021-03-05 13:44:55 +11:00
Marc Durdin
a190cc6ff0
Merge pull request #4592 from keymanapp/fix/developer/2241-expansions-cleanup
fix(developer): tidy up expansions tests
2021-03-05 13:14:43 +11:00
Marc Durdin
be2d969775
Merge pull request #4595 from keymanapp/fix/windows/preserved-keymap-mapuschartovk
fix(windows): PreservedKeyMap::MapUSCharToVK line order bug
2021-03-05 13:12:35 +11:00
Marc Durdin
fe2c1cd187 fix(windows): incxstr could run over buffer with malformed data
Fixes #4591.

I fixed incxstr in 4 places:

1. Common/Core: kmx_xstring.cpp
2. Engine: xstring.cpp
3. Test project importkeyboard importkeyboard.cpp
4. Test project m-to-p m-to-p.cpp

I updated mcompile to remove its own copy of incxstr (identical to that
in xstring.cpp) to reduce WETness but opted not to do so for the test
apps, which are pretty much throwaway anyway.

I note that there is more work we could do here; we need to check every
character as we increment so we don't miss a `U+0000` end of string with
malformed data. But I would like to tackle that as a separate job at
some point in the future after Core integration.
2021-03-05 12:50:29 +11:00
Marc Durdin
690a7fd787
Merge pull request #4586 from keymanapp/feat/developer/2241-caps-controlled-keys
feat(developer): &CasedKeys system store
2021-03-05 11:41:16 +11:00