ctlIME // Extend resetKeyHandler() for specified clients.

This commit is contained in:
ShikiSuen 2022-05-19 08:54:25 +08:00
parent 9a71d52e85
commit e2bac3eb32
1 changed files with 5 additions and 3 deletions

View File

@ -77,9 +77,11 @@ class ctlInputMethod: IMKInputController {
// MARK: - KeyHandler Reset Command // MARK: - KeyHandler Reset Command
func resetKeyHandler() { func resetKeyHandler(client sender: Any? = nil) {
if let currentClient = currentClient {
keyHandler.clear() 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) handle(state: InputState.Empty(), client: currentClient)
} }
} }