Commit graph

17 commits

Author SHA1 Message Date
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
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
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
Marc Durdin
232df37400
chore: Update core/src/state.cpp 2024-02-07 12:29:45 +11:00
Marc Durdin
9ba919c2a9 fix(core): surrogate handling, markers in app context, and memory leak
Fixes #10615 (surrogate handling, km_core_state_context_set_if_needed).
Fixes #10616 (markers in app context, in unit tests)
Fixes #10617 (memory leak in replace_context).

The surrogate handling and markers in app context bugs were quite
tangled, so opted to fix those both together in one commit. The memory
leak was spotted while verifying the changes for surrogate handling.

Surrogates were not handled in is_context_unchanged, and opted to
refactor to work directly with km_core_context_item arrays rather than
continue with the string-based comparison, for simplicity.

While writing the corresponding unit tests, realised that the
app_context checks were incorrect in a number of existing tests, and so
fixed up the existing tests at the same time as writing up the new
tests. The only changes to core for this were to add assertions for the
app_context to ensure that markers are not inadvertently added.
2024-02-03 09:16:16 +07:00
Marc Durdin
0b7556870f
chore: Apply suggestions from code review 2024-02-01 18:56:26 +11:00
Marc Durdin
15f2412717 chore(core): build whackamole 2024-02-01 12:50:23 +07:00
Marc Durdin
1b88ab99be fix(core): make km_core_state_get_actions() idempotent
Fixes #10582.

Returned struct from the `km_core_state_get_actions()` API is now owned
by the state object. This is a change in API contract. The corresponding
`km_core_actions_dispose()` API has been made private, because there is
never any need for API consumers to call it. As this change is happening
in alpha, we won't bump the ABI version.

`state->app_context` is now guaranteed to be in sync with
`state->context` after `km_core_process_event()`, with the actions
struct populated at that point.

The next and final step in this refactor is to remove the actions queue
altogether from the Core and make that a kmn-only concept, but that will
wait until 18.0. The only consumers of the actions queue are the
kmn-specific interactive debugger in Keyman Developer, and kmn-specific
Input Method eXtensions in Keyman Engine for Windows.
2024-02-01 11:28:08 +07:00
Eberhard Beilharz
604fbc1a75
chore(linux): Rename namespace kbp to core 2023-10-19 10:39:55 +02:00
Marc Durdin
db76e2541d chore: rename KM_KBP_ to KM_CORE_ 2023-10-09 14:53:22 +07:00
Marc Durdin
ba5f18defd chore: rename km_kbp_ to km_core_ 2023-10-09 14:53:13 +07:00
Marc Durdin
906a0a2ed7 chore: fix typo 2023-10-09 14:41:01 +07:00
Marc Durdin
4ef18f5e29 chore(core): rename keyboardprocessor.h to keyman_core_api.h
Fixes #9721.

Also tweaks some documentation references to keyboardprocessor, but does
not touch those relating to debian/control.
2023-10-09 14:21:01 +07:00
Marc Durdin
a58680f89b chore(common): move common/core/desktop/ to core/ 2022-05-18 07:22:10 +10:00
Renamed from common/core/desktop/src/state.cpp (Browse further)