Commit graph

90 commits

Author SHA1 Message Date
Joshua Horton
c5480d19b3
Merge pull request #6951 from keymanapp/chore/web/cherry/remove-invalid-warning
chore(web): remove invalid warning msg 🍒
2022-07-15 13:09:08 +07:00
Joshua A. Horton
ca1eb70cbd chore(web): remove invalid warning msg 2022-07-15 09:05:18 +07:00
Joshua A. Horton
6c80da3fc3 fix(web): doModifierPress layer handling 2022-07-15 08:35:25 +07:00
Joshua A. Horton
e7f7511780 change(web): disables touch OSK auto-shift on hardware shift 2022-07-15 08:35:24 +07:00
Joshua Horton
0eb828ed53 chore(web): Apply suggestions from code review
Co-authored-by: Marc Durdin <marc@durdin.net>
2022-07-15 08:35:20 +07:00
Joshua A. Horton
6fd9647957 fix(web): postkeystroke should use the 'context' device, not event device 2022-07-15 08:17:10 +07:00
Marc Durdin
6867bfd492 fix(web): crash on custom modifier keys
Fixes #6788.
Fixes KEYMAN-WEB-22.
Fixes KEYMAN-DEVELOPER-BQ.
Fixes KEYMAN-ANDROID-160.

Fixes a crash introduced in #6473 which was trying to prevent modifier
keys from triggering "fat finger" alternate lookups, due to incomplete
nullish coalescing.

Related to this, from what I can see, a secondary side-effect of the fix
in #6473 was that some key events may have never had their ruleBehaviors
finalized if they matched the `isOnlyLayerSwitchKey` heuristic, leading
to potential issues with edge case 'deadkey+layer switch' keys or keys
that set store values, for example. So this fix also makes the
`isOnlyLayerSwitchKey` test more targeted.

Identified this when adding a Caps Lock layer to sil_euro_latin and
testing the layer switching. At time of fix, the error had been raised
in KeymanWeb, Keyman Developer and Keyman for Android, but not yet
Keyman for iPhone and iPad.
2022-06-17 05:17:05 +10:00
Joshua A. Horton
a2b218f828 fix(web): post-merge tweak 2022-04-11 13:29:51 -05:00
jahorton
99ace20a95 fix(web): prevents fat-finger from keys not considered fat-finger targets 2022-04-11 13:29:51 -05:00
jahorton
fe85ac2f75 fix(web): blocks modifier key fat-fingering 2022-04-11 13:29:45 -05:00
Marc Durdin
03dc4adb89 feat(web): prediction casing follows current layer
Fixes #6507.

Reintroduces #6459 which implemented #6455.
2022-04-08 16:14:03 +10:00
Marc Durdin
11dd70d7de chore(common): make first parameter required 2022-04-08 16:14:02 +10:00
Marc Durdin
49eb062c65 feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-08 16:14:01 +10:00
Marc Durdin
e616900cad
Revert "feat(web): prediction casing follows current layer" 2022-04-08 14:50:32 +10:00
Marc Durdin
21c5cdb111 chore(common): make first parameter required 2022-04-01 16:47:56 +11:00
Marc Durdin
b7ce99480f feat(web): prediction casing follows current layer
Fixes #6455.

This involved adding an extra hint to the data passed into the lexical
model layer, being the CasingForm that the current layer wants to use.

Given there are several entry points to the lexical model layer, this
meant a few places where we needed to check the current layer.

I refactored the very long function `InputProcessor.processKeyEvent` to
extract out the `buildAlternates` function. There should be no
functional changes to the `buildAlternates` code. But it makes
`processKeyEvent` significantly easier to read.
2022-04-01 16:20:50 +11:00
Marc Durdin
d33401c033 chore(web): fixup InputProcessor tests 2022-04-01 08:55:55 +11:00
Marc Durdin
c0f29861ac fix(web): track stateKeys changes with layer changes
Fixes #6405.

If the layer is reset to default, e.g. by switching fields, then the
state key bitmask was not always kept in sync with the layer change.
2022-03-31 14:08:33 +11:00
Marc Durdin
b23df3fbc8 feat(web): &newLayer and &oldLayer
Fixes #6364.

Removes `&layerChanged` and adds `&newLayer` and `&oldLayer` system
stores with the additional nuances around values as described in #6364.
2022-03-13 08:29:15 +11:00
Marc Durdin
addcad9f76 fix(web): further selection tweaks to mocks 2022-02-23 15:12:23 +11:00
Marc Durdin
ac2cc93f2a fix(web): add readonly mode for rule behavior finalization
Relates to #5853.

Two things happened here:

1. Construction of Mocks made an assumption that the selection should
   always be deleted (outputTarget.ts:363). However, for NewContext and
   PostKeystroke processes, we don't want to change anything.

2. Even if nothing is changed, the transcription would emit what is
   in theory a no-op ruleTransform (insert="", deleteLeft=0,
   deleteRight=0). But apps would treat this as deleting the selection.

This fix goes a little broader than I would have preferred, but adds a
readonly mode to the transcription and mock model, so that we can
control explicitly when changes are applied to the text store.
2022-02-22 10:42:20 +11: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
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
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
Joshua Horton
a6c3e0a5fa
Merge pull request #5456 from keymanapp/fix/web/state-key-management
fix(common/core/web): OSK state-key management
2021-07-27 11:23:56 +07:00
jahorton
1125b368f8 change(common/core/web): removes conditional replacement of a now always-truthy 2021-07-22 10:39:32 +07:00
jahorton
fd940cb618 change(common/core/web): adjustments per review 2021-07-22 10:36:36 +07:00
jahorton
1c8689b404 fix(common/core/web): fixes likely root of problem 2021-07-22 08:22:28 +07:00
jahorton
b414455c23 fix(common/core/web): adds empty-array check for alternates 2021-07-21 11:36:09 +07:00
jahorton
3302ce56f1 chore(web): another PR suggestion 2021-07-12 05:32:13 +07:00
jahorton
b3c70bf724 fix(web): state key management 2021-07-09 14:59:33 +07:00
jahorton
d43c6c7f7b change(common/core/web): tweaks from PR comments 2021-06-24 08:28:10 +07:00
jahorton
10de0ae700 change(common/core/web): use of shorter arrow func from comment 2021-06-23 08:30:15 +07:00
jahorton
727f607827 change(common/core/web): thresholding Date.now() -> performance.now() 2021-06-23 08:28:37 +07:00
jahorton
2e0dff8594 feat(common/core/web): alternate generation uses windowed context, not full 2021-06-21 14:47:14 +07:00
jahorton
5e57840489 feat(common/core/web): adds basic time + prob thresholding for modeled fat-fingers 2021-06-21 11:04:07 +07:00
jahorton
b6424095ae docs(common/core/web): function docs improvement 2021-06-09 09:31:39 +07:00
jahorton
6c782705f2 refactor(web): removes Ltarg from KeyEvent, adjusts core to match 2021-05-28 12:44:03 +07:00
jahorton
fe90f3bb35 fix(common/core/web): prediction banner display's reliance on mayPredict 2021-03-18 08:24:08 +07:00
jahorton
355f1b4d82 fix(ios): invalidateContext no longer predicts when prediction deactivated 2021-03-18 08:08:20 +07:00
jahorton
28ed690fe2 chore(common/models): Merge branch 'beta' into feat/common/models/mid-context-suggestions 2021-02-25 09:16:45 +07:00
jahorton
4618dce6a0 docs(common/core/web): addresses PR review comment 2021-02-24 09:02:26 +07:00
jahorton
f20388d956 fix(common/core/web): core key-processing returns 2021-02-23 11:55:06 +07:00
jahorton
2b999d6274 fix(common/models): fixes reversion application 2021-02-05 09:33:28 +07:00
jahorton
b0f1046e40 change(web): minor polish tweaks 2021-01-29 11:34:21 +07:00
jahorton
78c7821f9f change(web): banner display no longer deferred 2021-01-29 11:31:56 +07:00
jahorton
531c6f76c8 change(web): set -eu for web scripts 2021-01-27 14:29:16 +07:00