Feature: Adds open in background (Shift+Cmd)

This commit is contained in:
James Magahern
2022-02-21 16:01:01 -08:00
parent 224a39b64f
commit f32c246e35
6 changed files with 86 additions and 32 deletions

View File

@@ -59,9 +59,11 @@ extension BrowserViewController: ShortcutResponder
guard let press = presses.first else { return }
if let key = press.key {
if key.modifierFlags == [.command] {
let isDown = press.phase == .began || press.phase == .changed || press.phase == .stationary
let isDown = press.phase == .began || press.phase == .changed || press.phase == .stationary
if key.keyCode == .keyboardLeftGUI || key.keyCode == .keyboardRightGUI {
self.commandKeyHeld = isDown
} else if key.keyCode == .keyboardLeftShift || key.keyCode == .keyboardRightShift {
self.shiftKeyHeld = isDown
}
}
}