I'm trying to make use of OSX's input methods, specifically Cangjie and Pinyin, in an OSX application. Basically, what I want to do is to switch the input method to Cangjie upon entering a text field. The user can now use Cangjie to input Characters in Traditional Chinese. Upon leaving this text field, I want to use the other input methods (Jyutping and Pinyin) to find the characters pronunciation. This should be possible – there is a little tool provided by Apple, called TCIMTool, that can be opened by choosing "Find Input Code" under the Cangjie input menu, that does exactly this – you enter a Chinese Character and it displays the input code for Pinyin (and some others).
I tried to find anything about this in the XCode documentation but so far to no avail. Any help would be most appreciated 🙂
The mode identifier you need to provide to the selectInputMode method is described as:
So if you can get the key for the Cangjie entry in the component input mode dictionary, you should be home free.
I've tried to search for this, but with no luck. Hopefully you'll know where to look for this. Maybe in the plist for your application?