diff --git a/Source/Modules/IMEModules/ctlInputMethod.swift b/Source/Modules/IMEModules/ctlInputMethod.swift index fb4a2a33..3433a0a5 100644 --- a/Source/Modules/IMEModules/ctlInputMethod.swift +++ b/Source/Modules/IMEModules/ctlInputMethod.swift @@ -77,9 +77,11 @@ class ctlInputMethod: IMKInputController { // MARK: - KeyHandler Reset Command - func resetKeyHandler() { - if let currentClient = currentClient { - keyHandler.clear() + func resetKeyHandler(client sender: Any? = nil) { + keyHandler.clear() + if let client = sender as? IMKTextInput { + handle(state: InputState.Empty(), client: client) + } else if let currentClient = currentClient { handle(state: InputState.Empty(), client: currentClient) } }