diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index 6713f2dc..d2566dd6 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -195,13 +195,12 @@ class ctlInputMethod: IMKInputController { // 同時注意:必須將 event.type == .flagsChanged 放在最外圍、且在其結尾插入 return false, // 否則,每次處理這種判斷時都會觸發 NSInternalInconsistencyException。 if (mgrPrefs.functionKeyboardLayout != mgrPrefs.basisKeyboardLayout) && (event.type == .flagsChanged) { - let includeShift = mgrPrefs.functionKeyKeyboardLayoutOverrideIncludeShiftKey if (event.modifierFlags == .capsLock || event.modifierFlags.contains(.command) || event.modifierFlags.contains(.option) || event.modifierFlags.contains(.control) || event.modifierFlags.contains(.function) || - (event.modifierFlags.contains(.shift) && includeShift)) { + (event.modifierFlags.contains(.shift) && mgrPrefs.functionKeyKeyboardLayoutOverrideIncludeShiftKey)) { (client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: mgrPrefs.functionKeyboardLayout) } else { (client as? IMKTextInput)?.overrideKeyboard(withKeyboardNamed: mgrPrefs.basisKeyboardLayout)