ctlIME // +disableShiftTogglingAlphanumericalMode.
This commit is contained in:
parent
9d64b414ef
commit
4a716bbde3
|
@ -113,6 +113,9 @@ class ctlInputMethod: IMKInputController {
|
||||||
keyHandler.ensureParser()
|
keyHandler.ensureParser()
|
||||||
|
|
||||||
if isASCIIMode {
|
if isASCIIMode {
|
||||||
|
if mgrPrefs.disableShiftTogglingAlphanumericalMode {
|
||||||
|
isASCIIMode = false
|
||||||
|
} else {
|
||||||
NotifierController.notify(
|
NotifierController.notify(
|
||||||
message: String(
|
message: String(
|
||||||
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
|
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
|
||||||
|
@ -121,6 +124,7 @@ class ctlInputMethod: IMKInputController {
|
||||||
: NSLocalizedString("NotificationSwitchOFF", comment: "")
|
: NSLocalizedString("NotificationSwitchOFF", comment: "")
|
||||||
))
|
))
|
||||||
}
|
}
|
||||||
|
}
|
||||||
|
|
||||||
/// 必須加上下述條件,否則會在每次切換至輸入法本體的視窗(比如偏好設定視窗)時會卡死。
|
/// 必須加上下述條件,否則會在每次切換至輸入法本體的視窗(比如偏好設定視窗)時會卡死。
|
||||||
/// 這是很多 macOS 副廠輸入法的常見失誤之處。
|
/// 這是很多 macOS 副廠輸入法的常見失誤之處。
|
||||||
|
@ -203,10 +207,10 @@ class ctlInputMethod: IMKInputController {
|
||||||
|
|
||||||
// 用 Shift 開關半形英數模式,僅對 macOS 10.15 及之後的 macOS 有效。
|
// 用 Shift 開關半形英數模式,僅對 macOS 10.15 及之後的 macOS 有效。
|
||||||
let shouldUseHandle =
|
let shouldUseHandle =
|
||||||
IME.arrClientShiftHandlingExceptionList.contains(clientBundleIdentifier)
|
(IME.arrClientShiftHandlingExceptionList.contains(clientBundleIdentifier)
|
||||||
|| mgrPrefs.shouldAlwaysUseShiftKeyAccommodation
|
|| mgrPrefs.shouldAlwaysUseShiftKeyAccommodation)
|
||||||
if #available(macOS 10.15, *) {
|
if #available(macOS 10.15, *) {
|
||||||
if ShiftKeyUpChecker.check(event) {
|
if ShiftKeyUpChecker.check(event), !mgrPrefs.disableShiftTogglingAlphanumericalMode {
|
||||||
if !shouldUseHandle || (!rencentKeyHandledByKeyHandler && shouldUseHandle) {
|
if !shouldUseHandle || (!rencentKeyHandledByKeyHandler && shouldUseHandle) {
|
||||||
NotifierController.notify(
|
NotifierController.notify(
|
||||||
message: String(
|
message: String(
|
||||||
|
|
Loading…
Reference in New Issue