Commit graph

132 commits

Author SHA1 Message Date
Eberhard Beilharz
b51d0e0b00
fix(linux): Address code review comments 2021-08-19 12:15:42 +02:00
Eberhard Beilharz
f0c3280517
fix(linux): Fix lost context after pressing K_SHIFT
This fixes typing `n>` with sil_ipa keyboard which no longer output
the expected `ŋ` because pressing the shift key reset the context.

For modifier key presses we now exit `KMX_ProcessEvent::ProcessEvent`
early.

This change also removes a redundant line from engine.c. Clearing
the context happens in `reset_context()` again if necessary.

Fixes #5591.
2021-08-18 19:26:45 +02:00
Eberhard Beilharz
3f8d8f5cff
Merge pull request #5564 from keymanapp/chore/core/uninstall
chore(common/core): Add uninstall option to build script
2021-08-09 08:15:20 +02:00
Eberhard Beilharz
3509ddeb7c
chore(common/core): Add uninstall option to build script 2021-08-06 16:53:33 +02:00
Eberhard Beilharz
c9497fd494
feat(common/core): Implement shiftFreesCaps and capsOnOnly 2021-08-06 16:13:58 +02:00
Eberhard Beilharz
f3ea1dafee
fix(common/core): Turn off capslock on key down
This change improves capslock handling with a capsAlwaysOff keyboard.
Previously, the caps lock indicator was turned on while holding down
the Caps Lock key. With this change we turn it off immediately. This
is done by forcing caps lock off even if the state already seems to
match.

Also, for capsAlwaysOff keyboards skip further processing of caps
lock key after we turned capslock off again.
2021-08-06 12:21:20 +02:00
Eberhard Beilharz
dabfea57ab
Merge pull request #5536 from keymanapp/chore/linux/5022-debian
chore(linux): Consolidate Debian source packages 📦
2021-08-06 12:02:54 +02:00
Eberhard Beilharz
3d10e6100f
chore(linux): Remove no longer needed debian directories
The previous commit created a consolidated toplevel `debian`
directory.
2021-08-06 11:25:00 +02:00
Marc Durdin
d76eca052e fix(common/core/desktop): split smp for context chars
Fixes #5465.
Fixes #5561.

If a non-BMP Unicode char was emitted into the internal context, it was
being truncated to a WORD, which caused data loss for multi-group
keyboards.

Includes an update to a unit test to validate this fix.
2021-08-06 12:28:15 +10:00
Eberhard Beilharz
c3b27b1c98
Merge pull request #5518 from keymanapp/refactor/core/comment
refactor(common/core): Move comment to where it belongs
2021-08-04 14:20:47 +02:00
Eberhard Beilharz
5cd1d0e432
refactor(common/core): Move comment to where it belongs 2021-08-04 12:25:49 +02:00
Eberhard Beilharz
0a28af6c83
chore(common/core): Allow shell script for kmcomp
This change allows to build the keyboards on Linux if a `kmcomp`
script can be found in PATH. Otherwise we check for and use `wine`
and `kmcomp.exe`.
2021-08-04 12:25:02 +02:00
Marc Durdin
6c645ff03c chore: fix comment 2021-07-29 16:36:26 +10:00
Marc Durdin
bfdc3afb45 chore(common/core): refactor backspace handling
Moves the responsibility for deletion of markers when the users presses
the backspace key, from `kmx_processor::process_event` to
`KMX_ProcessEvent::ProcessGroup`. This has no effect on usage of Keyman
Core, but:

1. Simplifies the association between context and action further
2. Ensures that `m_actions` and `state->actions` will always be the
   same length, making future refactoring of these simpler
3. Allows us to use the index into the m_actions array for Debug events,
   which simplifies the interleaving of these for the upcoming Debugger.

When the user presses backspace at start of context (where there may be
markers in the cached context, but no characters), the kmx processor
will delete any markers prior to insertion point before requesting that
the consumer emit the backspace virtual key back to the application, to
allow the application to handle backspace at start of text.
2021-07-29 16:15:36 +10:00
Marc Durdin
3b4dfec809 chore(common/core): unit test fixes
Per review comments.
2021-07-28 10:02:39 +10:00
Marc Durdin
60b1cc7545 chore: fixup damaged merge 2021-07-27 08:32:02 +10:00
Marc Durdin
5a94012f01
Merge branch 'chore/common/core/debug-additional-tests' into chore/common/core/5488-delete-markers-reliably 2021-07-27 08:23:24 +10:00
Marc Durdin
1292b407bc
Merge branch 'master' into chore/common/core/debug-additional-tests 2021-07-27 08:17:53 +10:00
Marc Durdin
75ce10510a chore(common/core): address review comments
Also introduce a specific enum for backspace type rather than
inappropriately using the action item type enum.
2021-07-27 07:08:30 +10:00
Marc Durdin
91cde81d35 chore(common/core): extra test for context consistency 2021-07-26 15:29:16 +10:00
Marc Durdin
796a2d4c85 chore(common/core): handle deletion of markers in actions
Fixes #5488.

This updates Keyman Core, corresponding tests, and Keyman Engine for
Linux to support deletion of markers through an action, ensuring that
the action queue does not desynchronize with the context.
2021-07-26 15:23:20 +10:00
Eberhard Beilharz
0eca43d4ea
feat(common/core): Implement capsAlwaysOff system store
This change implements the core part in a way that makes the tests
pass. This still needs corresponding changes in the engine.
2021-07-23 10:25:28 +02:00
Eberhard Beilharz
a16b320c17
chore(common/core/desktop): Update readme 2021-07-23 10:16:14 +02:00
Marc Durdin
a8acee1770
chore: Apply suggestions from code review
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2021-07-23 07:18:17 +10:00
Marc Durdin
507c5a4e78 chore(common/core): additional debug tests
Adds some tests for Keyman Core for debugging, verifying contents of
the action list after every keystroke in the test.

Also refactors some of the test helper files to make it easier to
diagnose failing tests and share helper functions.
2021-07-22 20:05:01 +10:00
Marc Durdin
4560ae4f69 feat(common/core): add action_index to all debug events 2021-07-22 16:33:31 +10:00
Marc Durdin
4fbfd33943 feat(common/core): debug action index
Adds an action_index to each debug event (not all debug events
need it). This allows the debugger to partially execute a rule
including the possibility of multiple updates to context.
2021-07-20 14:07:33 +10:00
Marc Durdin
05971a21cf chore(common): Merge branch 'master' into feat/common/core/desktop/kmx_debugger_events 2021-07-19 04:24:35 +10:00
Marc Durdin
104827f103 chore(common): rename kmx_process files 2021-07-19 04:07:31 +10:00
Marc Durdin
a389c68f07 chore(common): rename header 2021-07-19 03:43:35 +10:00
Marc Durdin
2a0adf27d0 chore(common): Merge branch 'master' into feat/common/core/desktop/kmx_debugger 2021-07-19 03:34:04 +10:00
Marc Durdin
ceec63493d chore: rename KMX_Processor to KMX_ProcessEvent 2021-07-19 03:29:44 +10:00
Marc Durdin
a99717c0a1 chore: rename source files to match master 2021-07-19 03:27:19 +10:00
Eberhard Beilharz
7d2f2cd928
refactor(common/core/desktop): Rename Load method
Rename KMX_Environment::Load to KMX_Environment::Set.

Fixes #5435.
2021-07-08 09:07:32 +02:00
Marc Durdin
37bb7b77cf feat(common/core/desktop): add debug events
Adds debug events to the kmx processor and corresponding unit tests.
This corresponds largely to the way that keyman32 emits debug events,
but with one key change: debug events in keyman32 are processed
synchronously, whereas in Keyman Core, the full set of debug events will
be returned alongside the final action list for the key event.

Given this difference, there will likely need to be some more data
returned in individual debug events, specifically around intermediate
context manipulation, as required for step-by-step debugging. However,
that will come in a subsequent PR.
2021-07-08 11:16:58 +10:00
Marc Durdin
e114f31bba chore(common): kmx fixtures need debug symbols 2021-07-08 09:43:19 +10:00
Marc Durdin
e7d955147d chore: address review comments 2021-07-08 09:02:21 +10:00
Eberhard Beilharz
69a2e9ec27
refactor(common/core/desktop): Fix file and class names
- rename source files for `kmx_processor` -> `kmx_processor.*`
- rename class `KMX_Processor` -> `KMX_ProcessEvent` with source
  files `kmx_processevent.*`

Closes #5436.
2021-07-07 15:25:15 +02:00
Marc Durdin
29bc616b6d chore: address review comments 2021-07-06 15:31:04 +10:00
Marc Durdin
b1c0cbf405 chore(common): cleanup cross-platform code 2021-07-06 15:31:01 +10:00
Marc Durdin
2992e1ed83 feat(common/core/desktop): kmx debugger basic infrastructure
Part of #5013.

Adds all the debug infrastructure:

* public API headers
* public API implementation classes and functions
* basic unit tests
* helper classes for recording debug events
* minimal implementation of kmx-specific debug event signalling --
  just BEGIN and END events.
* tangential: unit test assertion macros and coloured output
2021-07-06 15:30:19 +10:00
Marc Durdin
e22ce72442
Merge pull request #5324 from keymanapp/docs/shared-build-docs
docs: start consolidation of build config docs
2021-07-01 11:57:09 +10:00
Ross
889718830e fix(common): make xcode happy about empty loop 2021-06-29 17:29:33 +10:00
Ross
e83594038f fix(common): errors in comments 2021-06-29 17:03:31 +10:00
Ross
87d35c6d1c fix(common): get handle caller buffer size small than internal Fixes #5336 2021-06-29 16:42:53 +10:00
Marc Durdin
4af39a58b0 docs: start consolidation of build config docs
As the build environment documentation is duplicated across each of the
Keyman platform projects, it has become somewhat convoluted and
inconsistent. This PR moves all the mac-based and shared documentation
into docs/build, with placeholders for Windows and Linux documentation
to be moved in the next PR.

The idea is that a developer can configure their box to build any of the
available projects for that platform (web and android build on all three
main dev platforms).

Keeping the build documentation in one place makes it much simpler to
keep it consistent and up-to-date as well, as well as keeping us aware
of potential dependency conflicts between projects.

The icing on the cake is the resources/devbox/macos/macos.sh script,
which I have tested and takes a bare metal mac box through to a full
Keyman development environment (except XCode, there's always something!)
2021-06-21 21:12:27 +10:00
Gunnar Hjalmarsson
194c697e17
chore(linux): Build also on riscv64 to facilitate migration on Ubuntu
(cherry picked from commit 5a58794f8f)
2021-06-21 11:41:36 +02:00
Eberhard Beilharz
e1a5b1d727
Merge pull request #5304 from keymanapp/chore/linux/cherry/changelog
chore(linux): Update changelogs to match Debian 🍒
2021-06-18 09:05:12 +02:00
Marc Durdin
3bd754b230
Merge pull request #5233 from keymanapp/feat/common/wasm-infrastructure
feat(common): keyboard_processor wasm build
2021-06-18 16:09:56 +10:00
Eberhard Beilharz
d29ad2d4ed
chore(linux): Update changelogs to match Debian
The changelogs should match what got uploaded (and accepted) to
Debian so that the changelog reflects the upload history to Debian.

(cherry picked from commit f91b52d3ea)
2021-06-17 15:19:39 +02:00