Issue #770

Handle cancelOperation somewhere up in responder chain

class MyWindow: NSWindow {
    let keyHandler = KeyHandler()

    override func cancelOperation(_ sender: Any?) {
        super.cancelOperation(sender)
        keyHandler.onEvent(.esc)
    }
}