Rename ProcessActionsTestParse to NonUpdatable parse. It does
more then just test. Add handling for the invalidate context action
to this parse, so that if we emit a keystroke we invalidate the context
For the TSF applications in most cases there is no test parse
with updatable=false. In these cases we need to call the
core process event function and process the actions in the
one call. A bool flag has been added to track if the core process
event has been called for the current keystroke
This commit adds call to the core keyboard processor
on wm_keymanim_close event. To get the latest actions.
It also changes the core to allow QIT BACK even when
the context is empty.
Add test fixture to allow Setup and Teardown methods to be used
for all km process action tests.
Modified the DebugAssert macro to not do the early return on its own.
In order for the BK_SURROGATE and BK_DEADKEY flags to be matched with
the correct xstring elements in the context, we need to delete the
elements from the buffer in reverse order.
decxstr would previously assert if attempting to move before start of
string. This is undesirable behaviour as it should instead return NULL
to indicate that we've finished the string.
I also corretected a buffer underrun which would be possible if
malformed data was in the xstring.
I checked all uses of decxstr to ensure that the NULL return value is
being tested correctly.
Fixes#4196.
When deleting characters in a TSF-aware app, we must delete both halves
of a surrogate pair. This behaviour differs from legacy apps, where a
single backspace is usually sufficient to delete both characters.
Truly ancient apps that do not know about Unicode surrogate pairs are
not going to delete both halves with a single backspace event.
Fortunately, these are few and far between; we would handle them on a
case-by-case basis if support questions for them arise.
When we come to integrating Keyman Core into Keyman for Windows, there
will need to be some careful checking of surrogate pair support, as it
is likely that the handling will need to change.
Fixes#2690.
Fixes#3082.
In the debugger, key events such as Enter, Ctrl+C, Ctrl+V were being
swallowed by the debug engine if they did not have rules within the
keyboard. This change emits the key events so the debug memo can
process them normally.
Fixes#3084.
This does two things:
1. Cleans up a bunch of places where we used to use `(int)` typecasts
for pointer math, which was problematic. We now use `(INT_PTR)` per
MSDN https://docs.microsoft.com/en-us/windows/win32/winprog64/rules-for-using-pointers
and then cast that down to `(int)` where necessary, e.g. when storing
string lengths which are never going to be more than a few hundred
characters! Doing this explicitly helps to clarify that we are aware
of the typecast and believe it to be safe.
2. Adds in some build infrastructure for future use of Coverity Scan
https://scan.coverity.com/ which we plan to use for further code
quality updates. I have submitted the project to Coverity and are
now waiting for approval so we can check results. Once we have
approval, I do plan to add this to the nightly build (we need to
keep submissions under 3 builds/day).
Note: I have not yet added Keyman Core (Windows) to this project,
nor are we currently building Keyman Core (macOS) or Keyman for
Linux, but we should consider adding those in future.
If a keyboard emits some actions but then requests that the
default keystroke also be emitted, Keyman was failing to
emit the queued actions. Fixes#2759.
[Windows] More tidyup and robustness for metro app support - debug cleanup and serialization of input (not quite finished)
[windows] Refactor serialized input code when used with key event thread model
[windows] Add consistent precompiled headers for other projects
[windows] Merge console window test into metro support
[Windows] Tidy up work and identify additional TODOs for metro-style app support
[Windows] Ensure error case falls through to default hook processing for console windows
[Windows] Refactor shared memory into memory mapped file so we can cross 32-64 bit boundary
[Windows] Tweaks to C++ security calls and parameters
[Windows] Start refactor of SerialKeyEvent* classes
[Windows] Rename to SerialKeyEventServer (refactoring)
[Windows] Complete refactoring of SerialKeyEventClient class
[Windows] Further encapsulation and cleanup with 'interfaces' to reduce header pollution
[Windows] Complete serialization fix with move of modifier state management from client thread to server thread to guarantee consistency
[Windows] Replace atom-based keyboard switching with memory mapped file indexed to avoid security constraints
[Windows] Fixup Left Alt+Shift interaction with serializer
[Windows] Use Windows 8.1 SDK for test