< prev index next >
src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m
Print this page
@@ -949,12 +949,20 @@
NSMutableString * useString = [self parseString:aString];
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;
}
if ([self hasMarkedText] || !fProcessingKeystroke || aStringIsComplex) {
JNIEnv *env = [ThreadUtilities getJNIEnv];
@@ -1313,10 +1321,12 @@
// Save a global ref to the new input method.
if (inputMethod != NULL)
fInputMethodLOCKABLE = JNFNewGlobalRef(env, inputMethod);
else
fInputMethodLOCKABLE = NULL;
+
+ kbdLayout = TISGetInputSourceProperty(TISCopyCurrentKeyboardInputSource(), kTISPropertyInputSourceID);
}
- (void)abandonInput
{
#ifdef IM_DEBUG
< prev index next >