From be1c934eff16e1200b79df0c589aa78f533fde35 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Fri, 11 Mar 2022 13:49:32 +0800 Subject: [PATCH] =?UTF-8?q?KeyHandler=20//=20Always=20return=20NO=20when?= =?UTF-8?q?=20=E2=86=93Shift=20&=20+CapsLock.?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- Source/Modules/ControllerModules/KeyHandler.mm | 10 +++------- 1 file changed, 3 insertions(+), 7 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index 2eafc2eb..39e2e15b 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -286,13 +286,9 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; InputStateEmpty *emptyState = [[InputStateEmpty alloc] init]; stateCallback(emptyState); - // Non-Dynamic Keyboard Layouts Only: When shift is pressed, don't do further processing, since it outputs capital letter anyway. - if ((![Preferences.basisKeyboardLayout isEqual: @"com.apple.keylayout.ZhuyinBopomofo"] - && ![Preferences.basisKeyboardLayout isEqual: @"com.apple.keylayout.ZhuyinEten"]) - || [input isCapsLockOn]){ - if ([input isShiftHold]) { - return NO; - } + // When shift is pressed, don't do further processing, since it outputs capital letter anyway. + if ([input isShiftHold]) { + return NO; } // if ASCII but not printable, don't use insertText:replacementRange: as many apps don't handle non-ASCII char insertions.