Commit graph

1032 commits

Author SHA1 Message Date
Steven R. Loomis
9d1599d557 chore(core): add some more marker tests 🙀
- one disabled for now

For #9468
2023-12-21 11:36:35 -06:00
Steven R. Loomis
12aa9a5b69 chore(core): add some more marker tests 🙀
For #9468
2023-12-20 19:23:29 -06:00
Steven R. Loomis
0b3e7a94e8 chore(core): uncomment some more tests 🙀
For #9468
2023-12-20 18:50:21 -06:00
Steven R. Loomis
094f5ad492
Merge branch 'master' into feat/developer/9451-key-not-found-epic-ldml 2023-12-19 10:14:11 -06:00
rc-swag
1cb288144c chore(core): Merge branch 'master' into fix/core/clear-core-context-invalidate 2023-12-19 09:13:43 +10:00
rc-swag
deceabd5c3
fix(windows): review comments and suggestions
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2023-12-18 20:39:16 +10:00
rc-swag
2f737981f7 fix(core): add expected_context to keyboard unit tests
The unit tests needed to be updated to handle the cases
where the context is invalidated by a keystroke. However, they
still need to be able to verify the final string the application
should recieve. To do this a expected context token has been added
to the unit test format.
2023-12-15 11:20:08 +10:00
Steven R. Loomis
767d216936
Merge branch 'master' into feat/developer/9451-key-not-found-epic-ldml 2023-12-14 15:18:06 -06:00
rc-swag
437f938368 fix(core): fix baseline test cases k_000 and k_0008
Test k_000___null_keyboard has been updated as the [RALT K_B] should
cause the context to be reset.

Test k_008___vkey_input__ctrl_alt_2_ has been updated as the [LCTRL LALT
K_B] does not match a keyboard rule the context is deemed invalid and should be
reset.

It could be a consideration to modify the text_store object to better
reflect the state of a applications context however this would mean
we would need two expected results one for the application and one
for the context
2023-12-14 12:25:32 +10:00
Steven R. Loomis
74985f4576 fix(core): ldml: fix bad usage of unique_ptr 🙀
- needed to declare the pointer properly

Fixes: bug(core): Build failures in LDML code on newer Ubuntu versions #10249
2023-12-13 13:06:27 -06:00
Steven R. Loomis
0d3458deef chore(core): comments in key-not-found 🙀
- typo fix
- clarify default behavior for missing keys

For: #9451
2023-12-12 18:43:00 -06:00
Steven R. Loomis
ff5427f258
Merge pull request #10222 from keymanapp/feat/core/9121-regex2-epic-ldml
fix(core): improve memory allocation issues in calling into icu 🙀
2023-12-12 16:21:05 -06:00
Steven R. Loomis
6871cf03b3
Merge pull request #10198 from keymanapp/fix/core/8069-todo-ldml-epic-ldml
fix(core): remove a TODO-LDML 🙀
2023-12-12 16:20:20 -06:00
Steven R. Loomis
26048702d2
Merge pull request #10090 from keymanapp/fix/core/9451-key-not-found-epic-ldml
feat(core): ldml improve key-not-found 🙀
2023-12-12 16:19:53 -06:00
Steven R. Loomis
46b8d0668a
Merge branch 'fix/core/8069-todo-ldml-epic-ldml' into feat/core/9121-regex2-epic-ldml 2023-12-12 08:58:29 -06:00
Steven R. Loomis
c975b61c9b
Merge branch 'fix/core/9451-key-not-found-epic-ldml' into fix/core/8069-todo-ldml-epic-ldml 2023-12-12 08:58:11 -06:00
Steven R. Loomis
1cd97fadb9 feat(core): ldml improve key-not-found 🙀
- move vkey_to_contextreset  table into a common spot in core
- assert that vk < 0x100 to avoid running off the table

For: #9451
2023-12-12 08:56:33 -06:00
Steven R. Loomis
7735fc045a fix(core): improve memory allocation issues in calling into icu 🙀
- typo from  code review

For: #9121

Co-authored-by: Joshua A. Horton <joshua_horton@sil.org>
2023-12-12 08:18:45 -06:00
rc-swag
4a511bde1e fix(core): clear core context on invalidate cache 2023-12-12 23:49:04 +10:00
Steven R. Loomis
6506bfd89d fix(core): improve memory allocation issues in calling into icu 🙀
For: #9121
2023-12-11 16:53:41 -06:00
Steven R. Loomis
cadf7a1e14 fix(core): remove a TODO-LDML 🙀
Fixes: #8069

(all of the rest are in other tickets)
2023-12-08 18:48:01 -06:00
Steven R. Loomis
1e32a2a963 feat(core): ldml improve key-not-found 🙀
- copy exception table for reset from VKScanCodes.cpp
- update test

For: #9451
2023-12-07 17:15:44 -06:00
Steven R. Loomis
3c95c85b7c
Merge branch 'master' into fix/core/9451-key-not-found-epic-ldml 2023-12-07 14:00:59 -06:00
Steven R. Loomis
2071d25745 feat(core): ldml_processor fix for markers 🙀
- don't skip markers when calling context_to_string()! Oops.
- update docs on ldml_processor::remove_text()
- update remove_text() to handle markers in the context string.

This is really: #9468
2023-12-07 19:54:16 +00:00
Steven R. Loomis
392c535270 feat(core): ldml improve key-not-found 🙀
- also affects markers, feat(core): normalization per spec for transforms/etc 🙀  #9468
- keep markers in nfd context string
- fix ldml test harness to handle context reset
- update test case
- still issues with overproduction of markers in the context

For: #9451
2023-12-06 18:33:51 -06:00
Marc Durdin
802f22578a chore(core): address review comments 2023-12-04 13:37:59 +07:00
Marc Durdin
b6daac0bdb feat(core): action struct to action items conversion
Adds state->set_actions(). This sets the Core's action list to match the
contents of the action struct. Note that markers are not supported and
backspace expected_values will be empty, as this information is not
available. As the intended consumer of the action struct does not need
to know this information, this should be adequate.
2023-12-01 12:27:49 +07:00
rc-swag
51a462cff2 chore(windows): Merge branch 'master' into chore/windows/10052/remove-cached-context 2023-11-30 17:26:09 +10:00
rc-swag
d5963e05b6 fix: check for null termination
Determine the best way to check for null termination all compilers
2023-11-30 14:31:18 +10:00
rc-swag
35064073c1 chore(windows): Merge branch 'master' into chore/windows/10052/remove-cached-context 2023-11-30 13:58:19 +10:00
rc-swag
9e1f73573e
fix(core): review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2023-11-30 13:56:01 +10:00
rc-swag
6820f36f7d fix(core): set_if_needed updates a empty cached context
In the case when the cached context had been cleared the
km_core_state_context_set_if_needed call would just compare
the null terminations of both strings and not set the cached
context to the application context.
2023-11-30 13:09:22 +10:00
Steven R. Loomis
4d22b177af feat(core): ldml improve key-not-found 🙀
- unused nit fix

For: #9451
2023-11-29 14:34:33 -06:00
Steven R. Loomis
84cc59c174 feat(core): ldml improve key-not-found 🙀
- restructure keyup/keydown code some
- new utility function emit_invalidate_passthrough_keystroke()

For: #9451
2023-11-29 14:29:26 -06:00
Steven R. Loomis
11334ed7fa feat(core): ldml improve key-not-found 🙀
- distinguish between unmapped and 0-length output strings
- don't do any processing for 0-length output strings
- no change to developer, that will be next
- remove a comment referencing transform=no

For: #9451
2023-11-28 18:07:46 -06:00
Marc Durdin
7ec4832edc fix(core): memory management of options in action struct
Fixes #10067.

Management of memory for persisted options was wrong in the action
struct, as the members key and value would be freed immediately after
being added to the temporary vector (because the vector was of the
struct rather than of the class).

Given the struct is a C struct, we need the memory management to be
explicit, so we now release() each option into the vector as we create
it, which means that its member values will not be freed when the option
is then immediately deleted. (This allows us to use the initial copy of
the members of option that option() constructor does.)

Added the release() function as that was a relatively clear way of
indicating that the contents of the structure are now owned by the
caller, following the pattern from std::unique_ptr.

Finally, the unit test for persisted options was in the action_api.cpp
test module, but it was never called, so this was not being tested. Now
it is.
2023-11-24 07:52:31 +10:00
rc-swag
4480a05412 chore(windows): removed cached context windows engine
Removed the cached context from the windows engine
2023-11-23 16:58:41 +10:00
Marc Durdin
958fb6a5c9 chore: add comment 2023-11-23 11:58:41 +10:00
Marc Durdin
21e0254c95 chore(core): remove vkey output from kmx processor
Fixes #10049.

vkey output was never supported by Core, so this code effectively was a
no-op.
2023-11-23 11:51:22 +10:00
Steven R. Loomis
a9b2dc9ede
Merge branch 'fix/developer/9438-vis-kbd-crash-epic-ldml' into fix/core-9961-optional-startContext-epic-ldml 2023-11-21 18:23:04 -06:00
Steven R. Loomis
037454b86e
Merge branch 'master' into feat/core/9707-tertiary-reorder-epic-ldml 2023-11-21 16:43:57 -06:00
Steven R. Loomis
d82f64fadc
Merge branch 'master' into feat/core/9450-backspace-epic-ldml 2023-11-21 15:01:51 -06:00
Steven R. Loomis
f524519b3f feat(developer): ldml fix testcase processing 🙀
- KM_CORE_BT_UNKNOWN should only be used with an empty context

For: #9468  but related to #9450
2023-11-20 16:57:47 -06:00
Steven R. Loomis
86e8a4f609
Merge branch 'fix/developer/9438-vis-kbd-crash-epic-ldml' into fix/core-9961-optional-startContext-epic-ldml 2023-11-16 16:17:12 -06:00
Steven R. Loomis
350eb83ab3 feat(core): ldml typedef for reorder weights 🙀
For: #9707
2023-11-16 16:13:48 -06:00
Steven R. Loomis
6bc72ff294 fix(core): dx: ldml: startContext should be optional in ldml test data 🙀
- per spec
- update tests to remove these

Fixes: #9961
2023-11-16 15:51:56 -06:00
Steven R. Loomis
3cd6c7630c feat(core): ldml tertiary reorder 🙀
- handle case where there's no tertiary base before the first char
- separate some element API tests from the actual tertiary test.  Tests were failing because of now-correct implementation.

Fixes: #9707
2023-11-16 13:55:49 -06:00
Steven R. Loomis
30d951ef67 feat(core): ldml dx: launch ldml unit tests before keyboard tests 🙀
For: #9707
2023-11-16 13:43:12 -06:00
Steven R. Loomis
f7566c7356 feat(core): ldml tertiary reorder 🙀
- implemented tertiary reordering
- reinstated bengali reordering!
- fixed reordering to be longest-first (by sorting the list before applying)
- updated debug logging

Fixes: #9707
2023-11-16 12:31:08 -06:00
Steven R. Loomis
85a5afafc9 feat(core): ldml tertiary reorder 🙀
- failing test cases, hooray! In XML and C++

For: #9707
2023-11-16 12:31:08 -06:00