Fixes#5465.
Fixes#5561.
If a non-BMP Unicode char was emitted into the internal context, it was
being truncated to a WORD, which caused data loss for multi-group
keyboards.
Includes an update to a unit test to validate this fix.
Fixes#5488.
This updates Keyman Core, corresponding tests, and Keyman Engine for
Linux to support deletion of markers through an action, ensuring that
the action queue does not desynchronize with the context.
Adds some tests for Keyman Core for debugging, verifying contents of
the action list after every keystroke in the test.
Also refactors some of the test helper files to make it easier to
diagnose failing tests and share helper functions.
Adds an action_index to each debug event (not all debug events
need it). This allows the debugger to partially execute a rule
including the possibility of multiple updates to context.
Adds debug events to the kmx processor and corresponding unit tests.
This corresponds largely to the way that keyman32 emits debug events,
but with one key change: debug events in keyman32 are processed
synchronously, whereas in Keyman Core, the full set of debug events will
be returned alongside the final action list for the key event.
Given this difference, there will likely need to be some more data
returned in individual debug events, specifically around intermediate
context manipulation, as required for step-by-step debugging. However,
that will come in a subsequent PR.
Part of #5013.
Adds all the debug infrastructure:
* public API headers
* public API implementation classes and functions
* basic unit tests
* helper classes for recording debug events
* minimal implementation of kmx-specific debug event signalling --
just BEGIN and END events.
* tangential: unit test assertion macros and coloured output
Relates to #5069.
* Adds infrastructure for building keyboard_processor to WASM
* Updates unit tests to work in WASM environment
* Cleanup of documentation
* Consolidation of build script for most platforms
Relates to #5069.
This establishes a baseline Rust build environment and linkage with
common/core/desktop.
This includes:
* build script build.sh which handles builds on Windows, macOS, *nix,
with multiple targets on Windows only at present (M1 on mac to come
when we do the mac integration work.)
* a mock rust processor with a very stubbed-out implementation
* bare bones interface between Rust library and C++ code
* unit tests on Rust and integration tests on C++ side to test the
linkage between the libraries.
This should deliver a set of libraries that can be linked into our
target applications. For ease of deployment, it may be best to make
these static libraries, but I haven't made that decision at this point.
Don't re-set context if it changed because the cursor location was
wrong. When the user switches to the EuroLatin keyboard in the
middle of the line, we're getting a wrong cursor location. This will
be fixed with the next keypress, but it leads to the context string
suddenly having more characters added to the front. If we re-set the
context because it's different now we will loose the information we
previously added to the context.
We now compare the end of the string. If the new context string ends
with the old context string we assume that the cursor position got
updated and don't re-set the context.
This fixes#4678.
We have a `g_debug_ToConsole` variable. However, so far this was
always set to true and output to `syslog`. This change modifies
the default to `false`, and in that case logs to `syslog`. If
`g_debug_ToConsole` is true we no output to the console.
When running the KMX unit tests we set `g_debug_ToConsole` to true.
Turns out that @darcywong00's suggestion for a test case was a Very Good
Idea. The SMP handling in Keyman Core had an egregious bug where only
half of a surrogate pair was being deleted in the UTF-16 context; see
kmx_processor.cpp 425-428. This was then masked by the test runner
masking the damage in the original test case; see kmx.cpp 193-203.
The new test case exercises a number of additional ways of manipulating
the context where surrogate pairs exist, to show we handle the deletion
properly within Keyman Core and in the test runner.