From 7d899b4af13b0ed670360346c43b156b2df1af4e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Tue, 20 Jun 2023 11:45:11 +0800 Subject: [PATCH] SessionCtl // Optimize selectionKeys(). --- Source/Modules/SessionCtl_Delegates.swift | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/Source/Modules/SessionCtl_Delegates.swift b/Source/Modules/SessionCtl_Delegates.swift index 4153a713..4b562e6e 100644 --- a/Source/Modules/SessionCtl_Delegates.swift +++ b/Source/Modules/SessionCtl_Delegates.swift @@ -98,8 +98,9 @@ extension SessionCtl: CtlCandidateDelegate { } public var selectionKeys: String { - // `%quick` 模式僅支援 1234567890 選字鍵。 - if state.type == .ofInputting, state.isCandidateContainer { + // 磁帶模式的 `%quick` 有單獨的選字鍵判定,會在資料不合規時使用 1234567890 選字鍵。 + cassetteQuick: if state.type == .ofInputting, state.isCandidateContainer { + guard PrefMgr.shared.cassetteEnabled else { break cassetteQuick } guard let cinCandidateKey = LMMgr.currentLM.cassetteSelectionKey, CandidateKey.validate(keys: cinCandidateKey) == nil else {