Skip to content

Add shortcuts to ease navigation#1835

Open
Perdu wants to merge 7 commits intostrawberrymusicplayer:masterfrom
Perdu:add_shortcuts_rebased
Open

Add shortcuts to ease navigation#1835
Perdu wants to merge 7 commits intostrawberrymusicplayer:masterfrom
Perdu:add_shortcuts_rebased

Conversation

@Perdu
Copy link
Copy Markdown
Contributor

@Perdu Perdu commented Oct 14, 2025

  • Ctrl+End to go to last tab
  • Ctrl+Home to go to currently active tab (playing/paused)
  • Ctrl+C to close current tab

Notes:

  • I used Ctrl-C instead of Ctrl-W because Ctrl-W is already taken by src/core/mainwindow.cpp:1065. However, that does not seem to be doing anything for me (on Arch Linux / i3). I think this deserves investigation. If this is broken/old code, I think that shortcut could be reclaimed for closing tabs.
  • Proposed implementation makes Ctrl+Home return to active tab, or to first tab if none is active. This may be confusing for users and could be restricted to not doing anything if no tab is active.

@Perdu
Copy link
Copy Markdown
Contributor Author

Perdu commented Oct 15, 2025

CI run errors are unrelated to the patch

@jonaski
Copy link
Copy Markdown
Member

jonaski commented Oct 26, 2025

CTRL + End and CTRL + Home is already for moving up and down the playlist without selecting the track, so another combination must be used. I also don't like CTRL + C since that's usually copy to clipboard or interrupt program.

CTRL + W works here, it minimizes the window.

Perdu added 4 commits November 4, 2025 18:49
This avoids intercepting Qt behaviours such as closing settings window
It will return to first playlist if none is active
@Perdu Perdu force-pushed the add_shortcuts_rebased branch from bc0fdc8 to d849ba7 Compare November 4, 2025 17:54
@Perdu
Copy link
Copy Markdown
Contributor Author

Perdu commented Nov 4, 2025

CTRL + End and CTRL + Home is already for moving up and down the playlist without selecting the track, so another combination must be used. I also don't like CTRL + C since that's usually copy to clipboard or interrupt program.

OK, I moved them to Ctrl+Shift+End and Ctrl+Shift+Home

CTRL + W works here, it minimizes the window.

Hmm, this does not work for me (on i3, if relevant). I cannot test properly.
I moved this feature to Ctrl+H as I suspect the behaviour may interfere with other Qt behaviour (for instance, Ctrl+W closes the settings window) and set closing playlists to Ctrl+W.
If you're unhappy with that, what shortcut would you suggest for closing playlist/tabs? As Ctrl+W is the standard shortcut, I think it makes more sense to move the hide feature somewhere else

Edit: once again, CI errors are unrelated (is it because I force-pushed?)

Copy link
Copy Markdown

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This PR adds keyboard shortcuts to improve playlist tab navigation in the Strawberry music player. However, there are critical bugs that need to be addressed before merging.

Key changes:

  • Adds Ctrl+Shift+End to navigate to the last playlist tab
  • Adds Ctrl+Shift+Home to navigate to the active (playing/paused) playlist tab
  • Adds Ctrl+W to close the current playlist tab (changes existing Ctrl+W window-hide shortcut to Ctrl+H)

Reviewed changes

Copilot reviewed 6 out of 6 changed files in this pull request and generated 5 comments.

Show a summary per file
File Description
src/playlist/playlisttabbar.h Adds CloseCurrentTab method declaration
src/playlist/playlisttabbar.cpp Implements CloseCurrentTab to close the currently selected tab with safety check
src/playlist/playlistcontainer.h Adds method declarations for new navigation functions and updates SetActions signature
src/playlist/playlistcontainer.cpp Implements GoToLastPlaylistTab and GoToActivePlaylistTab; connects new actions to handlers
src/core/mainwindow.ui Defines three new actions for the playlist navigation shortcuts
src/core/mainwindow.cpp Assigns keyboard shortcuts to actions and updates SetActions call; changes window-hide shortcut from Ctrl+W to Ctrl+H

Critical Issues Found:

  1. Function signature mismatch between header and implementation files will cause wrong actions to be connected
  2. Potential crash when navigating to active tab if no playlist is currently active
  3. Duplicate signal connection causing clear playlist to be triggered twice
  4. Documentation mismatch between PR description and actual keyboard shortcuts implemented

💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.

Comment thread src/playlist/playlistcontainer.cpp
Comment thread src/core/mainwindow.cpp
Comment thread src/core/mainwindow.cpp Outdated
Comment thread src/playlist/playlistcontainer.cpp
Comment thread src/playlist/playlistcontainer.h Outdated
@Perdu Perdu mentioned this pull request Jan 12, 2026
@Perdu
Copy link
Copy Markdown
Contributor Author

Perdu commented Jan 12, 2026

Comments addressed. This PR can be reviewed now.

@Perdu
Copy link
Copy Markdown
Contributor Author

Perdu commented Feb 10, 2026

Hello! Will this be reviewed/merged? I've been using it for months and can confirm it's working as expected.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants