vChewing-macOS/Source/zh-Hant.lproj
zonble 2ebc789030 Implements the associated phrases function.
Since we use states manage the input flow in McBopomofo, implementing this function becomes easy. What I did is to create a new state, Associated Phrases state, and let the key handler to emit such a state just after emitting a Committing state.

When the input method controller is under Associated Phrase state, it shows the candidate window with a tooltip, and only accept candidate keys with the shift key. The key handler uses the characters without modifiers in an NSEvent object to find if there is any matching candidate label, so I added a new member "inputTextIgnoringModifiers" to KeyHandlerInput.

I use KeyValueBlobReader to read the associated phrases. I use the cin file from OpenVanilla project but removed the head and tail of the file to pass KeyValueBlobReader's validation.
2022-01-31 13:23:49 +08:00
..
Credits.rtf Updates copyright information. 2022-01-22 11:24:22 +08:00
InfoPlist.strings Update copyright years 2022-01-18 23:28:08 -08:00
Localizable.strings Implements the associated phrases function. 2022-01-31 13:23:49 +08:00
MainMenu.xib Modernize project and bump min version to 10.10 2018-11-24 21:47:15 -08:00
preferences.xib Adds an option to let users to choose Chinse conversion style. 2022-01-16 15:04:20 +08:00
template-data.txt Write templates the first time custom data is used 2022-01-18 13:42:45 -08:00
template-exclude-phrases-plain-bpmf.txt Write templates the first time custom data is used 2022-01-18 13:42:45 -08:00
template-exclude-phrases.txt Write templates the first time custom data is used 2022-01-18 13:42:45 -08:00
template-phrases-replacement.txt Write templates the first time custom data is used 2022-01-18 13:42:45 -08:00