Commit graph

4544 commits

Author SHA1 Message Date
Keyman Build Agent
3ebb31c66d auto: increment master version to 15.0.161 2021-12-03 13:35:27 -05:00
Eberhard Beilharz
e890bede2c
refactor(common/core): Use defines in all xstring tests 2021-12-03 18:14:35 +01:00
Eberhard Beilharz
cbf0155108
fix(common/core): Fix KMX_Context::Add()
When our context buffer is too small we now properly move the
content by a full xstring unit so that we don't end up with the
buffer starting with an invalid sequence (half of a dead key or
surrogate pair).
2021-12-03 17:26:15 +01:00
Eberhard Beilharz
7766718f7c
chore(linux): Add more core unit tests 2021-12-03 17:26:14 +01:00
Eberhard Beilharz
855cb9d916
refactor(linux): Refactor two core tests
This change refactors two tests to no longer rely on obscure internal
knowledge. This allows the tests to also run in ibus-keyman.
2021-12-03 17:23:36 +01:00
Eberhard Beilharz
e31cf4a1d8
chore(linux): add non-surrounding-text feature to tests
This also fixes a failing test (`048 - modifier keys keep context`)
if surrounding text is not supported. If the user presses the
capslock key we shouldn't reset the context if no rules match.

Fixes #5613.
2021-12-03 17:23:35 +01:00
rc-swag
faff079e2e
chore(common):fix typos in commments 2021-12-03 15:18:59 +10:00
Marc Durdin
5e65120b3f fix(web): call postKeystroke on banner touch
Relates to #3621.

Ensures that the `begin postKeystroke` entry point is called when the
user accepts a suggestion.
2021-12-03 14:13:43 +11:00
Ross
884c249286 chore(common): add more description to Buf method
Also updated the doxy to remove the brief tag.
Made mirror change to appint.h
2021-12-03 10:01:53 +10:00
Keyman Build Agent
0c6780a386 auto: increment master version to 15.0.160 2021-12-02 13:01:57 -05:00
Marc Durdin
9e5c30bca6 chore(web): fixup header comments per review 2021-12-02 07:26:41 +11:00
Marc Durdin
2159df10ee chore: tweak keyboard rules for full caps
Removed the 'heuristic' test as it is probably not appropriate for
testing. Removed the mobile-specific platform from the touch layout as
it did not include a caps layer (and should have been identical to the
tablet one anyway).
2021-12-02 05:11:08 +11:00
Keyman Build Agent
a2cb10cf71 auto: increment master version to 15.0.159 2021-12-01 13:01:30 -05:00
Marc Durdin
62796e3489 feat(web): Caps Layer and double-tap gesture
Fixes #3620.

Implements the Caps Lock layer support and the double-tap gesture on the
shift key to access it.

The double-tap gesture has been implemented with a view to extension to
support other multi-tap gestures in the future. However, for now, it is
limited to supporting the Shift key, if and only if the keyboard
includes a Caps layer.

The reason for this v15 limitation is that multi-tap on regular keys
would involve either rewinding the previous keystroke (the first tap),
or forcing keyboard developers to consider 'rota' style rules in their
keyboards to support the multi-tap gestures, as we need to make sure
that the first tap is accepted and processed for immediate feedback.
This needs more design, to avoid unnecessary complexity in the keyboards
and/or the rewinding of the keystroke (even though that is conceptually
supported in Keyman Engine for Web already). Basically, we don't want to
constrain the way that a keyboard author may use the multi-tap gesture
by hard-coding the rewind, but neither do we want to make all multi-tap
gestures needlessly complex to author.

The shift key (and other modifiers, potentially in future) needs special
support for multi-tap as the key that is being tapped changes with the
layer change. This is currently managed through recognising `K_SHIFT` in
the key id.

I have tried to follow the `PendingGesture` pattern for multi-tap, and
the gesture itself supports a series of taps, not just a double-tap. The
maximum time to complete the tap series is 125msec * number-of-taps, so
for a double-tap is 250msec.

The changes to support a Caps Lock layer itself were minimal; just
adding the `text.KeyboardProcessor.getStateFromLayer` function and
calling it during `KeyEvent` construction. The remaining changes relate
to the multi-tap gesture.

Minor changes:
* I moved `constructNullKeyEvent` to `KeyEvent` in order to make it
  more accessible to other classes.
* The multi-tap gesture does not have a promise to complete, so that is
  now an optional member of the `PendingGesture` interface.
2021-12-01 08:59:43 +11:00
Marc Durdin
88ea17e0ba feat(developer): support for Caps Lock layer 🍆
Relates to #3620.

Allows keyboard developers to add a Caps Lock layer (called 'caps'),
which will be accessible through double-tap of Shift key, in an upcoming
PR.

Also adds test keyboards to exercise the functionality when it is
available.
2021-12-01 08:53:23 +11:00
Marc Durdin
1683998999
Update common/core/web/input-processor/src/text/inputProcessor.ts
Co-authored-by: Darcy Wong <darcy_wong@sil.org>
2021-11-30 12:54:31 +11:00
Keyman Build Agent
13f3bc91d4 auto: increment master version to 15.0.158 2021-11-29 13:03:07 -05:00
Eberhard Beilharz
30897811c0
Merge pull request #5966 from keymanapp/fix/linux/tests
fix(linux): Fix ibus-keyman integration tests 🎫
2021-11-29 09:55:30 +01:00
Ross
cfed6f1112 feat(windows): add comment for clarity 2021-11-29 10:52:17 +10:00
Ross
059af9efd1 feat(windows): add MapUSCharToVK to kmx processor 2021-11-29 10:52:16 +10:00
Ross
c875cdbc11 feat(windows): add MapUSCharToVK to kmx processor 2021-11-29 10:52:14 +10:00
Ross
58384ede0a feat(windows): clean up old kbd kmx 2021-11-29 10:52:13 +10:00
rc-swag
3df288779e feat(core): update copyright
Co-authored-by: Eberhard Beilharz <ermshiperete@users.noreply.github.com>
2021-11-29 10:52:12 +10:00
Ross
c95e565fbf feat(windows): Replace magic numbers with constants 2021-11-29 10:52:11 +10:00
Ross
6f6600a501 feat(windows): Rename kbd file fix meson build for key list test 2021-11-29 10:52:09 +10:00
Ross
4d1eee983c feat(windows): remove unused vk_count var 2021-11-29 10:52:08 +10:00
Ross
31d7200a63 feat(windows): replace insert_or_assign with[] for hashmap
Also update issue comment for future removal of winows processor code
2021-11-29 10:52:07 +10:00
Ross
2353590138 feat(windows): Make keyboad key list unique 2021-11-29 10:52:06 +10:00
rc-swag
4e1ccfdd4f feat(windows): apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2021-11-29 10:52:04 +10:00
Ross
edfa9bcddd feat(windows): Fix auto using int instead of uint 2021-11-29 10:52:03 +10:00
Ross
ac16abdb18 feat(windows): rename key_rules -> key_list 2021-11-29 10:52:02 +10:00
Ross
9f44cf49fc feat(windows): fix pkeys index add comments
The pkeys was using the wrong counter as a index
in the map check therefore matching the incorrect key
2021-11-29 10:52:01 +10:00
Ross
72d8188a38 feat(windows): complete common core get rules api 2021-11-29 10:51:59 +10:00
Ross
9c1b6702b3 feat(windows): inital commit get rule keys api 2021-11-29 10:51:58 +10:00
Marc Durdin
83eb8395d6 chore(web): cleanup sample test 3621 keyboard 2021-11-29 10:54:46 +11:00
Marc Durdin
f9b4be6883 chore(web): refactor constructNullKeyEvent 2021-11-29 10:54:28 +11:00
Marc Durdin
3f35cc0bf8 chore(web): Merge branch 'master' into feat/web/3621-newcontext-group 2021-11-29 10:22:22 +11:00
Marc Durdin
e98930dedb
Merge branch 'master' into fix/web/5779-font-scaling-in-osk 2021-11-29 09:12:15 +11:00
Keyman Build Agent
158faa8589 auto: increment master version to 15.0.157 2021-11-26 13:01:09 -05:00
Keyman Build Agent
9cdda14f9e auto: increment master version to 15.0.156 2021-11-24 13:01:44 -05:00
Eberhard Beilharz
37e20c5cbb
fix(linux): Fix ibus-keyman integration tests
Previously we overwrote our test data, so we basically ran the same
test repeatedly under different names.

Properly running them showed some failures which this change also
fixes or skips.
2021-11-24 15:59:44 +01:00
Marc Durdin
ce2aa9a166 feat(web): support for &layerChanged
Relates to #3621.

Add support for `&layerChanged` system store. This store is set to `1`
before a `begin postKeystroke`, if the keystroke it follows resulted in
a layer change, either programatically through a keyboard rule, or
through a `nextlayer` property of the touched key.
2021-11-24 06:45:20 +11:00
Marc Durdin
f5fc41712d feat(web): add support for begin postKeystroke
Relates to #3621.

This adds support for `begin postKeystroke` to KeymanWeb. This is now
close to final, apart from support for `&layerChanged`.
2021-11-23 16:56:16 +11:00
Marc Durdin
dcedb15b69 chore: cleanup comments and defines 2021-11-23 16:08:19 +11:00
Marc Durdin
bbbf1afce7 feat(web): basic support for newContext
Relates to #3621.

Adds basic support for `begin newContext`.
2021-11-23 15:00:47 +11:00
Marc Durdin
e803bed813 feat(web): start-of-sentence test keyboard
Relates to #3621.

Initial draft of keyboard to test start-of-sentence detection.
2021-11-23 10:11:10 +11:00
Keyman Build Agent
e0034044b0 auto: increment master version to 15.0.155 2021-11-22 13:02:01 -05:00
Keyman Build Agent
a5f2892c31 auto: increment master version to 15.0.154 2021-11-20 13:01:25 -05:00
Keyman Build Agent
ceadbb0fc5 auto: increment master version to 15.0.153 2021-11-19 13:01:24 -05:00
Marc Durdin
b2566c948a
Merge branch 'master' into mdecxstr 2021-11-19 10:35:01 +11:00