ctlIME // +arrClientShiftHandlingExceptionList.

This commit is contained in:
ShikiSuen 2022-08-14 16:53:51 +08:00
parent 831ef6f8dd
commit bc6d840694
1 changed files with 8 additions and 3 deletions

View File

@ -202,9 +202,10 @@ class ctlInputMethod: IMKInputController {
_ = sender // _ = sender //
// Shift macOS 10.15 macOS // Shift macOS 10.15 macOS
let shouldUseHandle = IME.arrClientShiftHandlingExceptionList.contains(clientBundleIdentifier)
if #available(macOS 10.15, *) { if #available(macOS 10.15, *) {
if ShiftKeyUpChecker.check(event) { if ShiftKeyUpChecker.check(event) {
if !rencentKeyHandledByKeyHandler { if !shouldUseHandle || (!rencentKeyHandledByKeyHandler && shouldUseHandle) {
NotifierController.notify( NotifierController.notify(
message: String( message: String(
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n", format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
@ -214,7 +215,9 @@ class ctlInputMethod: IMKInputController {
) )
) )
} }
rencentKeyHandledByKeyHandler = false if shouldUseHandle {
rencentKeyHandledByKeyHandler = false
}
return false return false
} }
} }
@ -250,7 +253,9 @@ class ctlInputMethod: IMKInputController {
} errorCallback: { } errorCallback: {
clsSFX.beep() clsSFX.beep()
} }
rencentKeyHandledByKeyHandler = result if shouldUseHandle {
rencentKeyHandledByKeyHandler = result
}
return result return result
} }