mirror of
https://github.com/JetBrains/JetBrainsRuntime.git
synced 2025-12-06 09:29:38 +01:00
JBR-7449: Fix press-and-hold cancel keys not being swallowed by JBR
(cherry picked from commit a0dbdff2b0)
This commit is contained in:
@@ -375,6 +375,9 @@ static void debugPrintNSEvent(NSEvent* event, const char* comment) {
|
||||
#ifdef LOG_KEY_EVENTS
|
||||
debugPrintNSEvent(event, "keyDown");
|
||||
#endif
|
||||
// Check for willBeHandledByComplexInputMethod here, because interpretKeyEvents might invalidate that field
|
||||
bool isPressAndHold = fEnablePressAndHold && [event willBeHandledByComplexInputMethod] && fInputMethodLOCKABLE;
|
||||
|
||||
fProcessingKeystroke = YES;
|
||||
fKeyEventsNeeded = ![(NSString *)kbdLayout containsString:@KEYMAN_LAYOUT];
|
||||
|
||||
@@ -392,8 +395,7 @@ static void debugPrintNSEvent(NSEvent* event, const char* comment) {
|
||||
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
|
||||
}
|
||||
|
||||
if (fEnablePressAndHold && [event willBeHandledByComplexInputMethod] &&
|
||||
fInputMethodLOCKABLE)
|
||||
if (isPressAndHold)
|
||||
{
|
||||
BOOL skipProcessingCancelKeys = YES;
|
||||
fProcessingKeystroke = NO;
|
||||
|
||||
Reference in New Issue
Block a user