Skip to content

Commit

Permalink
Fixed AquaSKK IME control.
Browse files Browse the repository at this point in the history
  • Loading branch information
atty303 committed Nov 1, 2013
1 parent 498ef67 commit 1eca7a8
Show file tree
Hide file tree
Showing 2 changed files with 7 additions and 1 deletion.
2 changes: 2 additions & 0 deletions PTYTextView.h
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,8 @@ enum {

BOOL CURSOR;
BOOL colorInvertedCursor;

BOOL doCommandBySelectorCalled;

// geometry
double lineHeight;
Expand Down
6 changes: 5 additions & 1 deletion PTYTextView.m
Original file line number Diff line number Diff line change
Expand Up @@ -2567,6 +2567,7 @@ - (void)keyDown:(NSEvent*)event
// Control+Key doesn't work right with custom keyboard layouts. Handle ctrl+key here for the
// standard combinations.
BOOL workAroundControlBug = NO;
#if 0
if (!prev &&
(modflag & (NSControlKeyMask | NSCommandKeyMask | NSAlternateKeyMask)) == NSControlKeyMask) {
if (debugKeyDown) {
Expand Down Expand Up @@ -2600,10 +2601,11 @@ - (void)keyDown:(NSEvent*)event
}
}
}

#endif
if (!workAroundControlBug) {
// Let the IME process key events
IM_INPUT_INSERT = NO;
doCommandBySelectorCalled = NO;
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown send to IME");
}
Expand All @@ -2612,6 +2614,7 @@ - (void)keyDown:(NSEvent*)event
// If the IME didn't want it, pass it on to the delegate
if (!prev &&
!IM_INPUT_INSERT &&
doCommandBySelectorCalled &&
![self hasMarkedText]) {
if (debugKeyDown) {
NSLog(@"PTYTextView keyDown IME no, send to delegate");
Expand Down Expand Up @@ -5041,6 +5044,7 @@ - (void)printContent:(NSString *)aString
/// NSTextInput stuff
- (void)doCommandBySelector:(SEL)aSelector
{
doCommandBySelectorCalled = YES;
//NSLog(@"doCommandBySelector:%@", NSStringFromSelector(aSelector));

#if GREED_KEYDOWN == 0
Expand Down

0 comments on commit 1eca7a8

Please sign in to comment.