diff --git a/Source/Modules/PrefMgr_Core.swift b/Source/Modules/PrefMgr_Core.swift index 00fd83a9..5f258811 100644 --- a/Source/Modules/PrefMgr_Core.swift +++ b/Source/Modules/PrefMgr_Core.swift @@ -103,7 +103,11 @@ public class PrefMgr: PrefMgrProtocol { public var upperCaseLetterKeyBehavior: Int @AppProperty(key: UserDef.kTogglingAlphanumericalModeWithLShift.rawValue, defaultValue: true) - public var togglingAlphanumericalModeWithLShift: Bool + public var togglingAlphanumericalModeWithLShift: Bool { + didSet { + SessionCtl.theShiftKeyDetector.alsoToggleWithLShift = togglingAlphanumericalModeWithLShift + } + } @AppProperty(key: UserDef.kDisableShiftTogglingAlphanumericalMode.rawValue, defaultValue: false) public var disableShiftTogglingAlphanumericalMode: Bool diff --git a/Source/Modules/SessionCtl_Core.swift b/Source/Modules/SessionCtl_Core.swift index 82c56c17..48af84e2 100644 --- a/Source/Modules/SessionCtl_Core.swift +++ b/Source/Modules/SessionCtl_Core.swift @@ -173,6 +173,7 @@ extension SessionCtl { keyHandler.clear() // 這句不要砍,因為後面 handle State.Empty() 不一定執行。 keyHandler.ensureKeyboardParser() + Self.theShiftKeyDetector.alsoToggleWithLShift = PrefMgr.shared.togglingAlphanumericalModeWithLShift if isASCIIMode, !isCapsLocked, PrefMgr.shared.disableShiftTogglingAlphanumericalMode { isASCIIMode = false } if isCapsLocked { isASCIIMode = isCapsLocked } // 同步 Caps Lock 狀態。