Keyman Developer now remembers the 10 most recently debugged keyboards,
models and packages in the web debugger, across sessions. It determines
the recency of use by the last access time of the object, and caches at
most 10 of each type of object when the IDE session ends.
The cache data is stored in %appdata%\Keyman\Keyman Developer\WebDebugCache.json.
The web debugger is now always available when Keyman Developer is
running, even if the user has not yet clicked 'Start Web Debugging', as
otherwise cached web debug objects would not be immediately available.
Keyman Developer will verify that files listed in the cache are still
available, and will remove them on startup if the file disappears.
Adds polling for changes to keyboards or models under test in the
web debugger. When changes are detected, the keyboards and/or models
are instantly reloaded automatically.
As the array length properties are unsigned integers, taking -1 from
them resulted in an integer overflow when the array was empty. A gotcha
with Delphi-style for loops!
Picked up during #5963 development.
If you ran `kmcomp <file.kmn> <out.js>`, compiler messages were passed
to a function with an incorrect signature, resulting in an exception.
This was a mode that was not widely used, which is why we haven't
picked it up earlier.
Fixes#5779.
Fixes#5731 (I believe mitigation is sufficient to close this issue).
A variety of interrelated font and font size display issues resolved:
1. KVK font was not applied early enough for size calculations, which
meant that we were calculating font scaling per key based on a
default font when transforming from the KVK data for desktop devices
(defaultLayout.ts)
2. Font scaling for non-default layers was calculated when elements were
not visible and had no size information, giving incorrect values. To
resolve this, font scaling is now calculated when a layer is made
visible, which had performance impacts; resolved by reducing
unnecessary `layer.refreshLayout()` calls; see performance point 1
below (oskView.ts:layerChangeHandler())
3. `getViewportScale()` would return an incorrect scaled value when
emulating touch devices on a desktop browser (kmwutils.ts)
4. After switching keyboards, the device-specific scaling factor was not
maintained (oskView.ts:refreshLayout())
Related performance improvements:
1. Multiple calls to `layer.refreshLayout()` in `refreshLayout()` have
been eliminated, and only the currently visible layer is now
refreshed. This dramatically reduces the number of calls to
`getIdealFontSize()` which was the primary concern of #5731.
(visualKeyboards.ts)
2. Unnecessary use of `innerHTML` replaced with `innerText`
(oskBaseKey.ts)
Minor Keyman Developer performance improvement:
1. The web debugger no longer recalculates the OSK twice (test.js)
Fixes#5464.
The keyboards repository already has code to validate .xsd files, using
xmllint. This adds the same functionality directly into kmcomp and TIKE.
Fixes#5718.
The debugger memo control will now filter out action shortcut keys such
as Ctrl+A, Ctrl+O, so that the keyboard being debugged can get the first
chance to look at them and handle them if it wishes.
If the keyboard does not handle the keystroke, then a set of editor
shortcut keys will be handled by the debugger, namely:
* Ctrl+A - select all
* Ctrl+C - copy
* Ctrl+V - paste
* Ctrl+X - cut
* Ctrl+Z - undo
Note that undo semantics are a little weird with the debugger, but that
is not related to this fix. By a little weird, I mean that characters
emitted by the keyboard being debugged do not flow into the undo buffer,
so undo often has no effect. I am not planning to fix this idiosyncrasy
at this time.
Adds support for testing touch layouts without requiring use of device
emulation. Uses new InlinedOSKView.
Does not yet add a view within Keyman Developer; this will come shortly.
Makes it possible to run the kmlmc.cmd compiler wrapper script from
Keyman Developer while debugging from source.
Adds a new class `TKeymanDeveloperPaths` which is similar to
`TKeymanPaths`, to provide a future single location for all Keyman
Developer path-related functions. There are a number scattered through
the source at present, e.g. in `RedistFiles.pas`, so this is just a
starting point.
Fixes#5695.
When the debugger is in single-step mode, reflects the value of option
stores at the time of the change rather than at the beginning of the
batch.