zonble
e9707b5427
Merge branch 'master' of github.com:openvanilla/McBopomofo
2022-02-03 00:06:03 +08:00
zonble
b5220cbfe3
Add tests.
2022-02-03 00:02:23 +08:00
Lukhnos Liu
68732e6b15
Merge pull request #271 from zonble/dev/tests
...
Adds unit test cases for the key handler
2022-02-02 07:52:10 -08:00
zonble
ec2fb7023c
Renames `var split` to `func split()`.
2022-02-02 23:01:16 +08:00
zonble
f39b4fa0bc
Moves the Swift StringUtils class to a Swift package.
2022-02-02 22:47:15 +08:00
zonble
56ced2dd0f
Adds test cases.
2022-02-02 21:25:51 +08:00
zonble
44ecf223d7
Adds test cases.
2022-02-02 21:10:26 +08:00
zonble
cac954a00b
Updates test cases.
2022-02-02 20:29:23 +08:00
zonble
5849478fe5
Removes the dependency on OpenVanilla.
2022-02-02 18:07:41 +08:00
zonble
4743889e2f
Removes the usage of OVUTF8Helper in the key handler.
2022-02-02 17:58:45 +08:00
Weizhong Yang a.k.a zonble
8e1e3d184b
Merge pull request #269 from lukhnos/mandarin-refactoring
...
Refactor the Bopomofo syllable library for better thread safety
2022-02-02 17:57:14 +08:00
Lukhnos Liu
59d6ace3e5
Update CI workflow
2022-02-01 18:45:19 -08:00
Lukhnos Liu
55971131f0
Expand tests
2022-02-01 18:41:24 -08:00
Lukhnos Liu
f591a4668c
Use thread-safe init for keyboard layouts
2022-02-01 18:41:20 -08:00
Lukhnos Liu
44f6167a38
Use C++ UTF-8 literals and remove MSVC escapes
2022-02-01 18:41:14 -08:00
Lukhnos Liu
385fd34476
Rename member variables
2022-02-01 18:41:09 -08:00
Lukhnos Liu
2f567cddc2
Use constexpr for Bopomofo Components
2022-02-01 18:41:02 -08:00
Lukhnos Liu
f4a0f2fe93
Update copyright headers and include guard
2022-02-01 18:40:56 -08:00
Lukhnos Liu
a455aef587
Fix most cpplint warnings
2022-02-01 18:40:50 -08:00
Lukhnos Liu
f0222c023d
Use default copy/move ctors and assignment ops
2022-02-01 18:40:43 -08:00
Lukhnos Liu
aa27cbbb02
Remove the "using namespace std;" usage
2022-02-01 18:40:39 -08:00
Lukhnos Liu
71b69cae50
Reformat with clang-format
2022-02-01 18:40:33 -08:00
Lukhnos Liu
4ebe1a1a11
Remove OpenVanilla dependencies
...
This removes one overengineered method from BopomofoSyllable and
rewrites a helper using a simpler UTF-8 heuristics.
Also adds the CMake project file and a unit test suite.
2022-02-01 18:40:18 -08:00
zonble
61c4a32f05
Adds tests.
2022-02-02 07:34:27 +08:00
zonble
49f998ad5d
Adds tests.
2022-02-02 07:24:47 +08:00
zonble
9c8d740fc6
Adds tests.
2022-02-02 07:24:47 +08:00
Weizhong Yang a.k.a zonble
063164d0ab
Merge pull request #268 from zonble/master
...
Various bug fixes for the inputting and marking states
2022-02-02 06:04:36 +08:00
zonble
118a1243de
Removes unused lines.
2022-02-02 06:02:44 +08:00
zonble
bd291be340
Removes a log.
2022-02-02 01:33:22 +08:00
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
5afc5defdd
Shows a tooltip when then cursor in a phrase whose length and count of readings do not match.
...
McBopomofo allows users to input pheases with a different length of the
characters and Bopomofo readings, for example, users can input ∴ with ㄙㄨㄛˇ-ㄧˇ.
When the cursor if between ㄙㄨㄛˇ and ㄧˇ, the users have no clue where
the cursor exactly is. The tooltip is to tell the users the cursor is
now betwen ㄙㄨㄛˇ and ㄧˇ.
2022-02-02 01:04:49 +08:00
zonble
82dbed7815
Fixes a crash on adding user phrases.
2022-02-01 08:41:36 +08:00
zonble
347560e36b
Disables adding phrases with shift-arraw keys when the length of the composing buffer and readings do not match.
2022-02-01 08:11:09 +08:00
zonble
74509ce3cb
Corrects the selection range while using Shift + Arrow keys to add new phrases.
2022-02-01 06:18:40 +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
8573332879
Removes unused localization.
2022-01-31 23:42:02 +08:00
Weizhong Yang a.k.a zonble
0700e0fc60
Merge pull request #266 from zonble/dev/associated_phrases
2022-01-31 22:35:38 +08:00
zonble
0fffe6f082
Fixes test cases.
2022-01-31 14:27:57 +08:00
Weizhong Yang a.k.a zonble
beaa6f5404
Merge pull request #263 from zonble/dev/associated_phrases
...
Implements the associated phrases function.
2022-01-31 14:19:46 +08:00
zonble
169d03ab9b
Minor changes on the associated phrases.
...
1. Removes the tooltip on the candidate window to make the exprience
looks like OpenVanilla.
2. Adds a Shift key symbol on the key label.
2022-01-31 14:16:16 +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
Lukhnos Liu
2dd398f6ca
Merge pull request #264 from zonble/dev/fseventstream
...
Loads the user phrases just after the files are changes.
2022-01-30 13:37:17 -08:00
Lukhnos Liu
e9bb086a11
Merge pull request #265 from zonble/master
...
Fixes the bug that Shift+Space did not commit current composing buffer.
2022-01-30 13:36:07 -08:00
zonble
3851f91d6c
Fixes the bug that Shift+Space did not commit current composing buffer.
2022-01-31 04:47:45 +08:00
zonble
1c339c622e
Loads the user phrases just after the files are changes.
...
The revision uses a FSEventStream to monitor the change of the folder
that stores user phrases.
2022-01-31 04:29:53 +08:00
Weizhong Yang a.k.a zonble
3099798195
Merge pull request #261 from zonble/master
...
Converts the input controller to Swift
2022-01-30 20:41:49 +08:00
zonble
c59560dba2
Fixes the behavior to use ESC to clear the input buffer area.
2022-01-30 20:37:05 +08:00
zonble
8ba4b9dfdf
Prevents loading data models repeatedly.
2022-01-30 20:27:33 +08:00
zonble
fe67daceee
Modifies the interface of LanguageModelManager to note that some methods are for testing only.
2022-01-30 20:18:43 +08:00
zonble
0b7fa06d0b
Fixes test cases.
2022-01-30 20:06:57 +08:00