From 21b22b02e876d8f55bea6453015ccfa4d2ae23eb Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 9 Sep 2023 17:04:45 +0800 Subject: [PATCH] PrefUI // Tweak .shareAlphanumericalModeStatusAcrossClients(). --- .../vChewing_Shared/Sources/Shared/UserDef.swift | 3 ++- .../UIModules/PrefUI/VwrPrefPaneBehavior.swift | 14 ++++++++------ 2 files changed, 10 insertions(+), 7 deletions(-) diff --git a/Packages/vChewing_Shared/Sources/Shared/UserDef.swift b/Packages/vChewing_Shared/Sources/Shared/UserDef.swift index b64544bc..c4d47b42 100644 --- a/Packages/vChewing_Shared/Sources/Shared/UserDef.swift +++ b/Packages/vChewing_Shared/Sources/Shared/UserDef.swift @@ -438,7 +438,8 @@ public extension UserDef { userDef: self, shortTitle: "Auto-composite when the longest possible key is formed" ) case .kShareAlphanumericalModeStatusAcrossClients: return .init( - userDef: self, shortTitle: "Share alphanumerical mode status across all clients" + userDef: self, shortTitle: "Share alphanumerical mode status across all clients", + description: "This only works when being toggled by Shift key and JIS Eisu key." ) case .kPhraseEditorAutoReloadExternalModifications: return .init( userDef: self, shortTitle: "This editor only: Auto-reload modifications happened outside of this editor" diff --git a/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift b/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift index 322d2a7b..6b36bb0a 100644 --- a/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift +++ b/Source/Modules/UIModules/PrefUI/VwrPrefPaneBehavior.swift @@ -204,17 +204,19 @@ struct VwrPrefPaneBehavior: View { SessionCtl.theShiftKeyDetector.toggleWithRShift = togglingAlphanumericalModeWithRShift } ) - Toggle( - LocalizedStringKey("Share alphanumerical mode status across all clients"), - isOn: $shareAlphanumericalModeStatusAcrossClients - ).disabled( - !togglingAlphanumericalModeWithRShift && !togglingAlphanumericalModeWithLShift - ) Text( "This feature requires macOS 10.15 and above.".localized + CtlPrefUIShared.sentenceSeparator + "This feature only needs to parse consecutive NSEvents passed by macOS built-in InputMethodKit framework, hence no necessity of asking end-users for extra privileges of monitoring global keyboard inputs. You are free to investigate our codebase or reverse-engineer this input method to see whether the above statement is trustable.".localized ) .preferenceDescription(maxWidth: CtlPrefUIShared.maxDescriptionWidth) + Toggle( + LocalizedStringKey("Share alphanumerical mode status across all clients"), + isOn: $shareAlphanumericalModeStatusAcrossClients + ).controlSize(.small) + Text( + "This only works when being toggled by Shift key and JIS Eisu key.".localized + ) + .preferenceDescription(maxWidth: CtlPrefUIShared.maxDescriptionWidth) } SSPreferences.Settings.Section(title: "Caps Lock:", bottomDivider: true) { Toggle(