2099 | Keyboard shortcut to open in browser in background/foreground contrary to user preference.

- Add openInBrowserAlternate() function
- Add shit-modified entries to to GlobalKeyboardShortcuts.plist to trigger new function
This commit is contained in:
Martin Nash 2020-05-20 21:51:41 -07:00
parent 314df88e12
commit 834be9edff
2 changed files with 30 additions and 0 deletions

View File

@ -269,6 +269,12 @@ class MainWindowController : NSWindowController, NSUserInterfaceValidations {
openArticleInBrowser(sender)
}
@IBAction func openInBrowserAlternate(_ sender: Any?) {
if let link = currentLink {
Browser.open(link, inBackground: !AppDefaults.openInBrowserInBackground)
}
}
@IBAction func nextUnread(_ sender: Any?) {
guard let timelineViewController = currentTimelineViewController, let sidebarViewController = sidebarViewController else {
return

View File

@ -140,5 +140,29 @@
<key>action</key>
<string>toggleStarred:</string>
</dict>
<dict>
<key>key</key>
<string>[enter]</string>
<key>shiftModifier</key>
<true/>
<key>action</key>
<string>openInBrowserAlternate:</string>
</dict>
<dict>
<key>key</key>
<string>[return]</string>
<key>shiftModifier</key>
<true/>
<key>action</key>
<string>openInBrowserAlternate:</string>
</dict>
<dict>
<key>key</key>
<string>B</string>
<key>shiftModifier</key>
<true/>
<key>action</key>
<string>openInBrowserAlternate:</string>
</dict>
</array>
</plist>