Skip to content

Commit

Permalink
Merge pull request #10434 from keymanapp/fix/web/unicode-id-preproces…
Browse files Browse the repository at this point in the history
…sing

fix(web): U_ key id -> text for all subkeys; is now preprocessed
  • Loading branch information
jahorton authored Jan 19, 2024
2 parents 4cbe34f + dc368c9 commit 706c60e
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 6 deletions.
4 changes: 4 additions & 0 deletions common/web/keyboard-processor/src/keyboards/activeLayout.ts
Original file line number Diff line number Diff line change
Expand Up @@ -331,6 +331,10 @@ export class ActiveKeyBase {
}
}

if(!key.text && typeof key.id == 'string') {
key.text = ActiveKey.unicodeIDToText(key.id);
}

// Ensure subkeys are also properly extended.
if(key.sk) {
analysisFlagObj.hasLongpresses = true;
Expand Down
8 changes: 2 additions & 6 deletions web/src/engine/osk/src/keyboard-layout/oskKey.ts
Original file line number Diff line number Diff line change
Expand Up @@ -300,12 +300,8 @@ export default abstract class OSKKey {
// Add OSK key labels
let keyText = null;
if(spec['text'] == null || spec['text'] == '') {
if(typeof spec['id'] == 'string') {
// If the ID's Unicode-based, just use that code.
keyText = ActiveKey.unicodeIDToText(spec['id']);
}

keyText = keyText || DEFAULT_BLANK;
// U_ codes are handled during keyboard pre-processing.
keyText = DEFAULT_BLANK;
} else {
keyText=spec['text'];

Expand Down

0 comments on commit 706c60e

Please sign in to comment.