ctlIME // Reset KeyHandler if nil is passed to handle(event:).

This commit is contained in:
ShikiSuen 2022-09-08 15:32:16 +08:00
parent f5bec584a5
commit 8f7d5a8a2a
1 changed files with 5 additions and 4 deletions

View File

@ -207,15 +207,16 @@ class ctlInputMethod: IMKInputController {
@objc(handleEvent:client:) override func handle(_ event: NSEvent!, client sender: Any!) -> Bool { @objc(handleEvent:client:) override func handle(_ event: NSEvent!, client sender: Any!) -> Bool {
_ = sender // _ = sender //
// client()
if !(sender is IMKTextInput) { return false }
// //
ctlInputMethod.isASCIIModeSituation = isASCIIMode ctlInputMethod.isASCIIModeSituation = isASCIIMode
ctlInputMethod.isVerticalTypingSituation = isVerticalTyping ctlInputMethod.isVerticalTypingSituation = isVerticalTyping
// NSEvent nilApple InputMethodKit // NSEvent nilApple InputMethodKit
guard let event = event else { return false } // client()
guard let event = event, sender is IMKTextInput else {
resetKeyHandler()
return false
}
// IMK IMK // IMK IMK
// interpretKeyEvents() // interpretKeyEvents()