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,13 +113,17 @@ class ctlInputMethod: IMKInputController {
keyHandler.ensureParser() keyHandler.ensureParser()
if isASCIIMode { if isASCIIMode {
NotifierController.notify( if mgrPrefs.disableShiftTogglingAlphanumericalMode {
message: String( isASCIIMode = false
format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n", } else {
isASCIIMode NotifierController.notify(
? NSLocalizedString("NotificationSwitchON", comment: "") message: String(
: NSLocalizedString("NotificationSwitchOFF", comment: "") format: "%@%@%@", NSLocalizedString("Alphanumerical Mode", comment: ""), "\n",
)) isASCIIMode
? NSLocalizedString("NotificationSwitchON", comment: "")
: NSLocalizedString("NotificationSwitchOFF", comment: "")
))
}
} }
/// ///
@ -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(