Skip to content

Commit d4ab26e

Browse files
author
Artur
committed
Add shortcut for quitting app on cmd-q
1 parent fdb516b commit d4ab26e

File tree

1 file changed

+2
-3
lines changed

1 file changed

+2
-3
lines changed

passafari/ViewController.swift

Lines changed: 2 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -116,13 +116,12 @@ extension NSSearchField {
116116
if NSApp.sendAction(Selector(("undo:")), to:nil, from:self) { return true }
117117
case "a":
118118
if NSApp.sendAction(#selector(NSResponder.selectAll(_:)), to:nil, from:self) { return true }
119+
case "q":
120+
NSApplication.shared.terminate(self)
119121
default:
120122
break
121123
}
122124
}
123-
124-
if event.keyCode == 125 {
125-
}
126125
}
127126
return super.performKeyEquivalent(with: event)
128127
}

0 commit comments

Comments
 (0)