Commit graph

2740 commits

Author SHA1 Message Date
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
Joshua A. Horton
1d8595d48e fix(developer): developer build path partial reversion 2022-10-25 15:44:26 +07:00
Joshua A. Horton
23b516182f change(web): build/<product> -> build/app/<product> 2022-10-25 09:12:43 +07:00
Joshua A. Horton
d36b912c6f fix(developer): KMW copy path lacking a path piece 2022-10-25 08:42:42 +07:00
Joshua A. Horton
242cb1312c fix(developer): fixes developer-server's Web build call 2022-10-24 10:06:18 +07:00
Joshua A. Horton
0d643a88f7 fix(developer): KMW build product copying 2022-10-24 10:05:08 +07: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
c804295965
Merge pull request #7496 from keymanapp/chore/merge-master-into-feature-ldml
chore: merge master into feature-ldml
2022-10-21 09:56:37 +11:00
Marc Durdin
df34c064c7 chore: Merge branch 'feature-ldml' into chore/merge-master-into-feature-ldml 2022-10-20 06:33:57 +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
Marc Durdin
ec953cf689
Merge pull request #7372 from keymanapp/fix/developer/4324-handle-model-hints-and-warnings-cleanly
fix(developer): Handle hints and warnings cleanly
2022-10-19 06:19:34 +11:00
Steven R. Loomis
56dcbc9a88 fix(developer): support updated CLDR structure 🙀
- backspace is now a transform type. Keep the same test.
2022-10-18 12:53:06 -05:00
Steven R. Loomis
85da473a85 chore(developer): update DTD location 🙀
- dtd is in a subdirectory to match CLDR layout
2022-10-18 12:52:27 -05:00
Steven R. Loomis
66a5cdb1f9 chore(developer): ldml: update tools and data for keyboard-preview 🙀
- update tooling in common and kmc
- update spec
- update test files
2022-10-18 11:32:41 -05:00
Steven R. Loomis
85ed41e16c
Merge pull request #7410 from keymanapp/fix/developer/7404-elem0-epic-ldml 2022-10-17 08:53:23 -05:00
Joshua Horton
66f9c520f7
Merge pull request #7343 from keymanapp/change/web/drop-touch-aliases
change(web): now utilizes 'inputMode="none"' on supported touch devices 📴
2022-10-17 10:18:58 +07:00
Steven R. Loomis
7e5c9ec675 fix(developer): offset of 0th elem str must be 0000 🙀
- update test fixture
- update kmx_plus.cpp to require this

Fix: 7404
2022-10-14 15:00:49 -05:00
Sabine
55d2554797 chore(developer): change remaining old datatype-names to new names ( e.g. char -> KMX_CHAR ) 2022-10-14 13:59:11 +02:00
Marc Durdin
6b52b439bb fix(developer): address ico validity during assignment 2022-10-14 16:49:17 +11:00
Marc Durdin
25d91e8f4d fix(developer): manual attachment for kmw in server 2022-10-14 11:10:26 +11:00
Marc Durdin
2cf6bf3f60 chore(common): update build.sh dependencies for epic-ldml 2022-10-14 10:45:00 +11:00
Sabine
f74e69682d chore(developer): add some more keyboardtests 2022-10-13 17:13:43 +02:00
Marc Durdin
0945b92732 chore: Merge branch 'master' into chore/merge-master-into-feature-ldml 2022-10-13 13:38:31 +11:00
Sabine
aeb000fbd3 chore(developer): add Message CERR_InvalidCharacter to UTF16TempFromUTF8() ; change #include <> -> "" 2022-10-12 17:05:48 +02:00
Sabine
a6870f0816 chore(developer): re-include AddCompilerVersionStore in Compiler.cpp 2022-10-11 16:41:07 +02:00
Marc Durdin
f054b06014 chore(developer): minor tweaks for usability
move Clear All button in read-only view
don't show a dialog for invalid graphics
2022-10-11 07:29:46 +11:00
Marc Durdin
bf8f636a14 fix(developer): Handle invalid graphics in icon editor
Fixes #7419.

If the user attempts to add an invalid graphic (e.g. a .png file saved
with a .ico extension), Keyman Developer will no longer crash when
trying to load the file.

Note that while the keyboard will still compile with an invalid graphic,
Keyman for Windows will refuse to install it. I have not tested other
platform handling of such a situation.
2022-10-11 07:18:09 +11:00
Marc Durdin
51a3679a90 fix(developer): Ctrl key to select key was conflicting with shortcuts
Fixes #7425.

In the layout editor, the "Select Key" dialog was being shown sometimes
when using shortcuts such as Ctrl+V. The reason this happened was that
the shortcut handler in Delphi was capturing the keydown of the V key,
so the Ctrl event handler never saw it. Then, if you pressed Ctrl+V, and
released the Ctrl key before releasing the V key (which often happens
when you press a shortcut rapidly), the Ctrl event handler would receive
notification of the Ctrl key release and trigger the "Select Key"
dialog.

This fix shifts the Ctrl key event handler out of the keyboard editor
and into the top-level application events handler -- this is the best
place where we can preview key events before they are passed to the
shortcut handler and controls for processing.

This necessitated adding a general `ControlKeyPressedAndReleased` event
function to the TIKE editor base class. This is currently only used by
`UfrmKeymanWizard` and `UfrmOSKEditor`.

I noted that the OSK editor did not currently support the Ctrl key
event to select a new key. As a part of this fix, I added support for
this, to bring it into line with the Layout Editor and the Touch Layout
Editor.
2022-10-11 06:39:38 +11:00
Joshua A. Horton
f8438d2117 chore(web): Merge branch 'master' into change/web/drop-touch-aliases 2022-10-10 09:04:24 +07:00
Marc Durdin
47da67a742 chore(developer): fixup import 2022-10-10 11:51:55 +11:00
Marc Durdin
faa37f24a9 chore(developer): handle EOL diff in tests 2022-10-10 10:55:35 +11:00
Marc Durdin
b4641efe69 feat(developer): generate .js from ldml .xml
Compiles a LDML keyboard .xml down to a KeymanWeb .js file. Currently
only supports some metadata.

Next step is to generate touch layout data, then to embed the binary kmx
data.
2022-10-10 10:08:37 +11:00
Marc Durdin
8d7ea6dcbb chore(developer): enable sourcemaps for kmc 2022-10-10 05:42:18 +11:00
Sabine
2738052264 chore(developer): check for '_' after Errornumber in Filename 2022-10-06 16:38:49 +02:00
Sabine
d879761de7 chore(developer): change ErrExtra, change CompileMsg, change _finddata in FileExists 2022-10-06 16:33:52 +02:00
Marc Durdin
1dd4fe5315 chore(developer): enable source maps for kmc commands
Fixes #7408.

For kmc*.cmd, enables source maps. If you are running kmc from node on
your own system, you may need to enable source maps in other ways.

Note that error reports should be going through to Sentry, and source
maps should already be used for those.
2022-10-06 17:48:22 +11:00
Sabine
b9acd28703 chore(developer): remove python from meson.build 2022-10-05 17:06:18 +02:00
Sabine
6b11fff8a9 chore(developer): revert changes in AddCompileMessage, tidy up CreateTempFile 2022-10-05 17:04:50 +02:00
Sabine
4536dbfc91 chore(developer): include check for correct Filename + rename var + change whitespace changes 2022-10-04 14:22:08 +02:00
Sabine
fa9a66b3ec chore(developer): change mostly whitespace changes 2022-10-04 14:08:59 +02:00
Sabine
4141b90c33 chore(developer): move CERR-tests into test/keyboards/invalid 2022-10-03 15:50:58 +02:00
Marc Durdin
61a058fcec
Merge pull request #7371 from keymanapp/fix/developer/7368-handle-invalid-kps-in-project-view
fix(developer): handle invalid kps xml when loading project view
2022-10-03 14:26:59 +11:00
Marc Durdin
e28da7b1dd fix(developer): kmc was overwriting kmx with kvk 2022-09-30 07:54:39 +10:00
Joshua A. Horton
fe585b88af chore(web): removal of 'kmw_ip' checks, references 2022-09-29 08:17:47 +07:00
Marc Durdin
687c8bae99
Merge pull request #7370 from keymanapp/fix/developer/7090-7091-use-path-backslash-format-for-parameters
fix(developer): ensure backslash in paths passed to kmcomp
2022-09-29 09:22:57 +10:00
Marc Durdin
7a819598e7 fix(developer): Handle hints and warnings cleanly
Relates to #4324 (but slightly orthogonal.)

We wanted some message classes to be handled in the lexical model editor
more cleanly, including drill-down to line of error. A few changes
required to make this work well:

1. Parse error messages from kmlmc. This is not perfect but works while
   the two projects are kept in sync, which they always are for Keyman
   Developer. Note that at this stage, .ts warnings are not captured in
   this parser, as they are generated by tsc.
2. Drill-down in Wordlist Editor Frame to find line of error
3. Model editor reports ownership of .tsv files so they can be loaded
4. In case of model editor not open (e.g. building from project view),
   the TSV standalone editor was not displaying the frame, so it never
   actually worked.
5. If the text editor had never loaded, then FindError was effectively
   a no-op; adds code to seek to error line after page load finishes.
6. Ensures that if we attempt to seek an error in a sub-file owned by
   an editor (e.g. .tsv owned by .model.ts, .kvks owned by .kmn), that
   the parent editor will be focused first. Does not verify all paths
   here, just the tsv one.
2022-09-28 20:17:44 +10:00
Marc Durdin
73e0a2e461 fix(developer): generate valid js when using unquoted digits in stores
Fixes #7005.

If a developer used single digit values in stores, unquoted (which is
not really the usual approach, but should work just fine for non-zero
values), the KMW compiler would emit invalid single-digit hexadecimal
escapes for them, e.g. `"\x1"` instead of `"\x01"`.

Sample code:

```
store(option) 1

if(option = 1) + 'a' > 'one'
if(option = 2) + 'a' > 'two'
+ '1' > set(option = 1)
+ '2' > set(option = 2)
```

It is not immediately obvious from this code, but the value `1` is
actually a character with value `'\x01'` or `U+0001`!

The more usual approach will not encounter this problem:

```
store(option) '1'

if(option = '1') + 'a' > 'one'
if(option = '2') + 'a' > 'two'
+ '1' > set(option = '1')
+ '2' > set(option = '2')
```

Note that the following is a compile error (due to internal use of
null terminated strings).

```
store(option) 0
```
2022-09-28 17:00:55 +10:00
Marc Durdin
f5b8effaae fix(developer): ensure backslash in paths passed to kmcomp
Fixes #7090.
Fixes #7091.

While kmcomp loads most files just fine when paths with forward slashes
are passed in, it fails to parse target path correctly when building one
file out of a project.

For example, if the user runs:

```
kmcomp.exe -t khmer_angkor.kmn release/k/khmer_angkor/khmer_angkor.kpj
```

Then the following error arises:

```
khmer_angkor.kps: Error: 0001 Validation error: The system cannot find the path specified.
khmer_angkor.kps: Failure: Package C:\Projects\keyman\keyboards\source\khmer_angkor.kps had validation errors.
```

This patch ensures all paths passed in as command-line parameters are
converted to backslashes, matching the expected Windows format. While I
only needed to fix the `FParamTarget` parameter in order to address the
reported issues, for consistency I applied the same fix to all input
paths.
2022-09-28 16:50:58 +10:00
Marc Durdin
50614fb088 fix(developer): handle invalid kps xml when loading project view
Fixes #7368.
2022-09-28 16:32:36 +10:00