From dc368c9168a2b53442b813d035304d3486347209 Mon Sep 17 00:00:00 2001 From: "Joshua A. Horton" Date: Thu, 18 Jan 2024 12:56:21 +0700 Subject: [PATCH] fix(web): U_ key id -> text for all subkeys; is now preprocessed --- .../web/keyboard-processor/src/keyboards/activeLayout.ts | 4 ++++ web/src/engine/osk/src/keyboard-layout/oskKey.ts | 8 ++------ 2 files changed, 6 insertions(+), 6 deletions(-) diff --git a/common/web/keyboard-processor/src/keyboards/activeLayout.ts b/common/web/keyboard-processor/src/keyboards/activeLayout.ts index 6e84171e7df..e9042996c96 100644 --- a/common/web/keyboard-processor/src/keyboards/activeLayout.ts +++ b/common/web/keyboard-processor/src/keyboards/activeLayout.ts @@ -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; diff --git a/web/src/engine/osk/src/keyboard-layout/oskKey.ts b/web/src/engine/osk/src/keyboard-layout/oskKey.ts index 29d04dd0376..0b16a5b1435 100644 --- a/web/src/engine/osk/src/keyboard-layout/oskKey.ts +++ b/web/src/engine/osk/src/keyboard-layout/oskKey.ts @@ -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'];