SessionCtl // Deprecate .isCapsLocked().
This commit is contained in:
parent
65cf83d902
commit
36fe4fced3
|
@ -79,9 +79,6 @@ public class SessionCtl: IMKInputController {
|
|||
|
||||
// MARK: -
|
||||
|
||||
/// 當前 Caps Lock 按鍵是否被摁下。
|
||||
public static var isCapsLocked: Bool { NSEvent.keyModifierFlags.contains(.capsLock) }
|
||||
|
||||
/// 當前這個 SessionCtl 副本是否處於英數輸入模式。
|
||||
public var isASCIIMode: Bool {
|
||||
get {
|
||||
|
|
|
@ -195,7 +195,7 @@ public extension SessionCtl {
|
|||
? NSLocalizedString("Alphanumerical Input Mode", comment: "") + "\n" + status
|
||||
: NSLocalizedString("Chinese Input Mode", comment: "") + "\n" + status
|
||||
)
|
||||
if PrefMgr.shared.shiftEisuToggleOffTogetherWithCapsLock, oldValue, !newValue, Self.isCapsLocked {
|
||||
if PrefMgr.shared.shiftEisuToggleOffTogetherWithCapsLock, oldValue, !newValue, CapsLockToggler.isOn {
|
||||
CapsLockToggler.turnOff()
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue