diff --git a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift index 4bb703a1..c7b16c5e 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Protocols/PrefMgrProtocol.swift @@ -45,6 +45,7 @@ public protocol PrefMgrProtocol { var alwaysShowTooltipTextsHorizontally: Bool { get set } var clientsIMKTextInputIncapable: [String: Bool] { get set } var onlyLoadFactoryLangModelsIfNeeded: Bool { get set } + var useSpaceToCommitHighlightedSCPCCandidate: Bool { get set } var useIMKCandidateWindow: Bool { get set } var enableSwiftUIForTDKCandidates: Bool { get set } var enableMouseScrollingForTDKCandidatesCocoa: Bool { get set } diff --git a/Packages/vChewing_Shared/Sources/Shared/Shared.swift b/Packages/vChewing_Shared/Sources/Shared/Shared.swift index a452d26e..267d2e88 100644 --- a/Packages/vChewing_Shared/Sources/Shared/Shared.swift +++ b/Packages/vChewing_Shared/Sources/Shared/Shared.swift @@ -74,6 +74,7 @@ public enum UserDef: String, CaseIterable { case kPhraseEditorAutoReloadExternalModifications = "PhraseEditorAutoReloadExternalModifications" case kClassicHaninKeyboardSymbolModeShortcutEnabled = "ClassicHaninKeyboardSymbolModeShortcutEnabled" + case kUseSpaceToCommitHighlightedSCPCCandidate = "UseSpaceToCommitHighlightedSCPCCandidate" case kUseIMKCandidateWindow = "UseIMKCandidateWindow" case kEnableSwiftUIForTDKCandidates = "EnableSwiftUIForTDKCandidates" case kEnableMouseScrollingForTDKCandidatesCocoa = "EnableMouseScrollingForTDKCandidatesCocoa" diff --git a/Source/Modules/PrefMgr_Core.swift b/Source/Modules/PrefMgr_Core.swift index 6ab7bb8c..4bcc2a4a 100644 --- a/Source/Modules/PrefMgr_Core.swift +++ b/Source/Modules/PrefMgr_Core.swift @@ -182,6 +182,9 @@ public class PrefMgr: PrefMgrProtocol { // MARK: - Settings (Tier 2) + @AppProperty(key: UserDef.kUseSpaceToCommitHighlightedSCPCCandidate.rawValue, defaultValue: true) + public var useSpaceToCommitHighlightedSCPCCandidate: Bool + @AppProperty(key: UserDef.kUseIMKCandidateWindow.rawValue, defaultValue: false) public var useIMKCandidateWindow: Bool