wkwebview: move keyDown handler to WindowController so it doesn't require a click to activate
This commit is contained in:
1 parent
4e7e061176
commit
0d563fa3ba
2 files changed
+4
-4
No files matched your search
@@ -136,8 +136,4 @@ class ViewController: NSViewController, WKNavigationDelegate, WKUIDelegate, WKSc
|
||||
// Implements window.close()
|
||||
self.view.window?.close();
|
||||
}
|
||||
|
||||
override func keyDown(with event: NSEvent) {
|
||||
// Don't call super.keyDown so that it won't play the beeping noise.
|
||||
}
|
||||
}
|
||||
@@ -5,4 +5,8 @@ class WindowController : NSWindowController {
|
||||
super.init(coder: coder)
|
||||
shouldCascadeWindows = true
|
||||
}
|
||||
|
||||
override func keyDown(with event: NSEvent) {
|
||||
// Don't call super.keyDown so that it won't play the beeping noise.
|
||||
}
|
||||
}
|
||||
Reference in new issue
Block a user