macOS: Get back removing tunnel using the Delete key

This now works only when the list view has focus

Signed-off-by: Roopesh Chander <roop@roopc.net>
This commit is contained in:
Roopesh Chander 2019-05-09 18:58:12 +05:30
parent f9880907a2
commit 3f25d54dcc
1 changed files with 8 additions and 0 deletions

View File

@ -309,6 +309,14 @@ extension TunnelsListTableViewController: NSTableViewDelegate {
} }
} }
extension TunnelsListTableViewController {
override func keyDown(with event: NSEvent) {
if event.specialKey == .delete {
handleRemoveTunnelAction()
}
}
}
class FillerButton: NSButton { class FillerButton: NSButton {
override var intrinsicContentSize: NSSize { override var intrinsicContentSize: NSSize {
return NSSize(width: NSView.noIntrinsicMetric, height: NSView.noIntrinsicMetric) return NSSize(width: NSView.noIntrinsicMetric, height: NSView.noIntrinsicMetric)