diff --git a/mac/Sources/Byre/Dialogs.swift b/mac/Sources/Byre/Dialogs.swift index 77453eb..66116a8 100644 --- a/mac/Sources/Byre/Dialogs.swift +++ b/mac/Sources/Byre/Dialogs.swift @@ -53,6 +53,7 @@ final class Overlays { var switcher: SwitcherModel? var leftTab = LeftTab.lead var leadFocus = 0 + var projectFocus = 0 @ObservationIgnored var pickerFrame: CGRect = .zero @ObservationIgnored var menuHover = false var paneFrame: CGRect = .zero diff --git a/mac/Sources/Byre/Project.swift b/mac/Sources/Byre/Project.swift index 1b93e30..2aa908e 100644 --- a/mac/Sources/Byre/Project.swift +++ b/mac/Sources/Byre/Project.swift @@ -57,6 +57,9 @@ struct ProjectView: View { } refresh() } + .onChange(of: overlays.projectFocus) { + keys = true + } .onDisappear { off?() off = nil diff --git a/mac/Sources/Byre/Switcher.swift b/mac/Sources/Byre/Switcher.swift index 4f50944..e229943 100644 --- a/mac/Sources/Byre/Switcher.swift +++ b/mac/Sources/Byre/Switcher.swift @@ -18,6 +18,8 @@ func runGo(_ key: String, _ store: Store, _ overlays: Overlays) { createTask(project.id, .init(), store, overlays) } case "p": + overlays.window?.makeFirstResponder(nil) + overlays.projectFocus += 1 store.focusTab(.project) case "l": overlays.switcher?.close()