Skip to content

Commit

Permalink
Merge pull request #12220 from keymanapp/fix/web/disabling-fatfinger-…
Browse files Browse the repository at this point in the history
…data

fix(web): disable fat-finger data use when mayCorrect = false
  • Loading branch information
jahorton authored Aug 21, 2024
2 parents 84ede94 + 98d5322 commit f6c2187
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 7 deletions.
4 changes: 4 additions & 0 deletions web/src/engine/main/src/keymanEngine.ts
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,10 @@ export default class KeymanEngine<
return;
}

if(!this.core.languageProcessor.mayCorrect) {
event.keyDistribution = [];
}

if(this.keyEventRefocus) {
// Do anything needed to guarantee that the outputTarget stays active (`app/browser`: maintains focus).
// (Interaction with the OSK may have de-focused the element providing active context;
Expand Down
7 changes: 0 additions & 7 deletions web/src/engine/osk/src/visualKeyboard.ts
Original file line number Diff line number Diff line change
Expand Up @@ -929,13 +929,6 @@ export default class VisualKeyboard extends EventEmitter<EventMap> implements Ke
* @returns
*/
getSimpleTapCorrectionDistances(input: InputSample<KeyElement, string>, keySpec?: ActiveKey): Map<ActiveKeyBase, number> {
// TODO: It'd be nice to optimize by keeping these off when unused, but the wiring
// necessary would get in the way of modularization at the moment.
// let keyman = com.keyman.singleton;
// if (!keyman.core.languageProcessor.mayCorrect) {
// return null;
// }

// Note: if subkeys are active, they will still be displayed at this time.
let touchKbdPos = this.getTouchCoordinatesOnKeyboard(input);
let layerGroup = this.layerGroup.element; // Always has proper dimensions, unlike kbdDiv itself.
Expand Down

0 comments on commit f6c2187

Please sign in to comment.