Skip to content

Commit 01eb688

Browse files
author
Steven Loomis
committed
8195675: Call to insertText with single character from custom Input Method ignored
Backport-of: b8f2ec9091f9f7e5f4611991d04dd8aa113b94fd
1 parent 8818eb4 commit 01eb688

File tree

1 file changed

+5
-2
lines changed
  • src/java.desktop/macosx/native/libawt_lwawt/awt

1 file changed

+5
-2
lines changed

src/java.desktop/macosx/native/libawt_lwawt/awt/AWTView.m

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -38,6 +38,9 @@
3838
// keyboard layout
3939
static NSString *kbdLayout;
4040

41+
// Constant for keyman layouts
42+
#define KEYMAN_LAYOUT "keyman"
43+
4144
@interface AWTView()
4245
@property (retain) CDropTarget *_dropTarget;
4346
@property (retain) CDragSource *_dragSource;
@@ -259,7 +262,7 @@ - (void) scrollWheel: (NSEvent*) event {
259262

260263
- (void) keyDown: (NSEvent *)event {
261264
fProcessingKeystroke = YES;
262-
fKeyEventsNeeded = YES;
265+
fKeyEventsNeeded = ![(NSString *)kbdLayout containsString:@KEYMAN_LAYOUT];
263266

264267
// Allow TSM to look at the event and potentially send back NSTextInputClient messages.
265268
[self interpretKeyEvents:[NSArray arrayWithObject:event]];
@@ -965,7 +968,7 @@ - (void) insertText:(id)aString replacementRange:(NSRange)replacementRange
965968

966969
if ((utf16Length > 2) ||
967970
((utf8Length > 1) && [self isCodePointInUnicodeBlockNeedingIMEvent:codePoint]) ||
968-
((codePoint == 0x5c) && ([(NSString *)kbdLayout containsString:@"Kotoeri"]))) {
971+
[(NSString *)kbdLayout containsString:@KEYMAN_LAYOUT]) {
969972
#ifdef IM_DEBUG
970973
NSLog(@"string complex ");
971974
#endif

0 commit comments

Comments
 (0)