Pinyin keyboard usage

Does anyone know how the Pinyin keyboard in macOS is supposed to work. There’s a slight oddity in my app and I’m not sure if it is something I’m doing in the app or just normal for Pinyin. My application has a spreadsheet style grid, which is able to take any language input. When I setup Japanese keyboard everything works as expected, I can type on my English keyboard and get offerings for Japanese characters which I can accept by pressing return. In my app that return no only confirms the selected Japanese choice and then moves to the next row.

When I use a Pinyin keyboard however, my typing triggers the start of Chinese entry but pressing return doesn’t accept the selected entry it just moves down a row, leaving the English letters behind. To choose some Chinese I have to press the spacebar and then return. Is this normal behaviour or have I got a problem in my code?


From what I remember, the functionality is unique to the input method editor (Korean seemed to be different again).

I can confirm that our app which supports inline input method editing works the same way. I also checked TextEdit and that appears to be the same.

Hitting return appears to work if there are multiple options in the input method editor floating window and you use the cursor keys to select one. You can also use the numeric keys to choose an entry from the list.

So just to be clear:

when the screen looks like this and I press return the “da” stays and it doesn’t choose the highlighted option. If I press 1, 2 etc it enters that choice. If I press space it enters the current choice. Is that how it is meant to be?

Thats what it does in our app and also in TextEdit.

Great, thanks for the confirmation.