Commit graph

1074 commits

Author SHA1 Message Date
Marc Durdin
c18f1a7e63
Merge pull request #7631 from keymanapp/fix/developer/7628-utf8-urls
fix(developer): URL parameters should be UTF-8
2022-11-11 08:03:00 +11:00
Marc Durdin
31513d657e fix(developer): handle utf-8 paths safely 2022-11-10 15:26:27 +11:00
Marc Durdin
3dbd11939f
Merge pull request #7650 from keymanapp/fix/core/7649-emit-keystroke-writing-action-to-wrong-queue
fix(core): emit keystroke was writing to wrong queue
2022-11-09 20:24:26 +11:00
Marc Durdin
d1ab61eac1
Merge pull request #7659 from keymanapp/fix/developer/7658-handle-unpaired-surrogate-in-token-command
fix(developer): handle unpaired surrogate
2022-11-09 16:46:21 +11:00
Marc Durdin
6ebba9deb1
Merge pull request #7655 from keymanapp/fix/developer/4757-6928-handle-shutdown-on-update-better
fix(developer): handle shutdown cleanup more cleanly
2022-11-09 16:46:04 +11:00
Marc Durdin
5d41e7a36e fix(developer): handle unpaired surrogate
Fixes #7658.

When manipulating text that contains an unpaired surrogate, the text
editor could throw an exception trying to encode the text to send
through to the token command. This simply masks that error.
2022-11-09 09:43:55 +11:00
Marc Durdin
03ae8582db fix(developer): handle shutdown cleanup more cleanly
Fixes #4757.
Fixes #6928.

Three separate ways shutdown is more robust:

1. Destroy main form before web server -- this ensures that all main
   form routines have deregistered app sources from web server.
2. In some situations, `FormClose` can be skipped by shutdown routines,
   for example, if you call `Application.Terminate`. This change ensures
   that we get a second chance to cleanup in the form destructor with
   `DoCloseCleanup`.
3. In the Online Update Check, instead of `Application.Terminate`, we
   now use `Application.MainForm.Close`, which is much more polite, as
   it ensures that changed files are saved, etc, and does proper
   cleanup. This particular change may make the other two somewhat
   irrelevant but they are still sensible as they will cover us for
   other potential form destruction sequences.
2022-11-09 08:18:41 +11:00
Marc Durdin
d2fe2a61f9 fix(developer): patch from previous commit 2022-11-09 07:36:28 +11:00
Marc Durdin
b76eb41a06 fix(developer): handle edge cases for app sources
Relates to #6928 and KEYMAN-DEVELOPER-74.

Fixes one more potential pathway for assertions being raised, and adds
some extra debugging in case there are additional pathways we are not
capturing.
2022-11-09 07:32:05 +11:00
Marc Durdin
d7fbdfc59a
Merge pull request #7617 from keymanapp/fix/developer/7616-inferred-key-text-stability
fix(developer): improve support for inferred key cap text
2022-11-09 05:14:44 +11:00
Marc Durdin
5eb006864b fix(developer): kmlmc has runtime dependency on keyman-version 2022-11-08 16:53:10 +11:00
Marc Durdin
42a9f2ca72 fix(core): emit keystroke was writing to wrong queue
Fixes #7649.

emit_keystroke code path in kmx processor was writing directly to the
core queue instead of to the internal kmx processor queue. This caused
it to be out-of-order in the actions sent to the engine/debugger.

Engines didn't really care but it broke the debugger, for example if
only a deadkey was in the buffer and backspace was pressed, Developer
would assert as it would get unexpected context for the deletions.
2022-11-08 16:31:30 +11:00
Marc Durdin
cbc63c42b2
Merge pull request #7642 from keymanapp/fix/developer/7641-prevent-compile-if-no-project
fix(developer): disable Keyboard|Compile if no project loaded
2022-11-08 14:42:19 +11:00
Marc Durdin
094050ec90
Merge pull request #7635 from keymanapp/fix/developer/7634-handle-encoding-error
fix(developer): handle EEncodingError loading text file
2022-11-08 14:41:35 +11:00
Marc Durdin
460b933a31
Merge pull request #7633 from keymanapp/chore/developer/tidy-up-hints
chore(developer): tidy up compile hints
2022-11-08 14:41:27 +11:00
Marc Durdin
7755e000a8
Merge pull request #7626 from keymanapp/fix/developer/7625-update-monaco-editor-to-0.15.6
fix(developer): update monaco editor to 0.15.6
2022-11-08 14:40:58 +11:00
Marc Durdin
d41c5c5bdb
Merge pull request #7624 from keymanapp/fix/developer/7622-swap-device-type-stability-in-debugger
fix(developer): set keyman.osk immediately after switching device type
2022-11-08 14:40:15 +11:00
Marc Durdin
7539c41b27 fix(developer): disable Keyboard|Compile if no project loaded
Fixes #7641.

If you close the active project and have the Welcome window visible, it
was possible for the Compile action to still be enabled, even though
there was nothing to compile.
2022-11-07 09:01:37 +11:00
Marc Durdin
b62bc0d197 fix(developer): only update charmap for hint when focused
Ensure that the character map is only updated for hint text when
actually editing the hint text.

Fixes KEYMAN-DEVELOPER-S8.
2022-11-07 07:20:09 +11:00
Marc Durdin
8286e8a85c fix(developer): handle EEncodingError loading text file
Fixes #7634.
2022-11-06 05:43:52 +11:00
Marc Durdin
c3b2df80bf chore(developer): tidy up compile hints 2022-11-06 04:59:50 +11:00
Marc Durdin
0f2fbd443d fix(developer): URL parameters should be UTF-8
Fixes #7628.

Indy components do not treat URLs as UTF-8. Our legacy EncodeURL
function (sourced from Indy components) was the same. Discovered we
needed to fixup the parsing of URLs as well as the construction of them;
there may be other places we need to fix, although I did do a search for
the relevant types in TIKE source.
2022-11-05 07:19:31 +11:00
Marc Durdin
9813399d71 fix(developer): update monaco editor to 0.15.6
Updates Monaco editor from 0.14.3 to 0.15.6, incorporating
microsoft/vscode#57617 to fix #7625.

The changes to editor.js are required because `editor.model` was not a
public property and we should have been using `editor.getModel()` all
along.

I have not updated to the latest version of monaco (0.35.1 at time of
writing this), as I wish to minimize the changeset during beta.

While I prefer not to update dependencies in beta, this seems to be a
fairly clean update. Will monitor and can roll back if it leads to
instability.
2022-11-05 06:01:14 +11:00
Marc Durdin
6841a1149f fix(developer): avoid races in init of debugger 2022-11-05 05:27:20 +11:00
Marc Durdin
0c1b1937e3 fix(developer): set keyman.osk immediately after switching device type 2022-11-05 05:26:51 +11:00
Marc Durdin
238a8e9185 fix(developer): improve support for inferred key cap text
Fixes #7616.

Fixes a crash when attempting to infer key cap text from key id, and
cleans up the support for inferred key text so that it works correctly
in the designer.

Also adds a safeguard to KMW to stop invalid key ids causing a crash.
2022-11-04 06:18:24 +11:00
Marc Durdin
6b9c7de6c0 fix(developer): tweak captions for consistency
Fixes #7605.
Fixes #7606.
2022-11-03 09:04:50 +11:00
Marc Durdin
27275013af
Merge pull request #7594 from keymanapp/fix/developer/6974-gif-splash-image-preview
fix(developer): support gif preview images in Package Editor
2022-11-03 09:02:00 +11:00
Marc Durdin
770781c0c9
Merge pull request #7593 from keymanapp/fix/developer/5238-scrollable-details-and-build-tabs
fix(developer): Make Details and Build tabs scrollable
2022-11-03 08:44:21 +11:00
Marc Durdin
69c1be968e
Merge pull request #7595 from keymanapp/fix/developer/7582-publish-keyman-version
fix(developer): publish `@keymanapp/keyman-version` to npm
2022-11-02 14:49:25 +11:00
Marc Durdin
549f627509
Merge pull request #7585 from keymanapp/fix/developer/298-avoid-reformatting-unchanged-system-stores
fix(developer): avoid reformatting unchanged system stores
2022-11-02 14:49:06 +11:00
Marc Durdin
7be90d3ac7
Merge pull request #7584 from keymanapp/fix/developer/2803-basic-project-icon
fix(developer): generate a default icon for basic keyboard projects
2022-11-02 14:35:57 +11:00
Marc Durdin
594d8c9104
Merge pull request #7586 from keymanapp/fix/developer/6363-remove-ancient-samples
fix(developer): remove ancient samples
2022-11-02 13:47:30 +11:00
Marc Durdin
8049399d1f
Merge pull request #7583 from keymanapp/fix/developer/3784-repeated-begin
fix(developer): prevent repeated `begin` statements
2022-11-02 13:47:23 +11:00
Marc Durdin
6ace0e36ef
Merge pull request #7580 from keymanapp/fix/developer/4719-kmlmp-path-awareness
fix(developer): ensure kmlmp handles paths
2022-11-02 13:47:16 +11:00
Marc Durdin
badf5e6d4b
Merge pull request #7531 from keymanapp/fix/developer/7529-enforce-us-layout-for-debugger
fix(developer): Use US base layout for debugger
2022-11-02 13:47:06 +11:00
Marc Durdin
c336a8052c fix(developer): publish @keymanapp/keyman-version to npm
Fixes #7582.

Because of https://github.com/npm/cli/issues/3466, we must publish our
internal dependency @keymanapp/keyman-version. This change adds a common
builder function builder_publish_to_npm in build-utils-ci.inc.sh to help
with that task, which should be adopted by other scripts that need to
publish to npm, in the future.

For now, responsibility for publishing keyman-version is delegated to
kmlmc. In the future, we will move this to a single top-level build
action that publishes all npm modules across the entire repo for the
given version.
2022-11-02 13:33:24 +11:00
Marc Durdin
9421ba29cb fix(developer): support gif preview images in Package Editor
Fixes #6974.

GIF images were not supported in the Details tab, Image file, because we
didn't link in GIF file support. After linking it in, we also needed to
change over the picture rendering to have an intermediate render step,
as the existing model only worked with .bmp images.

At the same time, added warnings for wrongly-sized images to the image
size information.
2022-11-02 12:05:50 +11:00
Marc Durdin
b7d305a8d3 fix(developer): Make Details and Build tabs scrollable
Fixes #5238.

The Details and Build tabs have fixed positional content in the Keyboard
Editor, Model Editor, and Package Editor. Sizing the window too small
can cause content to be outside the bounds of the tab. This patch moves
these tabs into scrollboxes (except for Details tabs on Keyboard and
Model editors, which were already in scrollboxes). The remaining tabs
have resizable content. The tabs will still become fairly unusable if
they become too small, but this should be less of a problem than before.
2022-11-02 11:37:07 +11:00
Marc Durdin
aff1d682cc fix(developer): remove ancient samples
The sample keyboards included with Keyman Developer were decidedly
unhelpful. Removing them and instead we should point users to the
Keyboards repo in the future.

Fixes #6363.
2022-11-01 17:04:38 +11:00
Marc Durdin
4be2dcc9e4 fix(developer): avoid reformatting unchanged system stores
Fixes #298.
2022-11-01 16:33:10 +11:00
Marc Durdin
3e220e33c4 fix(developer): generate a default icon for basic keyboard projects
Fixes #2803.

The new basic project template will now include a default icon,
generated either from the first BCP 47 tag, or else from the first 3
letters of the filename of the keyboard.

The icon will not be included if the keyboard does not target desktop
platforms, as web/touch do not currently support the icon.
2022-11-01 15:14:13 +11:00
Marc Durdin
7793be015b fix(developer): prevent repeated begin statements
Fixes #3784.

Only one type of each `begin` statement should be allowed in any given
keyboard source file.
2022-11-01 14:25:05 +11:00
Marc Durdin
8a18547662 fix(developer): ensure kmlmp handles paths
Fixes #4719.

kmlmp no longer assumes '../source/' for paths. It works with paths
relative to the source file. This makes it more compatible with any
valid source .kps file, as well as making current working directory
irrelevant.

Also adds corresponding tests for building .kmp and verifying file
layout.
2022-11-01 11:56:28 +11:00
Marc Durdin
20e230d3ba
Merge pull request #7553 from keymanapp/fix/developer/7551-exclude-nocaps-from-layer-id-modifiers
fix(developer): exclude `nocaps` from layer id modifier components
2022-10-28 11:56:45 +11:00
Marc Durdin
be2b529e65 fix(developer): exclude nocaps from layer id modifier components
Fixes #7551.
2022-10-27 08:37:04 +11:00
Marc Durdin
bff8e09db5 fix(developer): Use US base layout for debugger
Fixes #7529.

We must always use the US base layout for the debugger, as positional
keyboards are not affected by the active Windows system keyboard. This
fix ensures that the behaviour in the debugger matches what the user
experiences in Keyman for Windows.

Note that this does not address support for mnemonic layouts, tracked in
issue #1074.
2022-10-26 09:49:57 +11:00
Marc Durdin
24ba21abab fix(developer): handle LControl being set by Windows when AltGr pressed
Fixes #7506.

In the keyboard debugger, we need to mask out LControl when AltGr is
pressed by the user, because Windows will generate LControl + AltGr for
European layouts.

Note: have also hidden the System Keyboard debug setting in this commit,
given it is not currently implemented; see #1225.

A follow-up issue is #7529.
2022-10-26 09:37:36 +11:00
Marc Durdin
3c14a8312f
Merge pull request #7431 from keymanapp/fix/developer/7419-handle-invalid-graphics-in-ico-editor
fix(developer): Handle invalid graphics in icon editor
2022-10-21 09:57:01 +11:00
Marc Durdin
08c9cd6239
Merge pull request #7430 from keymanapp/fix/developer/7425-ctrl-key-press-release
fix(developer): Ctrl key to select key was conflicting with shortcuts
2022-10-19 06:19:48 +11:00