8073008: press-and-hold input method for accented characters works incorrectly on OS X
Reviewed-by: azvegint, alexp
--- a/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Thu Mar 12 08:57:51 2015 -0700
+++ b/jdk/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m Mon Mar 16 20:32:45 2015 +0300
@@ -311,7 +311,10 @@
}
- (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