From 81388216cdc464ba2ea341644ff37f7e147fad6e Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Sat, 5 Mar 2022 15:43:33 +0800 Subject: [PATCH] ctlIME // Use Shift to toggle a12l mode (not enabled yet). - I commented out the content of this update since it has bugs. --- Source/Modules/IMEModules/ctlInputMethod.swift | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 655f26ac..25ecc8b7 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -198,6 +198,15 @@ class ctlInputMethod: IMKInputController { let includeShift = Preferences.functionKeyKeyboardLayoutOverrideIncludeShiftKey let notShift = NSEvent.ModifierFlags(rawValue: ~(NSEvent.ModifierFlags.shift.rawValue)) + + // Shift Click Handling: Toggling Alphanumerical Mode. // STILL BUGGY, hence being commented out. + // if !event.modifierFlags.contains(.shift) + // && event.modifierFlags == .init(rawValue: 0) + // && !event.modifierFlags.contains(notShift) + // && (event.keyCode == KeyCode.leftShift.rawValue || event.keyCode == KeyCode.rightShift.rawValue) { + // Preferences.toggleAlphanumericalModeEnabled() + // } + if event.modifierFlags.contains(notShift) || (event.modifierFlags.contains(.shift) && includeShift) { (client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: functionKeyKeyboardLayoutID)