From 8a4dbd76ec7198726364ef2c9b314e068167e546 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Thu, 22 Sep 2022 15:35:50 +0700 Subject: [PATCH 1/2] fix(android/engine): Refresh OSK after changing spacebar caption --- android/KMEA/app/src/main/assets/android-host.js | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/android/KMEA/app/src/main/assets/android-host.js b/android/KMEA/app/src/main/assets/android-host.js index d58be49b4b..f52558762a 100644 --- a/android/KMEA/app/src/main/assets/android-host.js +++ b/android/KMEA/app/src/main/assets/android-host.js @@ -143,7 +143,8 @@ function setSpacebarText(mode) { keyman.osk.show(true); // Refresh KMW OSK - keyman.correctOSKTextSize(); + var kmw = window['keyman']; + kmw.correctOSKTextSize(); } // #6665: we need to know when the user has pressed a hardware key so we don't From 3239a1e7e3ead50e995dbb3ba5f962bb26106410 Mon Sep 17 00:00:00 2001 From: Darcy Wong Date: Fri, 23 Sep 2022 12:45:17 +0700 Subject: [PATCH 2/2] fix(web): Update spacebar caption when refreshing layout --- android/KMEA/app/src/main/assets/android-host.js | 3 +-- web/source/osk/oskView.ts | 2 ++ 2 files changed, 3 insertions(+), 2 deletions(-) diff --git a/android/KMEA/app/src/main/assets/android-host.js b/android/KMEA/app/src/main/assets/android-host.js index f52558762a..d58be49b4b 100644 --- a/android/KMEA/app/src/main/assets/android-host.js +++ b/android/KMEA/app/src/main/assets/android-host.js @@ -143,8 +143,7 @@ function setSpacebarText(mode) { keyman.osk.show(true); // Refresh KMW OSK - var kmw = window['keyman']; - kmw.correctOSKTextSize(); + keyman.correctOSKTextSize(); } // #6665: we need to know when the user has pressed a hardware key so we don't diff --git a/web/source/osk/oskView.ts b/web/source/osk/oskView.ts index 523dbd4cf4..8a5f714eee 100644 --- a/web/source/osk/oskView.ts +++ b/web/source/osk/oskView.ts @@ -499,6 +499,8 @@ namespace com.keyman.osk { bs.width = bs.maxWidth = this.computedWidth + 'px'; bs.height = bs.maxHeight = this.computedHeight + 'px'; + // Ensure that the layer's spacebar is properly captioned. + this.vkbd.showLanguage(); } else { const bs = this._Box.style; bs.width = 'auto';