Fixes#4854.
Adds some intelligence to the drag + drop integration with the Touch
Layout Editor, so that we always drop a character onto a key cap, we
always drop a code onto a ID field, and can drop both character + code
together (if the key id is T_new_..., or holding Ctrl key).
Hovering over any key for 0.25 sec while dragging will select that key.
You can then continue dragging down to the subkey array and drop onto
any of those keys. Note that you do not need to hover for 0.25 sec
before you drop onto a key -- the drop operation will select the key
under the cursor when dropping.
Double-clicking will update the selected key or subkey; Ctrl will do
both the key cap and the ID.
Fixes#6098.
If the list of languages is too long to fit, the menu now dynamically
adds a scroll bar.
As a bonus:
* The language names are sorted (non-Latin scripts at bottom for now)
* `nmake install` works again (in kmshell, presence of `install` folder
was confusing it)
Fixes#4877.
If a keyboard is invalid for any reason (missing, wrong version),
then it would not appear in Configuration, which would break the
row indexing, causing crashes.
Cherry-picked from stable-14.0 branch.
The iOS code was making a direct call to `keyman.core.resetContext()`
rather than to `keyman.resetContext()`. This meant that the
`OutputTarget` was not set and the `newContext` event would never be
called (as well as triggering a background warning in the language
processor "OutputTarget missing during an invalidateContext call").
Refactored to include a wrapper for `resetContext()` in ios-host.js, as
I think it's better to proxy all calls to KMW consistently through the
host javascript.
(There are a couple of other direct calls which could be cleaned up;
search for "evaluateJavaScript" to find all calls; I think we could
consider build a wrapper for all these calls?)
Adjusts the dimensions to use pixel boundaries to prevent antialiasing
for some of the key preview and longpress popups, and adjusts horizontal
positioning of key preview to center more precisely, for iOS.
I am not sure how this was ever working. This just adds the specific
structure sizes for x64 and verifies that the Delphi sizes are the
same as the reported sizes from C++.
Minor tweak to printf format args for kcframe to assist in this, sorting
a compiler warning.
Observed while debugging another issue on iOS. The
VisualKeyboard.waitForFonts function sets up a busy timer to wait for
font loading. This functionality is not even needed on the iOS app,
because it's really only used for the touch alias elements.
However, it was being called, potentially multiple times, leading to the
timer never being removed. On Android, the timer was correctly removed.
This aligns the iOS code path with the Android code path.
Fixes#5942.
The touch alias element position was not consistent across all browsers,
leading to misalignment in some situations. Identified missing CSS to
make the positioning consistent, as far as I can tell, which led to the
additional benefit of reducing the per-browser special cases.