Commit Graph

11 Commits

Author SHA1 Message Date
zonble cbdbfa2518 Prevents the key handler to see reserved keys like page up/down as BPMF keys. 2022-02-02 01:31:53 +08:00
zonble 536c9d1fc7 Adds some punctuations using control key.
It allows users ever use Microsoft Bopomofo to input punctuations using
keys like ctrl + comma.
2022-02-01 02:32:55 +08:00
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
zonble 439bb99ef5 Removes logs. 2022-01-28 17:53:32 +08:00
zonble b13da10ec0 Code clean-up. 2022-01-28 16:16:52 +08:00
zonble dd803b6c31 Removes logs and add copyright information. 2022-01-28 04:40:53 +08:00
zonble 056ffeabfd Tunes the interface. 2022-01-28 04:04:44 +08:00
zonble 7ee955a55c Cleans-up KeyHandlerInput. 2022-01-28 03:24:06 +08:00
zonble 87702f76c5 Cleans-up the interface. 2022-01-28 03:18:10 +08:00
zonble fc0c077193 Fixes the bug on handling arrow keys. 2022-01-28 01:35:15 +08:00
zonble 1ad9e23918 Refactors the input controller. 2022-01-27 22:54:53 +08:00