ctlIME // +arrClientShiftHandlingExceptionList.
This commit is contained in:
parent
831ef6f8dd
commit
bc6d840694
|
@ -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
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in New Issue