0

I would like to make my own version of Mac's ABC-Extended keyboard for typing Pinyin (a way to write Mandarin that indicates tones). But when I use Xcode, I just see a target custom keyboard extension for iOS and nothing for macOS. I've looked into the program Ukulele but it doesn't seem like it will do everything I need. Theoretically I could also put my rules into files like how this article indicates but that also seems cumbersome based on what I want my keyboard to do.

Here's what I want it to do:

  • First option: user literally types "ni3 hao3" and my logic in real time changes their output to "nǐ hǎo" (there are pinyin/grammar rules for where the tone mark goes)
  • Secondly (phase 2 in my project), in their user settings for the keyboard, they could indicate they want to convert their text to Hanzi (the characters). So when they type their Pinyin, my algorithm guesses a best guess list of Hanzi characters that matches their Pinyin entry. This would require that I have a downloaded dictionary file for my keyboard.

Thanks for any help! I know how to program it I just need the right software to use :(

1
  • Btw, I'm curious what software the company Sogou uses for their mac version keyboard: pinyin.sogou.com/mac
    – Nick
    Apr 23 at 17:46

1 Answer 1

0

One option (but probably not practical for a project of the scope you envision) would be to use Apple's own Custom IM creator.

An example of one of these for only ni3 hao3 can be downloaded here.

1

You must log in to answer this question.

Not the answer you're looking for? Browse other questions tagged .