From a52a6ca21bcf5f6eccbc9cf036802b7ff6defe81 Mon Sep 17 00:00:00 2001 From: ShikiSuen Date: Mon, 21 Mar 2022 21:30:33 +0800 Subject: [PATCH] KeyHandler // +NSLog: "Still Nothing" (Rebased). - This one is the final input quality check step prior to the language parsing process. It can block trash data from being passed to the Input Method Kit. --- Source/Modules/ControllerModules/KeyHandler.mm | 6 +++--- 1 file changed, 3 insertions(+), 3 deletions(-) diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index b7308d79..e74ed04c 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -592,10 +592,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; } } - // still nothing, then we update the composing buffer (some app has - // strange behavior if we don't do this, "thinking" the key is not - // actually consumed) + // still nothing, then we update the composing buffer (some app has strange behavior if we don't do this, "thinking" the key is not actually consumed) + // 砍掉這一段會導致「F1-F12 按鍵干擾組字區」的問題。暫時只能先恢復這段,且補上偵錯彙報機制,方便今後排查故障。 if ([state isKindOfClass:[InputStateNotEmpty class]] || !_bpmfReadingBuffer->isEmpty()) { + [IME prtDebugIntel:[NSString stringWithFormat:@"Blocked data: charCode: %c, keyCode: %c", charCode, input.keyCode]]; [IME prtDebugIntel:@"A9BFF20E"]; errorCallback(); stateCallback(state);