PingguoTones lets you write pīnyīn with tone marks on macOS.
- Clone the whole Git repository, or download it as a ZIP file. Do not manually copy the text from
pingguotones.inputpluginas it might change the file encoding and cause the following steps to fail. - Double-click on the file
pingguotones.inputpluginin Finder. If the file is prevented from opening by macOS, go to "System Settings → Privacy & Security → Security → Open Anyway". - Restart your computer.
- Go to "System Settings → Keyboard → Text Input → Edit…", then press
+in lower-left corner to add a new input method. Find "PingguoTones" and add it to your input sources (it should be listed under "Chinese, Simplified"). - You may delete the downloaded repository. The
pingguotones.inputpluginfile was automatically copied to~/Library/Input Methodsin step 2.
To type "pīnyīn", switch to the PingguoTones input method and type pin1 and space, followed by yin1 and space.
- Remove
pingguotones.inputpluginfrom~/Library/Input Methods. - Restart your computer.
Installation process courtesy of @andrejbauer (https://gist.github.com/andrejbauer/333f81bb7394502a8539ccf93c7d703f).