From: <de...@us...> - 2009-09-28 02:47:21
|
Revision: 1851 http://iterm.svn.sourceforge.net/iterm/?rev=1851&view=rev Author: delx Date: 2009-09-28 02:47:13 +0000 (Mon, 28 Sep 2009) Log Message: ----------- Fixed IME when option key is set to meta/esc Modified Paths: -------------- trunk/PTYTextView.m Modified: trunk/PTYTextView.m =================================================================== --- trunk/PTYTextView.m 2009-09-28 00:39:55 UTC (rev 1850) +++ trunk/PTYTextView.m 2009-09-28 02:47:13 UTC (rev 1851) @@ -821,20 +821,22 @@ keyIsARepeat = [event isARepeat]; // Hide the cursor - [NSCursor setHiddenUntilMouseMoves: YES]; + [NSCursor setHiddenUntilMouseMoves:YES]; + // Should we process the event immediately in the delegate? if([delegate hasKeyMappingForEvent:event highPriority:YES] || - (modflag & NSNumericPadKeyMask) || - (modflag & NSFunctionKeyMask)) + (modflag & NSNumericPadKeyMask) || (modflag & NSFunctionKeyMask) || + ((modflag & NSAlternateKeyMask) && [delegate optionKey] != OPT_NORMAL)) { [delegate keyDown:event]; return; } + // Let the IME process key events IM_INPUT_INSERT = NO; - if([[self delegate] optionKey] == OPT_NORMAL) { - [self interpretKeyEvents:[NSArray arrayWithObject:event]]; - } + [self interpretKeyEvents:[NSArray arrayWithObject:event]]; + + // If the IME didn't want it, pass it on to the delegate if(!prev && !IM_INPUT_INSERT && ![self hasMarkedText]) { [delegate keyDown:event]; } This was sent by the SourceForge.net collaborative development platform, the world's largest Open Source development site. |