Commit Graph

61 Commits

Author SHA1 Message Date
Lukhnos Liu 71b97f82b3 Simplify candidate fixing by moving code to Grid 2020-10-09 22:16:06 -07:00
Lukhnos Liu 7978a9efba Update composing buffer after candidate keys (#145)
Recent versions of Chrome started to rely on whether composing buffer
gets updated after an arrow key event to determine whether to dismiss
(force commit) the composing buffer and handle the arrow key event for
the omnibox URL suggestions.
2019-06-18 22:14:05 -07:00
Lukhnos Liu ea865c6a24 Fix a static analyzer warning 2018-12-01 06:58:42 -08:00
Lukhnos Liu 8058f37fff Modernize project and bump min version to 10.10
32-bit architecture support is removed as a result.
2018-11-24 21:47:15 -08:00
ovadmin e065d6fa17 Fix incorrect unprintable ASCII handling (#139)
When Caps Lock is on and when the character code is not printable, we
should simply reject handling such character instead of absorbing it and
inserting the character to the client buffer--not all apps handle those
insertions.
2018-07-07 13:25:10 -07:00
ovadmin 9be64e0a48 修正在 macOS 10.13 beta 上無法叫出偏好設定的問題
修正根據請參考以下連結:
3241c7f688
2017-09-04 21:21:09 -07:00
Lukhnos Liu 5f19be59b4 Override keyboard layout correctly. Fixes #86.
Using numerous NSLog's led to the discovery that when McBopofomo lost
function (as described in #86), -setValue:forTag:client: was often called
not just on the context of the foreground app, but also on the contexts
of the background apps. This led to the theory that calling keyboard
layout override in that method (not a documented way of doing things
anyways) might corrupt the input method context. That we swapped out
language model and the builder when the method got called didn't help.

In this commit, we put back the keyboard layout override code to where
it belongs -- in -activateServer: -- and we now only swap the language
model and re-create the builder if the input method really changes (e.g.
from Bopomofo to Plain Bopomofo, or vice versa).

Similar defensive coding is also used in the function key handler in the
-handleEvent:client: method.
2014-05-18 20:41:53 -07:00
Lukhnos Liu b56508c55c Add a debug menu item for checking updates 2014-05-16 21:16:39 -07:00
leafy7382 0240445af5 NSPropertyListFormat does not need an assignment before use, remove rvalue. 2013-02-17 01:10:43 +08:00
Lukhnos Liu 92e2d41eba Clean up reading buf at deactivation (fixes #72) 2012-12-13 19:50:04 -08:00
Lukhnos Liu 9448c1af48 Fix Plain Bopomofo regression (#71)
This is caused by a missing method. Our implementation for
-[NSObject(IMKServerInput) inputText🔑modifiers:client:] was changed
to handleEvent: in 0.9.5.

Interestingly, calling -inputText🔑modifiers:client: somehow worked
when we linked against OS X 10.7 SDK (that was the SDK the 0.9.5
distribution used). This is no longer true with OS X 10.8 SDK.
2012-12-12 20:32:50 -08:00
Lukhnos Liu 95405cc72b Add UI support for IBM layout. Fixes #67.
Also change the layout constant from 4 to 5 since 4 is taken by Pinyin
layout.
2012-11-18 01:29:20 -08:00
Mengjuei beee34b96c Enable IBM Keyboard Layout, no update to xib yet 2012-11-13 00:40:26 -08:00
Lukhnos Liu 31a1a042fe Enlarge maximum candidate list text size. 2012-10-31 20:58:24 -07:00
Lukhnos Liu fadf8d431e Support Home/End/Del in input buffer, fixes #63.
Also fix two subtle issues:

1. Enter (not Return) key now works in candidate list
2. Cursor index should be compared against builder's length, *not*
   composed string's length, because the former is counted in
   code point but the latter in UTF-16 units. The composed string's
   length might therefore be longer if the string contains
   codepoints > U+FFFF, which would cause the cursor mechanism to
   be off.
2012-09-18 22:34:00 -07:00
Lukhnos Liu d4730068fa Handle Shift with function key layout overrides. 2012-09-12 22:13:53 -07:00
Lukhnos Liu a2ea20306c Support overriding function key keyboard layout. 2012-09-12 21:59:53 -07:00
Lukhnos Liu 08e7b14f3e Use the new LM class. 2012-09-10 22:56:21 -07:00
Lukhnos Liu bf50e4fa7e Fix a punctuation bug in Plain Bopomofo mode.
Bopomofo keyboard layout-specific punctuation keys were not handeled
properly. The candidates are now correctly collected.
2012-09-10 19:12:57 -07:00
Lukhnos Liu 71921b848a Use stable sort in the engine.
So that unigram nodes with the same log probability are sorted
according to the order in which they were added to the language
model.
2012-09-10 19:02:24 -07:00
Lukhnos Liu 7b4568e152 Load Plain Bopomofo data. 2012-09-10 19:02:21 -07:00
Lukhnos Liu 4cf94d5824 Support customizable alphanumeric keyboard layout.
Also make the default candidate font size bigger.
2012-09-09 12:36:04 -07:00
Lukhnos Liu 31f796f620 Implement the Plain Bopomofo mode. 2012-09-09 01:58:42 -07:00
Lukhnos Liu 37f31364b5 Project reorganization.
This commit:

* Creates a new top-level Xcode project file
* Renames remaining Lettuce (the original codename) uses to McBopomofo
* Renames English.lproj (the old style locale name) to en.lproj
2012-09-08 19:28:15 -07:00
Lukhnos D. Liu ddbd94bee4 Extract the candidate handler; handle subtleties of vertical text mode.
Now both Left and Right can be used as choose-candidate key. Also the
candidate window now doesn't obscure the vertical text being typed by
moving to the right to the vertical text. Because of this, Left key
feels strange. Adding Right key should give a better mental model.
2012-05-06 16:19:33 -07:00
Lukhnos D. Liu c48d478b4e Move enums to the top of the file. 2012-05-06 15:56:21 -07:00
Lukhnos D. Liu 6f2d617bcb Rename global variables. 2012-05-06 15:55:35 -07:00
Lukhnos D. Liu b369106719 Add Home/End key support in candidate panels. 2012-05-06 15:52:45 -07:00
Lukhnos D. Liu 1993942cd4 Refactor the code so that we use enums for key codes. 2012-05-06 15:52:45 -07:00
Lukhnos D. Liu f457b9d463 Fix a bug where the sink key handler missed a rejection condition. 2012-05-06 15:52:44 -07:00
Lukhnos D. Liu c52d68ed9e Correct the pref key names. 2012-04-08 15:16:04 -07:00
Lukhnos D. Liu 36b5a605dc Fix the bug that kCandidateTextFontName and kCandidateKeyLabelFontName shared the same value. 2012-04-08 15:12:26 -07:00
Lukhnos D. Liu 1693dc210e Add support for changing candidate keys and candidate panel fonts. 2012-04-08 15:08:53 -07:00
Lukhnos D. Liu c676d0d62c Handle the case where text client fails to handle char attr request. 2012-04-07 01:14:55 -07:00
Lukhnos D. Liu b0b5dd0233 Remove CJK font requirement as OS X 10.7 already handles fallback better. 2012-03-29 20:57:16 -07:00
Lukhnos D. Liu 815f885e29 Improve UI parameters. 2012-03-29 12:19:00 -07:00
Lukhnos D. Liu 9128ef95b2 Use Voltaire for candidate UI; use 10.7 base SDK. 2012-03-28 23:28:42 -07:00
Mengjuei b7a74e5593 revision.... 2012-03-01 23:47:06 -08:00
Mengjuei 0d8e1ae20f Tab conversion into 4 spaces 2012-02-26 20:53:51 -08:00
Mengjuei 373c631036 cosmetic change and change the location of the user dictionary 2012-02-26 16:24:09 -08:00
Mengjuei 82ead6dd72 [NSEvent modifierFlags] is out of place, eliminated. D.
+some phrases from the old notebook. M.
2012-02-25 01:19:44 -08:00
Mengjuei 61e2ed10d2 Solves Issue #44 2012-02-21 22:38:30 -08:00
Mengjuei e4715a3ed1 Avoid a bug that commits wrong stuff... 2011-12-02 01:50:57 -08:00
zonble c9d0378cd5 Cleans-up InputMethodController.mm. 2011-10-18 22:26:55 +08:00
Mengjuei 872b4ffc5d This solves https://github.com/mjhsieh/McBopomofo/issues/22 2011-10-17 01:09:28 -07:00
zonble 8991ddfa4e Fixes a regression caused by trying to fix the problem of th numeric pad. 2011-10-17 13:57:38 +08:00
zonble a9095f8dac Handles the number keyboard correctly. 2011-10-17 10:29:47 +08:00
zonble 3b411087c6 Sets the keyboard layout to com.apple.keylayout.US, besides using Hanyu Pinyin. 2011-10-17 00:37:59 +08:00
zonble 358ce9ef97 Fixes the problem that Hanyu Pinyin keyboard layout does not work. 2011-10-17 00:18:54 +08:00
zonble d8444413b5 Ignores the up and down key if the reading buffer is not empty. 2011-10-02 22:29:26 +08:00