mirror of
https://github.com/keymanapp/keyman.git
synced 2026-10-07 22:47:29 +00:00
fix(web): niche-case handling - subkey from released modipress
This commit is contained in:
parent
facafe3855
commit
0ae48cc64e
2 changed files with 16 additions and 1 deletions
|
|
@ -35,6 +35,8 @@ export default class SubkeyPopup implements GestureHandler {
|
|||
private source: GestureSequence<KeyElement>;
|
||||
private readonly gestureParams: GestureParams;
|
||||
|
||||
readonly shouldLockLayer: boolean = false;
|
||||
|
||||
constructor(
|
||||
source: GestureSequence<KeyElement, string>,
|
||||
configChanger: ConfigChangeClosure<KeyElement>,
|
||||
|
|
@ -46,6 +48,10 @@ export default class SubkeyPopup implements GestureHandler {
|
|||
this.source = source;
|
||||
this.gestureParams = gestureParams;
|
||||
|
||||
if(vkbd.layerLocked) {
|
||||
this.shouldLockLayer = true;
|
||||
}
|
||||
|
||||
source.on('complete', () => {
|
||||
this.currentSelection?.key.highlight(false);
|
||||
this.clear();
|
||||
|
|
|
|||
|
|
@ -523,7 +523,16 @@ export default class VisualKeyboard extends EventEmitter<EventMap> implements Ke
|
|||
}
|
||||
|
||||
// Once the best coord to use for fat-finger calculations has been determined:
|
||||
keyResult = this.modelKeyClick(gestureStage.item, coord);
|
||||
const shouldLockLayer = handlers && (handlers[0] instanceof SubkeyPopup) && handlers[0].shouldLockLayer;
|
||||
try {
|
||||
if(shouldLockLayer) {
|
||||
this.lockLayer(true);
|
||||
}
|
||||
keyResult = this.modelKeyClick(gestureStage.item, coord);
|
||||
} finally {
|
||||
this.lockLayer(false);
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
// Outside of passing keys along... the handling of later stages is delegated
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue