diff --git a/src/InputController.m b/src/InputController.m index bb6881c..a8745cb 100644 --- a/src/InputController.m +++ b/src/InputController.m @@ -89,14 +89,23 @@ -(BOOL)onKeyEvent:(NSEvent*)event client:(id)sender{ return NO; } - if(keyCode == KEY_RETURN || keyCode == KEY_SPACE){ + if(keyCode == KEY_RETURN){ if ( bufferedText && [bufferedText length] > 0 ) { [self commitComposition:sender]; return YES; } return NO; } - + + if(keyCode == KEY_SPACE){ + if ( bufferedText && [bufferedText length] > 0 ) { + [self appendToComposedBuffer: @" "]; + [self commitComposition:sender]; + return YES; + } + return NO; + } + if(keyCode == KEY_ESC){ if ( bufferedText && [bufferedText length] > 0 ) { [self cancelComposition];