InputHandler // Change non-default behavior of the Esc key.

This commit is contained in:
ShikiSuen 2023-02-13 12:35:58 +08:00
parent 11a6e85860
commit acdde919ef
1 changed files with 5 additions and 1 deletions

View File

@ -584,7 +584,11 @@ extension InputHandler {
/// macOS Windows 使
delegate.switchState(IMEState.ofAbortion())
} else {
if isComposerOrCalligrapherEmpty { return true }
if isComposerOrCalligrapherEmpty {
let commitText = generateStateOfInputting(sansReading: true).displayedText
delegate.switchState(IMEState.ofCommitting(textToCommit: commitText))
return true
}
///
clearComposerAndCalligrapher()
switch compositor.isEmpty {