chore(web): another PR suggestion

This commit is contained in:
jahorton 2021-07-12 05:32:13 +07:00
parent 9933b76ea3
commit 018016907d

View file

@ -78,9 +78,13 @@ namespace com.keyman.text {
}
// Will handle keystroke-based non-layer change modifier & state keys, mapping them through the physical keyboard's version
// of state management.
if(!fromOSK && this.keyboardProcessor.doModifierPress(keyEvent, !fromOSK)) {
return new RuleBehavior();
// of state management. `doModifierPress` must always run.
if(this.keyboardProcessor.doModifierPress(keyEvent, !fromOSK)) {
// If run on a desktop platform, we know that modifier & state key presses may not
// produce output, so we may make an immediate return safely.
if(!fromOSK) {
return new RuleBehavior();
}
}
// If suggestions exist AND space is pressed, accept the suggestion and do not process the keystroke.