--- old/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2019-09-30 12:09:19.000000000 +0530 +++ new/src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m 2019-09-30 12:09:18.000000000 +0530 @@ -951,8 +951,16 @@ NSUInteger utf16Length = [useString lengthOfBytesUsingEncoding:NSUTF16StringEncoding]; NSUInteger utf8Length = [useString lengthOfBytesUsingEncoding:NSUTF8StringEncoding]; BOOL aStringIsComplex = NO; + + unichar codePoint = [useString characterAtIndex:0]; + +#ifdef IM_DEBUG + NSLog(@"insertText kbdlayout %@ ",(NSString *)kbdLayout); +#endif // IM_DEBUG + if ((utf16Length > 2) || - ((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:[useString characterAtIndex:0]])) { + ((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) || + ((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) { aStringIsComplex = YES; } @@ -1315,6 +1323,8 @@ fInputMethodLOCKABLE = JNFNewGlobalRef(env, inputMethod); else fInputMethodLOCKABLE = NULL; + + kbdLayout = TISGetInputSourceProperty(TISCopyCurrentKeyboardInputSource(), kTISPropertyInputSourceID); } - (void)abandonInput