ctlIME // +disableShiftTogglingAlphanumericalMode.

This commit is contained in:
ShikiSuen 2022-08-14 18:23:43 +08:00
parent 9d64b414ef
commit 4a716bbde3
1 changed files with 14 additions and 10 deletions

View File

@ -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(