- make ldml.cpp print FAILED on failure especially because of https://github.com/microsoft/vscode-cpptools/issues/487
- add vkey validation (#7135)
- add disp validation
- fix: a latent bug in disp! disp.count was === vkey.count, oops. Fix and test cases.
For: #7985
- add HardwareToKeymap in common/web/types
- add a mt-iso keyboard, very close to stock mt.xml
- add machinery for parsing modifier key sequences
- more test machinery
- add assertions against invalid modifier sequences
Fixes: #7965
- spec: update spec for layr.mod field
- core/include/ldm: update constants
- bitfield modelled after s_modifier_names[] / LCTRLFLAG etc.
- new test case k_004_tinyshift, also update k_010_mt
- update const builder to ignore all *_map properties
- split utility out to utils, add test
For: #7533
(cherry picked from commit 0346bea488)
add tests:
- k_100, k_101, k_102 all failed for different reasons.
- rename test cases from 'fail' to 'keytest' since they don't fail anymore
For: #7401
- update k101_fail.xml / k102_fail.xml to use an implied import
- update build.sh to bring over the imports from CLDR
For #7534
comon/web/types:
- the USVirtualKeyMap was actually somewhat ISO-ish. Correct it.
- also, add the spacebar row.
- create a new ISOVirtualKeyMap, but not linked in anywhere.
core/tests:
- add a new test keyboard, k_010_mt.xml which is Maltese 47-key
- update k_003 which was impacted by this
For: #7965
Fixes#7649.
emit_keystroke code path in kmx processor was writing directly to the
core queue instead of to the internal kmx processor queue. This caused
it to be out-of-order in the actions sent to the engine/debugger.
Engines didn't really care but it broke the debugger, for example if
only a deadkey was in the buffer and backspace was pressed, Developer
would assert as it would get unexpected context for the deletions.
Fixes#7643.
The kmn statement `save()` action was being written directly to the
state queue, bypassing the internal kmx action queue. This caused two
issues:
1. save() actions were out-of-order with other actions on the same key
event.
2. The number of items in the internal action queue became out of sync
with the debug item queue, which would cause the debugger to fail
with an assertion.
The new test in debug_api.cpp validates this second issue as the number
of items in the action queue now matches the expected count in the
corresponding debug item.
Fixes#7237.
Full clean, configure and build will be required for Core, Developer
after this change.
kmc is much less unwieldy a name than kmldmlc, and becomes our platform
for future compiler integration. Start of implementation for #5283 also.
The hextobin tool is used to help us construct invalid .kmx files
without having to either hack these into the compiler, or write them
with a hex editor. It feels a little bit of overkill, but this makes it
easy to (a) work with our intended file structures, and (b) review any
changes to these invalid keyboard tests.
Note: I did do a cursory search for a hex2bin or hextobin that we could
easily use but did not find a good simple cross-platform tool that we
could consume (`xxd -r` would work but AFAICT constrains our format to a
dump which is much harder to work with and read -- I wanted to be able
to annotate with file structures.)
For an example, see ik_000_null_invalid.txt.
This means that building the invalid keyboards for tests requires node,
but that should be fine given we need node to build the valid keyboards
anyway.
I've put hextobin under core/tools but it could just as well live under
common/tools in the future, if we find it useful for other project unit
tests.
Removes .kmx from repo and builds them from the source .xml files using
kmldmlc (building that if necessary also with a poor fella's dependency
check for now), and generally a lot of cleanup of the meson.build files
for the ldml tests.
Moves keyboards to a subfolder of the ldml unit test folder to keep them
neat and tidy and avoid embedding huge files into ldml.js for test of
WASM.
Note: 000_null_keyboard and 002_null_invalid do build successfully, but
the core ldml keyboardprocessor currently fails on them, because they
are missing keys and vkey sections.