mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-11 00:17:28 +00:00
fix(web): doModifierPress layer handling
This commit is contained in:
parent
e7f7511780
commit
6c80da3fc3
2 changed files with 6 additions and 5 deletions
|
|
@ -103,9 +103,8 @@ 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. `doModifierPress` must always run for desktop-mode contexts.
|
||||
// In standard Web integration, `contextDevice` indicates what type of OSK is visible.
|
||||
if(!this.contextDevice.touchable && this.keyboardProcessor.doModifierPress(keyEvent, outputTarget, !fromOSK)) {
|
||||
// of state management. `doModifierPress` must always run.
|
||||
if(this.keyboardProcessor.doModifierPress(keyEvent, outputTarget, !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) {
|
||||
|
|
|
|||
|
|
@ -731,7 +731,7 @@ namespace com.keyman.text {
|
|||
} else if(KeyboardProcessor.isModifier(Levent)) {
|
||||
this.activeKeyboard.notify(Levent.Lcode, outputTarget, isKeyDown ? 1 : 0);
|
||||
// For eventual integration - we bypass an OSK update for physical keystrokes when in touch mode.
|
||||
if(!Levent.device.touchable) {
|
||||
if(!this.contextDevice.touchable) {
|
||||
return this._UpdateVKShift(Levent); // I2187
|
||||
} else {
|
||||
return true;
|
||||
|
|
@ -740,7 +740,9 @@ namespace com.keyman.text {
|
|||
|
||||
if(Levent.LmodifierChange) {
|
||||
this.activeKeyboard.notify(0, outputTarget, 1);
|
||||
this._UpdateVKShift(Levent);
|
||||
if(!this.contextDevice.touchable) {
|
||||
this._UpdateVKShift(Levent);
|
||||
}
|
||||
}
|
||||
|
||||
// No modifier keypresses detected.
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue