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.
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.
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.
Fixes#6364.
Removes `&layerChanged` and adds `&newLayer` and `&oldLayer` system
stores with the additional nuances around values as described in #6364.
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.
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.