diff --git a/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift b/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift index 57993eb1..c8c8b00f 100644 --- a/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift +++ b/Source/Modules/ControllerModules/ctlInputMethod_Delegates.swift @@ -50,6 +50,8 @@ extension ctlInputMethod: KeyHandlerDelegate { // MARK: - Candidate Controller Delegate extension ctlInputMethod: ctlCandidateDelegate { + var isAssociatedPhrasesMode: Bool { state is InputState.AssociatedPhrases } + func handleDelegateEvent(_ event: NSEvent!) -> Bool { // 用 Shift 開關半形英數模式,僅對 macOS 10.15 及之後的 macOS 有效。 if #available(macOS 10.15, *) { diff --git a/Source/Modules/UIModules/CandidateUI/ctlCandidate.swift b/Source/Modules/UIModules/CandidateUI/ctlCandidate.swift index 6d6cb12a..a4aea23a 100644 --- a/Source/Modules/UIModules/CandidateUI/ctlCandidate.swift +++ b/Source/Modules/UIModules/CandidateUI/ctlCandidate.swift @@ -27,6 +27,7 @@ public class CandidateKeyLabel: NSObject { } public protocol ctlCandidateDelegate: AnyObject { + var isAssociatedPhrasesMode: Bool { get } func handleDelegateEvent(_ event: NSEvent!) -> Bool func candidateCountForController(_ controller: ctlCandidateProtocol) -> Int func candidatesForController(_ controller: ctlCandidateProtocol) -> [(String, String)]