Commit graph

1262 commits

Author SHA1 Message Date
rc-swag
7e759d5187
fix(windows): apply suggestion from @ermshiperete
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-07-28 08:57:44 +10:00
rc-swag
eb19c28ab9 fix(windows): comments and formating 2026-07-23 22:16:17 +10:00
rc-swag
a07fff8be3 fix(windows): change option_stack to deque
when vectors are resized the memory is realocated so all the option
pointers become invalid. Using a deque avoids this it has all the same
methods so it is straight replacement.

fixes: #15961
2026-07-23 21:52:32 +10:00
rc-swag
5946dce596
Merge branch 'master' into fix/windows/clone-state-actions-deep-copy
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-06-19 14:27:55 +10:00
Marc Durdin
a47fd7d365 fix: use meson subsystem and needs_exe_wrapper for cross builds on Windows
Relates-to: mesonbuild/meson#15840
Fixes: #15753
Test-bot: skip
2026-06-10 05:43:42 +02:00
Marc Durdin
87064bf552
Merge pull request #16048 from keymanapp/dependabot/npm_and_yarn/core/tests/unit/wasm/picomatch-2.3.2
chore(deps-dev): bump picomatch from 2.3.1 to 2.3.2 in /core/tests/unit/wasm
2026-06-09 01:09:06 +10:00
Marc Durdin
99caec107b
Merge pull request #16047 from keymanapp/dependabot/npm_and_yarn/core/tests/unit/wasm/js-yaml-4.2.0
chore(deps-dev): bump js-yaml from 4.1.0 to 4.2.0 in /core/tests/unit/wasm
2026-06-09 01:08:57 +10:00
Marc Durdin
8e9e372066
Merge pull request #16046 from keymanapp/dependabot/npm_and_yarn/core/tests/unit/wasm/glob-10.5.0
chore(deps): bump glob from 10.4.5 to 10.5.0 in /core/tests/unit/wasm
2026-06-09 01:08:47 +10:00
dependabot[bot]
0cc44cf63e
chore(deps-dev): bump picomatch in /core/tests/unit/wasm
Bumps [picomatch](https://github.com/micromatch/picomatch) from 2.3.1 to 2.3.2.
- [Release notes](https://github.com/micromatch/picomatch/releases)
- [Changelog](https://github.com/micromatch/picomatch/blob/master/CHANGELOG.md)
- [Commits](https://github.com/micromatch/picomatch/compare/2.3.1...2.3.2)

---
updated-dependencies:
- dependency-name: picomatch
  dependency-version: 2.3.2
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 10:52:33 +00:00
dependabot[bot]
199bd9ae07
chore(deps-dev): bump js-yaml in /core/tests/unit/wasm
Bumps [js-yaml](https://github.com/nodeca/js-yaml) from 4.1.0 to 4.2.0.
- [Changelog](https://github.com/nodeca/js-yaml/blob/master/CHANGELOG.md)
- [Commits](https://github.com/nodeca/js-yaml/commits)

---
updated-dependencies:
- dependency-name: js-yaml
  dependency-version: 4.2.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 10:52:24 +00:00
dependabot[bot]
45329e9680
chore(deps): bump glob from 10.4.5 to 10.5.0 in /core/tests/unit/wasm
Bumps [glob](https://github.com/isaacs/node-glob) from 10.4.5 to 10.5.0.
- [Changelog](https://github.com/isaacs/node-glob/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/node-glob/compare/v10.4.5...v10.5.0)

---
updated-dependencies:
- dependency-name: glob
  dependency-version: 10.5.0
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 10:52:23 +00:00
dependabot[bot]
92440317b8
chore(deps): bump minimatch in /core/tests/unit/wasm
Bumps  and [minimatch](https://github.com/isaacs/minimatch). These dependencies needed to be updated together.

Updates `minimatch` from 9.0.5 to 9.0.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v9.0.5...v9.0.9)

Updates `minimatch` from 5.1.6 to 5.1.9
- [Changelog](https://github.com/isaacs/minimatch/blob/main/changelog.md)
- [Commits](https://github.com/isaacs/minimatch/compare/v9.0.5...v9.0.9)

---
updated-dependencies:
- dependency-name: minimatch
  dependency-version: 9.0.9
  dependency-type: indirect
- dependency-name: minimatch
  dependency-version: 5.1.9
  dependency-type: indirect
...

Signed-off-by: dependabot[bot] <support@github.com>
2026-06-02 10:52:22 +00:00
Marc Durdin
729c71d64d chore: minor cleanup prior to merge of web-core preflight
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-28 14:16:19 +02:00
Marc Durdin
39fba5e29c chore(core): fixup const cast 2026-05-27 15:17:48 +02:00
Marc Durdin
6a98a39b8a
Merge branch 'master' into chore/web-core-preflight 2026-05-27 22:37:12 +10:00
rc-swag
4e4dfe7275 fix(windows): add cstring include to action.cpp
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-19 14:01:06 +10:00
rc-swag
3b6e0a8da1 fix(windows): add comment to capture issue in test code
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-05-18 21:18:25 +10:00
rc-swag
49e222c273 fix(windows): actions list copy constructor
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-18 21:07:30 +10:00
rc-swag
29b12ba42e fix(core): fix memory leak in state_api test
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-05-18 14:10:22 +10:00
rc-swag
c0a29a32f7 fix(core): remove white space and comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-14 16:28:59 +10:00
rc-swag
3c0e7a72c1 fix(core): update unit tests 2026-05-14 15:58:12 +10:00
rc-swag
33cddff16e fix(windows): deep copy for state object
This commit update the state object to have a deep copy for the
action_struct member. The tests have been modified but have
a few issues however this branch is out of date with the refacted
master branch for unit tests. This commit gets the main change in
a future commit will update the tests.
2026-05-12 18:03:46 +10:00
rc-swag
bd1e404ae4
Merge branch 'master' into fix/windows/15857/caps-indicator-switched-off-select
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-05-06 10:47:24 +10:00
rc-swag
28d2c98030 fix(windows): rename local variable no actions
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-27 10:39:34 +10:00
rc-swag
874c2509b0 fix(windows): initialise action object in contructor
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-04-24 10:40:45 +10:00
rc-swag
986ee97cb3 fix(windows): add apply actions call to core_event
add apply_actions_and_merge_app_context to km_core_event parent.
This ensures any actions as result of the km_core_event are applied
and actions object updated.

Fixes:#15857
2026-04-23 15:04:51 +10:00
Marc Durdin
a5c09f40a1 chore(core): fixup test keyboard paths 2026-03-27 10:52:34 +01:00
Marc Durdin
8311c65077
Merge branch 'epic/web-core' into auto/A19S25-merge-master-into-web-core 2026-03-27 16:30:55 +11:00
Eberhard Beilharz
3816077d0a
Merge pull request #15609 from keymanapp/fix/core/15569_ldml
fix(core): fix keydown/up handling for LDML keyboards

For LDML keyboards this change fixes the `emit_keystroke` flag so that it always has the same value for the KeyDown and the KeyUp event. This fixes some problems with stuck keys. Previously we would set `emit_keystroke=TRUE` on KeyDown but `emit_keystroke=FALSE` on KeyUp for frame keys. This caused Linux to never see the KeyUp event, resulting in a stuck key.

Also add unit tests that verifies that the actions that we get after calling `km_core_process_event` are what we expect.

Follows: #15656 
Fixes: #15569
Fixes: #15550
2026-03-25 11:20:11 +01:00
Eberhard Beilharz
aa36cfe961
fix(core): address code review comments
Some checks failed
Keyman Build Summary / Summarize build status checks (push) Has been cancelled
2026-03-24 12:43:11 +01:00
Marc Durdin
70c54b0b40 chore: Merge branch 'epic/web-core' into auto/A19S24-merge-master-into-web-core
Some checks are pending
Keyman Build Summary / Summarize build status checks (push) Waiting to run
2026-03-16 04:49:38 +01:00
Eberhard Beilharz
1c5dbe8caf
docs(core): improve keyhandling doc
This improves the keyhandling doc according to the code review suggestions
in #15629.

Follows: #15629
Build-bot: skip
Test-bot: skip
2026-03-12 18:15:09 +01:00
Eberhard Beilharz
87da33796a
Merge pull request #15656 from keymanapp/refactor/core/cleanup
refactor(core): cleanup 

- fix whitespace
- rename private fields of `ldml_processor` to start with underscore

Precedes: #15609
2026-03-04 15:27:47 +01:00
Eberhard Beilharz
9836070299
fix(core): clarify and extend comment 2026-03-02 17:43:34 +01:00
Eberhard Beilharz
67468c4dce
fix(core): address code review comments
Co-authored-by: Marc Durdin <marc@durdin.net>
2026-03-02 17:28:19 +01:00
Eberhard Beilharz
382b5d45e3
fix(core): fix keydown/up handling for LDML keyboards
For LDML keyboards this change fixes the `emit_key` flag so that it has
the same value for the KeyDown and the KeyUp event. This fixes some
problems with stuck keys. Previously we would set `emit_key=TRUE` on
KeyDown but `emit_key=FALSE` on KeyUp for frame keys. This caused Linux
to never see the KeyUp event, resulting in a stuck key.

Also add unit tests that verifies that the actions that we get after
calling `km_core_process_event` are what we expect.

Fixes: #15569
Fixes: #15550
2026-03-02 17:27:36 +01:00
Eberhard Beilharz
2bd6cfd735
refactor(core): rename fields to start with underscore
Test-bot: skip
2026-03-02 17:27:15 +01:00
Eberhard Beilharz
d8a5f694da
refactor(core): fix whitespace
Build-bot: skip
Test-bot: skip
2026-03-02 17:26:14 +01:00
Eberhard Beilharz
3c525cc244
chore: Merge branch 'epic/web-core' into auto/A19S23-merge-master-into-web-core 2026-02-27 10:19:18 +01:00
Eberhard Beilharz
f07f95452f
docs(core): add keyhandling doc
This documents the state of `km_core_actions.emit_keystroke` for
different keys pressed. Also some cleanup in other docs.

This documents the state after merging #15609 (for ldml keyboards) and
NN (for kmn keyboards).

Follows: #15609
Build-bot: skip
Test-bot: skip
2026-02-25 19:31:00 +01:00
Eberhard Beilharz
2237db95f6
test(core): add LDML baseline test with minimal keyboard
This replaces and enables the commented `k_000_null_keyboard` test which
didn't work because keys that are not on any layer don't produce output.
This instead defines a minimal keyboard with just two keys and then tests
typing a key that is on the keyboard followed by a key not on the keyboard.

Test-bot: skip
2026-02-20 12:09:08 +01:00
Eberhard Beilharz
b405bf5842
refactor(core): simplify loop for removing text
Instead of using an iterator to loop over the context items, incrementing
a counter on each iteration, and then finally removing the calculated
number of context items from the list, this change loops through the list
and looks at the last context item, removing it if necessary.

Follows: #15596
Test-bot: skip
2026-02-18 17:34:02 +01:00
Eberhard Beilharz
df2b675202
fix(core): changed ldml tests to use context list instead of vector
Production code uses a list of context items, so this change modifies
the tests to also use a list instead of a vector to more closely match
production code.

Addresses code review comment.

Test-bot: skip
2026-02-18 16:08:59 +01:00
Eberhard Beilharz
32bb1c8502
fix(core): fix iterator in backspace handling
This change replaces the reverse iterator loop that holds a stale iterator
across `pop_back()` calls with a pattern that directly accesses
`context.back()` on each iteration. This avoids undefined behavior from
iterator invalidation when mutating the list or vector.

While so far the previous code didn't show problems, it might still access
released memory depending on the implementation. The documentation for
`pop_back()` says "References and iterators to the erased element are
invalidated", so the previous implementation was clearly wrong.

Test-bot: skip
2026-02-18 15:58:45 +01:00
Eberhard Beilharz
1b4a04a35a
Merge pull request #15590 from keymanapp/chore/core/docs
chore(core): update API `changes.md` document 🎼

Turns out we have a document for the API changes, in addition to the release notes. That document got overlooked so far. This change now updates that doc with the API changes that happened since v17.

Follow-up-of: #15471
Follow-up-of: #12769
2026-02-16 10:32:08 +01:00
Marc Durdin
90f77bdbd6
Merge pull request #15589 from keymanapp/auto/A19S22-merge-master-into-web-core
auto: A19S22 merge master into web-core 🎼
2026-02-13 18:28:40 +07:00
Eberhard Beilharz
0af3a2a89d
chore(core): update API changes.md document
Turns out we have a document for the API changes, in addition to the
release notes. That document got overlooked so far. This change now
updates that doc with the API changes that happened since v17.

Build-bot: skip
Test-bot: skip
Follow-up-of: #15471
Follow-up-of: #12769
2026-02-13 12:08:35 +01:00
Marc Durdin
ed63b70bb4
Merge branch 'epic/web-core' into auto/A19S22-merge-master-into-web-core 2026-02-13 11:08:05 +07:00
Marc Durdin
74d1bc8fc2 chore(core): address review comments
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2026-02-01 06:47:49 +11:00
Marc Durdin
766c6992ed fix(core): normalization segment should end on NFC boundary, not NFD
When normalizing, we need to stop processing on an NFC boundary, not an
NFD boundary, to support normalizations such as in Bengali, where
appending `U+09D7` to a context of `U+0995 U+09C7` should result in
`U+0995 U+09CC`.

The specification is unclear on this; see https://unicode-org.atlassian.net/browse/CLDR-19218

This also updates the ldml keyboard unit test suite to support running
in full NFC mode (used in all Engine implementations) as well retaining
the NFD mode (now only used by the debugger).

Side note: the Bengali normalization failure case was picked up by the
improvements to the unit test suite, proving once again that good tests
are so valuable.

Fixes: #15491
Fixes: #15505
Follows: #15488
Relates-to: CLDR-19218
2026-01-28 14:32:25 +11:00