feat(web): add KeyboardProcessor interface and CoreKeyboardProcessor class
Basic key events are working with this change, and it is possible to type on a hardware keyboard.
Part-of: #13926
Follows: #15167
feat(web): move/add core-adapter module
This change moves the core adapter to core-adapter module which contains the code to bind to the the WASM core binaries and adds additional type definitions for Core.
Part-of: #13926
Follows: #15165
fix(web): improve determination of default path 🍒
Browser extensions can dynamically insert scripts into a web page, so it's possible that the last script is not what we expected, which can cause the path to the script to be wrong. This change fixes the determination of the default path by using the `document.currentScript` property. It also replaces the use of the deprecated `substr` function in those places.
Cherry-pick-of: #15159Fixes: #15158
This implements and uses`CoreKeyboardProcessor.applyContextFromTextStore`
and `CoreKeyboardProcessor.saveMarkersToTextStore`, and also adds unit
tests.
Fixes: #13926
Test-bot: skip
This change moves the core adapter to core-adapter module which contains
the code to bind to the the WASM core binaries and adds additional type
definitions for Core.
Part-of: #13926
Test-bot: skip
Browser extensions can dynamically insert scripts into a web page, so
it's possible that the last script is not what we expected, which
can cause the path to the script to be wrong. This change fixes the
determination of the default path by using the `document.currentScript`
property. It also replaces the use of the deprecated `substr` function
in those places.
Cherry-pick-of: #15159Fixes: #15158
Test-bot: skip
feat(web): add `Deadkey.toString` function
This allows to use `console.log(deadkey.toString())` to output the values of a deadkey which is useful for debugging.
fix(web): add unit tests for DeadkeyTracker and fix a few bugs
- initialize `Deadkey.matched` in c'tor
- fix `Deadkey.equal` method
- verify deadkey exists before removing it in `DeadkeyTracker.remove`
- add unit tests for DeadkeyTracker
Cherry-pick-of: #15113
Meson 1.1 changed the name of the options file from `meson_options.txt` to `meson.options`. Currently we're stuck with Meson 1.0 as minimum Meson version because we still support Ubuntu 22.04 Jammy, but on some machines a newer version of meson gets installed which causes the options to be ignored.
The first attempt to simply symlink or copy `meson_options.txt` to `meson.options` failed because git on Windows doesn't support symlinks by default, and Meson complains if it finds two options files (#15127).
Fortunately not having an options file is only a problem for Core where we have one option in the options file that defaults to true. The solution implemented in this change is to always pass the option to Meson.
Cherry-pick-of: #15131
- initialize `Deadkey.matched` in c'tor
- fix `Deadkey.equal` method
- verify deadkey exists before removing it in `DeadkeyTracker.remove`
- add unit tests for DeadkeyTracker
Test-bot: skip
Meson 1.1 changed the name of the options file from `meson_options.txt`
to `meson.options`. Currently we're stuck with Meson 1.0 as minimum
Meson version because we still support Ubuntu 22.04 Jammy, but on some
machines a newer version of meson gets installed which causes the
options to be ignored.
The first attempt to simply symlink or copy `meson_options.txt` to
`meson.options` failed because git on Windows doesn't support symlinks
by default, and Meson complains if it finds two options files (#15127).
Fortunately not having an options file is only a problem for Core where
we have one option in the options file that defaults to true. The solution
implemented in this change is to always pass the option to Meson.
Cherry-pick-of: #15131
Test-bot: skip
After review with @ermshiperete, we decided to remove this. It is
unclear to me why we were ever clearing the context when a beep was
triggered by the keyboard. This is legacy from v2.0 of KeymanWeb, and I
suspect it's an edge case that no one has ever noticed, but I can't see
a reason to keep it.
Test-bot: skip
* Simplify the build dependency / child tree
* Split building and testing tooling so we don't rebuild components
* Fixup expected outputs to avoid repeated builds of components
* Remove unused dependency references
* Move test.sh targets into build.sh, so that testing doesn't lose
dependency tracking and cause unnecessary rebuilds. (Note that I have
not yet deleted test.sh.)
* Make predictive-text a direct child of engine, so that we don't build
it twice (or even more times)
Test-bot: skip
sentry-manager is used by Keyman Engine for Android and Keyman Engine
for iOS, but not directly by KeymanWeb, nor does it have any
dependencies on /web. So it does not make sense to keep it under /web.
es-bundling is used by sentry-manager and potentially other /common/web
tools in the future, so moving it under /common/tools makes it more
consistent in the future.
This is part of simplifying the web source tree; these changes do not
make significant build performance differences at this time.
Test-bot: skip