Lukhnos Liu
dc6ef93d72
Remove the "using namespace" usage in McBopomofo
2022-02-19 10:00:28 -08:00
Lukhnos Liu
2091c1dc7d
Format ObjC code with clang-format, WebKit style
2022-02-19 08:26:28 -08:00
Lukhnos Liu
ea2e76e107
Handle [A-Z] if input state is not empty ( #292 )
...
This fixes the regression, first introduced in 2.2, from 2.0.x behavior.
2022-02-16 00:15:40 -08:00
zonble
b5d9ce60bf
Prevents the override model to remember symbols with scode -8 or lower.
2022-02-14 01:38:26 +08:00
zonble
83184229e6
Hides the function that using Ctrl+Enter to output BPMF readings.
2022-02-13 23:05:59 +08:00
zonble
11caa62b5d
Prevents the user override model to store symbols.
2022-02-13 22:57:13 +08:00
zonble
f32689eede
Adds symbols.
2022-02-13 22:40:44 +08:00
zonble
472b149020
Adds tests.
2022-02-04 05:19:25 +08:00
zonble
ccfb97e7c5
Fixes the bug that the state was not reset if marking range is zero.
2022-02-04 04:33:49 +08:00
zonble
bfa272ac65
Minor fix on the function to move cursor after selection.
2022-02-04 00:09:44 +08:00
zonble
9ade7d16a9
Adds an setting to move the cursor after selecting a candidate.
...
The setting only works when "SelectPhraseAfterCursorAsCandidate" is also
on. When a user use the mode, it is very possible that he or she has
already something in the input buffer and go back to choose a candidate.
When he or she completes selection, the user may want to go back to the
end and continue inputting. The setting is a time saver.
2022-02-04 00:03:16 +08:00
zonble
2880394812
Fixes a minor bug on handling backspace key.
2022-02-03 01:49:41 +08:00
zonble
a567ad0e65
Updates copyright info.
2022-02-03 01:20:35 +08:00
zonble
d4173bd931
Bug fixes on the marking state.
...
When the length of the range become to 0, the controller should go back
to inputting state.
2022-02-03 01:07:54 +08:00
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
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
zonble
49f998ad5d
Adds tests.
2022-02-02 07:24:47 +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
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
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
zonble
3851f91d6c
Fixes the bug that Shift+Space did not commit current composing buffer.
2022-01-31 04:47:45 +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
c3d953c618
Converts input mode into a typed enum.
2022-01-30 08:06:22 +08:00
zonble
4c358c1c1d
Converts InputMethodController to Swift.
2022-01-30 08:06:22 +08:00
zonble
485925634a
Adds unit tests for the key handler.
2022-01-28 20:43:43 +08:00
zonble
464a54f98a
Also uses the backspace key to cancel candidate in smart BPMF mode.
...
Going and Chewing also use backspace to do this.
2022-01-28 19:23:55 +08:00
zonble
c3304bc5f7
Allows users to input letters when candidate window is open in plain BPMF mode.
2022-01-28 19:10:01 +08:00
zonble
618065b881
Fixes the state from handling enter in plain BPMF mode.
2022-01-28 18:55:58 +08:00
zonble
ee521b6ee2
Fixes the behavior of the delete and backspace key.
2022-01-28 16:59:28 +08:00
zonble
9612aa6ba0
Code clean-up.
2022-01-28 16:51:25 +08:00
zonble
b13da10ec0
Code clean-up.
2022-01-28 16:16:52 +08:00
zonble
0bc9468ba2
Splits Input Method controller into two classes.
2022-01-28 15:02:00 +08:00