diff options
author | Roopesh Chander <roop@roopc.net> | 2019-05-06 11:12:47 +0530 |
---|---|---|
committer | Roopesh Chander <roop@roopc.net> | 2019-05-20 16:42:27 +0530 |
commit | 6d8965e97dd2a44c717ca06d0750700f299a0bc2 (patch) | |
tree | 01eb8e7941bc01437db2399990c29a8e3396033e /WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift | |
parent | macOS: Show app in dock when showing the manage tunnels window (diff) | |
download | wireguard-apple-6d8965e97dd2a44c717ca06d0750700f299a0bc2.tar.xz wireguard-apple-6d8965e97dd2a44c717ca06d0750700f299a0bc2.zip |
macOS: Remove custom key event handling
Signed-off-by: Roopesh Chander <roop@roopc.net>
Diffstat (limited to '')
-rw-r--r-- | WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift | 24 |
1 files changed, 0 insertions, 24 deletions
diff --git a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift index b388843..aa6a76d 100644 --- a/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift +++ b/WireGuard/WireGuard/UI/macOS/ViewController/ManageTunnelsRootViewController.swift @@ -115,27 +115,3 @@ extension ManageTunnelsRootViewController: TunnelsListTableViewControllerDelegat self.tunnelDetailVC = nil } } - -extension ManageTunnelsRootViewController { - override func keyDown(with event: NSEvent) { - let modifierFlags = event.modifierFlags.rawValue & NSEvent.ModifierFlags.deviceIndependentFlagsMask.rawValue - let isCmdOrCmdShiftDown = (modifierFlags == NSEvent.ModifierFlags.command.rawValue || modifierFlags == NSEvent.ModifierFlags.command.rawValue | NSEvent.ModifierFlags.shift.rawValue) - - if event.specialKey == .delete { - tunnelsListVC?.handleRemoveTunnelAction() - } else if isCmdOrCmdShiftDown { - switch event.charactersIgnoringModifiers { - case "n": - tunnelsListVC?.handleAddEmptyTunnelAction() - case "o": - tunnelsListVC?.handleImportTunnelAction() - case "t": - tunnelDetailVC?.handleToggleActiveStatusAction() - case "e": - tunnelDetailVC?.handleEditTunnelAction() - default: - break - } - } - } -} |