@@ -11,7 +11,7 @@ delivering near-native IME switching speed.
1111</p >
1212
1313<p align =" center " >
14- <img src =" https://img.shields.io/github/v/tag/riodelphino/macime?tag=v4.3.0 &style=for-the-badge " />
14+ <img src =" https://img.shields.io/github/v/tag/riodelphino/macime?tag=v4.3.1 &style=for-the-badge " />
1515 <img src =" https://img.shields.io/badge/License-MIT-%232196F3.svg?style=for-the-badge " />
1616 <img src =" https://img.shields.io/badge/Swift-5.x-orange.svg?style=for-the-badge&logo=swift&logoColor=white " />
1717 <img src =" https://img.shields.io/badge/Easy%20Install-Homebrew-%23FBB040?style=for-the-badge " />
@@ -465,6 +465,9 @@ Via [macime.nvim](https://github.com/riodelphino/macime.nvim), the IME switching
465465Solution for now:
466466- Switch IME several times, and might warm up ` macimed` or CJK IME. It probably reduces the CJK switching error rate.
467467
468+ See further information: [Unstable CJK Switching # 2](https://github.com/riodelphino/macime/issues/2)
469+
470+
468471# ## azookey prevents macime to change IME
469472
470473` azookey` | [azookey-Desktop](https://github.com/azooKey/azooKey-Desktop) prevents ` macime set` command to work.
@@ -499,54 +502,6 @@ brew install macime
499502```
500503This cleans up the corrupted tap cache and performs a fresh installation.
501504
502- ## Technical Info
503-
504- ### Unstable Switching Issue
505-
506- See [Unstable Switching](#unstable-switching)
507-
508- #### Successful CJK IME Switching
509-
510- The switch works correctly with the following sequence:
511- 1. Recieve `set com.google.inputmethod.Japanese.base` comannd
512- 2. Call `IME.execute()`
513- 3. Call `IME.set()`
514- 4. Call `IME.select()` to select specified IME
515- 5. The CJK IME activates specific mode internaly (OK: Before `CJK.refresh()`)
516- 6. Call `CJK.refresh()` (OK: After IME mode changed)
517- 7. Activate CJK temp window
518- 8. Deactivate CJK temp window
519- 9. ✅ The CJK IME and it' s mode are applied correctly
520-
521-
522- # ### Failed CJK IME Switching
523-
524- When it fails, the sequence appears to be:
525- 1. Recieve ` set com.google.inputmethod.Japanese.base` comannd
526- 2. Call ` IME.execute()`
527- 3. Call ` IME.set()`
528- 4. Call ` IME.select()` to select specified IME
529- 5. Call `CJK.refresh ()` (NG: Before IME mode changed. Too fast)
530- 6. Activate CJK temp window
531- 7. Deactivate CJK temp window
532- 8. The CJK IME activates specific mode internaly (NG: After `CJK.refresh ()` . Too late)
533- 9. ❌ The CJK IME is switched, but the mode is not applied.
534-
535- > [! Important]
536- > ` CJK.refresh()` must be called after CJK IME has internally switched modes.
537- > However, the execution order occasionally reverses.
538-
539- # ### Attempt to Fix
540-
541- I tried adding an ` imeStabilizationDelay = 0.05` (ms) at first.
542- However, even setting the delay to ` 0.00` does not change the success rate.
543-
544- I also added a code to switch to ` com.apple.keylayout.ABC` once before switching to CJK IME.
545- This modification boosted the success rate somehow.
546-
547- ` kTISNotifySelectedKeyboardInputSourceChanged` can catch the IME changing event, but cannot catch the IME Internal mode changing.
548-
549- Further investigation and proper fix are needed.
550505
551506## TODO
552507
0 commit comments