From 7092ec8c9aa64383e8d5a3028557efbe6eae6abe Mon Sep 17 00:00:00 2001 From: Rocka Date: Thu, 29 May 2025 22:59:41 +0800 Subject: [PATCH] Don't show InputView on combination keys --- .../org/fcitx/fcitx5/android/input/InputDeviceManager.kt | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/app/src/main/java/org/fcitx/fcitx5/android/input/InputDeviceManager.kt b/app/src/main/java/org/fcitx/fcitx5/android/input/InputDeviceManager.kt index ac5fe1dd..656f40df 100644 --- a/app/src/main/java/org/fcitx/fcitx5/android/input/InputDeviceManager.kt +++ b/app/src/main/java/org/fcitx/fcitx5/android/input/InputDeviceManager.kt @@ -92,8 +92,8 @@ class InputDeviceManager(private val onChange: (Boolean) -> Unit) { */ fun evaluateOnKeyDown(e: KeyEvent, service: FcitxInputMethodService): Boolean { if (startedInputView) { - // filter out back/home/volume buttons - if (e.isPrintingKey) { + // filter out back/home/volume buttons and combination keys + if (e.isPrintingKey && e.hasNoModifiers()) { // evaluate virtual keyboard visibility when pressing physical keyboard while InputView visible evaluateOnKeyDownInner(service) } @@ -102,7 +102,7 @@ class InputDeviceManager(private val onChange: (Boolean) -> Unit) { } else { // force show InputView when focusing on text input (likely inputType is not TYPE_NULL) // and pressing any digit/letter/punctuation key on physical keyboard - val showInputView = !isNullInputType && e.isPrintingKey + val showInputView = !isNullInputType && e.isPrintingKey && e.hasNoModifiers() if (showInputView) { evaluateOnKeyDownInner(service) }