diff --git a/Source/Modules/ControllerModules/KeyHandler.mm b/Source/Modules/ControllerModules/KeyHandler.mm index 3cb060d6..869d5560 100644 --- a/Source/Modules/ControllerModules/KeyHandler.mm +++ b/Source/Modules/ControllerModules/KeyHandler.mm @@ -524,7 +524,7 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; // MARK: Enter if ([input isEnter]) { if ([input isControlHold]) { - if (ctlInputMethod.areWeUsingOurOwnPhraseEditor) { + if (ctlInputMethod.areWeUsingOurOwnPhraseEditor || [input isCommandHold]) { return [self _handleCtrlEnterWithState:state stateCallback:stateCallback errorCallback:errorCallback]; } } @@ -850,12 +850,10 @@ static NSString *const kGraphVizOutputfile = @"/tmp/vChewing-visualization.dot"; - (BOOL)_handleCtrlEnterWithState:(InputState *)state stateCallback:(void (^)(InputState *))stateCallback errorCallback:(void (^)(void))errorCallback { - if (![state isKindOfClass:[InputStateInputting class]]) { - return NO; - } + if (![state isKindOfClass:[InputStateInputting class]]) return NO; NSArray *readings = [self _currentReadings]; - NSString *composingBuffer = [readings componentsJoinedByString:@"-"]; + NSString *composingBuffer = (ctlInputMethod.areWeUsingOurOwnPhraseEditor) ? [readings componentsJoinedByString:@"-"] : [readings componentsJoinedByString:@" "] ; [self clear];