From 21ef0f5922074406c9f46972ad1a209aa64c54ca Mon Sep 17 00:00:00 2001 From: anashaty Date: Mon, 16 Mar 2015 20:55:08 +0300 Subject: [PATCH] 8073008: press-and-hold input method for accented characters works incorrectly on OS X Reviewed-by: azvegint, alexp --- src/macosx/native/sun/awt/AWTView.m | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/macosx/native/sun/awt/AWTView.m b/src/macosx/native/sun/awt/AWTView.m index d98d0d344..0cba2eded 100644 --- a/src/macosx/native/sun/awt/AWTView.m +++ b/src/macosx/native/sun/awt/AWTView.m @@ -310,7 +310,10 @@ AWT_ASSERT_APPKIT_THREAD; } - (BOOL) performKeyEquivalent: (NSEvent *) event { - [self deliverJavaKeyEventHelper: event]; + // if IM is active key events should be ignored + if (![self hasMarkedText] && !fInPressAndHold) { + [self deliverJavaKeyEventHelper: event]; + } // Workaround for 8020209: special case for "Cmd =" and "Cmd ." // because Cocoa calls performKeyEquivalent twice for these keystrokes -- GitLab