From d0c704f9bf0acffc3047097abbeb771e4493d1d0 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sun, 9 Oct 2022 18:31:54 +0800 Subject: [PATCH] SessionCtl // Disable special keyLayout for candidate Window. --- Source/Modules/SessionCtl_Core.swift | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/Source/Modules/SessionCtl_Core.swift b/Source/Modules/SessionCtl_Core.swift index b30aab3f..3418df80 100644 --- a/Source/Modules/SessionCtl_Core.swift +++ b/Source/Modules/SessionCtl_Core.swift @@ -65,9 +65,9 @@ class SessionCtl: IMKInputController { didSet { guard oldValue.type != state.type else { return } vCLog("Current State: \(state.type.rawValue)") - if state.isCandidateContainer || oldValue.isCandidateContainer { - setKeyLayout() - } + // 因鍵盤訊號翻譯機制存在,故禁用下文。 + // guard state.isCandidateContainer != oldValue.isCandidateContainer else { return } + // if state.isCandidateContainer || oldValue.isCandidateContainer { setKeyLayout() } } } @@ -141,7 +141,7 @@ extension SessionCtl { guard let client = client() else { return } func doSetKeyLayout() { - if (isASCIIMode && IMKHelper.isDynamicBasicKeyboardLayoutEnabled) || state.isCandidateContainer { + if isASCIIMode, IMKHelper.isDynamicBasicKeyboardLayoutEnabled { client.overrideKeyboard(withKeyboardNamed: PrefMgr.shared.alphanumericalKeyboardLayout) return }