Skip to content

Commit

Permalink
fix: ime could not follow the keyboard's ascii mode after switching
Browse files Browse the repository at this point in the history
  • Loading branch information
WhiredPlanck committed Jul 25, 2024
1 parent 92c09b7 commit 10b885f
Showing 1 changed file with 3 additions and 2 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -83,6 +83,9 @@ class KeyboardWindow(
currentKeyboard?.let {
if (it.isLock) lastLockKeyboardId = target
dispatchCapsState(it::setShifted)
if (Rime.isAsciiMode != it.currentAsciiMode) {
Rime.setOption("ascii_mode", it.currentAsciiMode)
}
// TODO:为避免过量重构,这里暂时将 currentKeyboard 同步到 KeyboardSwitcher
KeyboardSwitcher.currentKeyboard = it
mainKeyboardView.keyboard = it
Expand Down Expand Up @@ -202,8 +205,6 @@ class KeyboardWindow(
} else {
if (Rime.isAsciiMode) Rime.setOption("ascii_mode", false)
}
} else if (Rime.isAsciiMode != it.currentAsciiMode) {
Rime.setOption("ascii_mode", it.currentAsciiMode)
}
}
}
Expand Down

0 comments on commit 10b885f

Please sign in to comment.