mirror of
https://github.com/MonitorControl/MonitorControl.git
synced 2026-05-15 06:05:52 -06:00
Close preference pane using cmd+w (#645)
This commit is contained in:
parent
438d60128a
commit
1ec444460c
3 changed files with 14 additions and 2 deletions
|
|
@ -1,5 +1,7 @@
|
|||
// Copyright © MonitorControl. @JoniVR, @theOneyouseek, @waydabber and others
|
||||
|
||||
import Cocoa
|
||||
|
||||
import Preferences
|
||||
|
||||
extension Preferences.PaneIdentifier {
|
||||
|
|
@ -9,3 +11,13 @@ extension Preferences.PaneIdentifier {
|
|||
static let displays = Self("Displays")
|
||||
static let about = Self("About")
|
||||
}
|
||||
|
||||
public extension PreferencesWindowController {
|
||||
override func keyDown(with event: NSEvent) {
|
||||
if event.modifierFlags.intersection(.deviceIndependentFlagsMask) == .command, let key = event.charactersIgnoringModifiers {
|
||||
if key == "w" {
|
||||
self.close()
|
||||
}
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>6293</string>
|
||||
<string>6295</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSMinimumSystemVersion</key>
|
||||
|
|
|
|||
|
|
@ -19,7 +19,7 @@
|
|||
<key>CFBundleShortVersionString</key>
|
||||
<string>$(MARKETING_VERSION)</string>
|
||||
<key>CFBundleVersion</key>
|
||||
<string>6293</string>
|
||||
<string>6295</string>
|
||||
<key>LSApplicationCategoryType</key>
|
||||
<string>public.app-category.utilities</string>
|
||||
<key>LSBackgroundOnly</key>
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue