From 6023214cb3bea38e5005e6e6e4780c26676fae0e Mon Sep 17 00:00:00 2001 From: diyaa Date: Tue, 15 Sep 2026 12:37:11 +0200 Subject: [PATCH] Add keyboard navigation shortcuts --- Sources/MusicAssistantApp/Presentation/ChatWorkspaceView.swift | 1 + Sources/MusicAssistantApp/Presentation/ProjectBrowserView.swift | 1 + .../MusicAssistantApp/Presentation/ProjectInspectorView.swift | 1 + docs/TASKS.md | 2 +- 4 files changed, 4 insertions(+), 1 deletion(-) diff --git a/Sources/MusicAssistantApp/Presentation/ChatWorkspaceView.swift b/Sources/MusicAssistantApp/Presentation/ChatWorkspaceView.swift index dde4050..a6112c5 100644 --- a/Sources/MusicAssistantApp/Presentation/ChatWorkspaceView.swift +++ b/Sources/MusicAssistantApp/Presentation/ChatWorkspaceView.swift @@ -182,6 +182,7 @@ private struct ChatComposer: View { Label("Send", systemImage: "paperplane.fill") .labelStyle(.iconOnly) } + .keyboardShortcut(.return, modifiers: .command) .buttonStyle(.borderedProminent) .disabled(text.trimmingCharacters(in: .whitespacesAndNewlines).isEmpty) .help("Send") diff --git a/Sources/MusicAssistantApp/Presentation/ProjectBrowserView.swift b/Sources/MusicAssistantApp/Presentation/ProjectBrowserView.swift index 4bfff48..021b8fc 100644 --- a/Sources/MusicAssistantApp/Presentation/ProjectBrowserView.swift +++ b/Sources/MusicAssistantApp/Presentation/ProjectBrowserView.swift @@ -43,6 +43,7 @@ struct ProjectBrowserView: View { } label: { Label("New Project", systemImage: "plus") } + .keyboardShortcut("n", modifiers: .command) .disabled(viewModel.isCreatingProject) } } diff --git a/Sources/MusicAssistantApp/Presentation/ProjectInspectorView.swift b/Sources/MusicAssistantApp/Presentation/ProjectInspectorView.swift index b9c058e..8aa5f17 100644 --- a/Sources/MusicAssistantApp/Presentation/ProjectInspectorView.swift +++ b/Sources/MusicAssistantApp/Presentation/ProjectInspectorView.swift @@ -28,6 +28,7 @@ struct ProjectInspectorView: View { } label: { Label("Save", systemImage: "tray.and.arrow.down") } + .keyboardShortcut("s", modifiers: .command) .disabled(isSaving) } .padding(16) diff --git a/docs/TASKS.md b/docs/TASKS.md index 5d4cc2f..7d720dd 100644 --- a/docs/TASKS.md +++ b/docs/TASKS.md @@ -114,7 +114,7 @@ requirement is missing and blocks implementation, record it in - [x] Add validation for contradictory/invalid project settings. - [x] Add loading, offline and provider-error states. -- [ ] Add accessibility labels and keyboard navigation. +- [x] Add accessibility labels and keyboard navigation. - [ ] Test project/version recovery. - [ ] Test AI output against locked user choices. - [ ] Test selected instruments influence compiled song-generation