File tree Expand file tree Collapse file tree 2 files changed +6
-2
lines changed
app/src/main/java/com/osfans/trime/ime Expand file tree Collapse file tree 2 files changed +6
-2
lines changed Original file line number Diff line number Diff line change @@ -131,7 +131,10 @@ class KeyboardWindow(
131131 val targetMode = if (it.resetAsciiMode) it.asciiMode else it.lastAsciiMode
132132
133133 if (currentMode != targetMode) {
134- service.postRimeJob { setRuntimeOption(" ascii_mode" , targetMode) }
134+ service.postRimeJob {
135+ commitComposition()
136+ setRuntimeOption(" ascii_mode" , targetMode)
137+ }
135138 }
136139
137140 // TODO:为避免过量重构,这里暂时将 currentKeyboard 同步到 KeyboardSwitcher
Original file line number Diff line number Diff line change @@ -120,7 +120,8 @@ class LiquidWindow(
120120 val (isAsciiMode, isAsciiPunch) = it.statusCached.run { isAsciiMode to isAsciiPunct }
121121 if (isAsciiMode) it.setRuntimeOption(" ascii_mode" , false )
122122 if (isAsciiPunch) it.setRuntimeOption(" ascii_punch" , false )
123- commonKeyboardActionListener.listener.onText(" {Escape}$symbol " )
123+ it.clearComposition()
124+ it.simulateKeySequence(symbol)
124125 if (isAsciiPunch) it.setRuntimeOption(" ascii_punch" , true )
125126 ContextCompat .getMainExecutor(service).execute {
126127 windowManager.attachWindow(KeyboardWindow )
You can’t perform that action at this time.
0 commit comments