spiegel-keyman/web/testing
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
..
attachment-api fix(web): Simplify initialization of options 2021-06-24 11:50:03 +07:00
basic-iframe Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
build-visual-keyboard fix(web): Cuts keyboard event handlers for documentation ele 2020-03-10 13:55:21 +07:00
caps-lock-layer-3620 feat(web): Caps Layer and double-tap gesture 2021-12-01 08:59:43 +11:00
chirality test(web): Add version to test chirality keyboard 2020-06-05 11:02:33 +07:00
ckeditor chore(web): add test page for playing with CKEditor 2021-05-17 05:52:21 +10:00
common chore(web): unit tests for fat finger and variable store 2021-09-27 10:17:12 +10:00
desktop-ui chore(web): test page tweaks (fewer keyboards on non-toolbar UI) 2021-07-21 15:46:00 +07:00
empty-row fix(common/core/web): Revert check for length 0 2021-09-16 09:29:52 +07:00
inline-osk Update web/testing/inline-osk/index.html 2021-09-22 10:53:04 +10:00
issue005 Update more KMW tests/samples for BCP-47 2018-02-22 10:18:07 +07:00
issue29 Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
issue53 Recompiled all testing keyboards with current Developer. 2018-03-09 14:18:01 +07:00
issue62 Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
issue63 Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
issue103 PR review addressing. 2018-03-19 14:02:20 +07:00
issue115 Merge branch 'master' into web-shift-on-643 2018-03-21 06:45:32 +07:00
issue116 Recompiled all testing keyboards with current Developer. 2018-03-09 14:18:01 +07:00
issue160 PR review addressing. 2018-03-19 14:02:20 +07:00
issue266 Remove test kmx file 2018-10-03 08:59:47 +07:00
issue271 Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
issue382 Implements test keyboard and fix for 'undefined' font issues. 2018-12-17 15:38:00 +07:00
issue917-context-and-notany fix(web): support for notany() and context() 2020-11-04 14:37:52 +11:00
issue920 Fixes #920. A deadkey match in KeymanWeb 10.0 keyboards should not be skipped in context indexing 2018-06-19 13:34:03 +07:00
issue1332 Add KMW test page 2018-11-22 09:31:47 +07:00
issue2924 chore(web): fixup name of oldtestvariable.js 2021-09-27 10:43:58 +10:00
issue3701 change(web): addresses PR reviews 2020-10-26 08:16:39 +07:00
issue5455 fix(web): Have util.wait check useAlerts option 2021-08-03 10:33:16 +07:00
keyboard-errors Centralized + cleaned the testing section in prep for beta. 2018-03-09 14:00:14 +07:00
mnemonic Add test keyboard for mnemonic layout on web 2018-05-09 08:50:42 +07:00
options-with-save fix(web/engine): Fixes variable stores, adds test page 2020-03-24 12:50:59 +07:00
osk-movement chore(web): cleanup testing for osk movement 2021-04-22 13:51:21 +10:00
platform Move "edge" platform test with other browsers 2018-06-19 07:12:56 +07:00
prediction-mtnt fix(common/models): prevents wordbreak-insertion aliasing 2021-03-22 14:04:09 +07:00
prediction-ui refactor(web/engine): removes need for Processor 'disableDOM' flag 2020-03-18 13:41:39 +07:00
promise-api fix(web): Add wrapper to convert one-to-many keyboard stubs 2021-07-09 16:16:41 +07:00
regression-tests chore(web): updates regression test-deps to same versions as web 2021-07-02 15:42:40 +07:00
rotation-events refactor(web): start of OSKView abstraction 2021-08-23 10:01:06 +07:00
scrolling fix(web): reset scroll anchor on touchend 2021-11-17 10:37:01 +11:00
sentry-integration change(web): addresses PR review comments (#3122) 2020-05-15 15:50:36 +07:00
spacebar-text fix(web): Blank spacebar text when displayName is empty string 2021-08-05 13:09:58 +07:00
start-of-sentence-3621 feat(web): support for &layerChanged 2021-11-24 06:45:20 +11:00
test-updateLayer Build initial test case for #978 2018-06-12 13:42:39 +07:00
commonHeader.js fix(web): resolve unhandled exception in promise 2021-11-14 15:43:43 +11:00
index.html feat(web): Caps Layer and double-tap gesture 2021-12-01 08:59:43 +11:00
lao_2008_basic-1.2.js change(web): Updates common testing keyboards 2020-02-14 09:59:12 +07:00
unminified - manual.html chore(web): tweaks sample pages to use init's promise for keyboard loading 2021-01-14 09:23:11 +07:00
unminified.html fix(web): Fix return of nested promises 2021-06-16 17:57:17 +07:00
us-1.0.js Refactored the samples section to create a separate testing section. 2017-10-11 15:31:06 +07:00