After an evaluation, GNOME has moved from Bugzilla to GitLab. Learn more about GitLab.
No new issues can be reported in GNOME Bugzilla anymore.
To report an issue in a GNOME project, go to GNOME GitLab.
Do not go to GNOME Gitlab for: Bluefish, Doxygen, GnuCash, GStreamer, java-gnome, LDTP, NetworkManager, Tomboy.
Bug 758637 - Introduce more keyboard shortcuts
Introduce more keyboard shortcuts
Status: RESOLVED FIXED
Product: gnome-music
Classification: Applications
Component: general
3.18.x
Other Linux
: Normal enhancement
: ---
Assigned To: gnome-music-maint
gnome-music-maint
Depends on: 754096
Blocks: 757833
 
 
Reported: 2015-11-25 09:31 UTC by Felipe Borges
Modified: 2016-08-16 13:20 UTC
See Also:
GNOME target: ---
GNOME version: ---


Attachments
help-overlay (33.52 KB, image/png)
2015-12-14 12:43 UTC, Daniel Korostil
  Details
Implement new keyboard shortcuts (3.86 KB, patch)
2016-03-22 19:48 UTC, Evandro Giovanini
none Details | Review
Implement new keyboard shortcuts (4.08 KB, patch)
2016-07-13 17:11 UTC, Evandro Giovanini
committed Details | Review

Description Felipe Borges 2015-11-25 09:31:20 UTC
It is quite common that music players have keyboard shortcuts. Music shouldn't be different. When I was working on 757833 I realized that we just have a few.

I did a little research to see what are the most standard music players shortcuts.

- Banshee http://banshee.fm/support/guide/keyboard-shortcuts/
- Rhythmbox https://help.gnome.org/users/rhythmbox/stable/shortcuts.html.en#keyboard-keys
- Itunes https://support.apple.com/kb/PH12310
- Windows Media Player http://windows.microsoft.com/en-us/windows/media-player-keyboard-shortcuts#1TC=windows-7
- Winamp 5 http://www.shortcutworld.com/en/win/Winamp_5.html
- Totem https://git.gnome.org/browse/totem/tree/data/shortcuts.ui
- VLC http://www.shortcutworld.com/en/win/VLC-Media-Player.html

* We currently use the Space bar for Play/Pause. [SPACE] is used for selecting items in Icon view, it is important for accessibility, so we might change from just Space to "Ctrl + Space" and/or [P] (just like Totem).
Comment 1 Daniel Korostil 2015-12-13 13:30:05 UTC
I discovered most players and their shortcuts to find all useful ones to reuse it in gnome-music. Some of them have no clear test-cases to be proposed (i.e. volume up/down), and some of these I'm proposing we should get rid of, I expect. Feel free to comment or discuss on irc.

General
-------

Ctrl + P   Preferences
Ctrl + F   Find
Ctrl + Q   Quit

Selection
----------

Ctrl + A                 Select all
Ctrl + Backslash   Unselect all
Esc                       Leave selection mode
Delete                  Remove

Playback
-------

Space                     Pause/unpause
Ctrl + N / Ctrl + >   Next Song
Ctrl + B / Ctrl + <   Previous song
Ctrl + R                  Toogle Repead mode
Ctrl + S                  Toogle Shuffle mode
Tab                        Swich playlist
Comment 2 Daniel Korostil 2015-12-14 12:43:50 UTC
Created attachment 317354 [details]
help-overlay
Comment 3 Felipe Borges 2015-12-14 12:50:26 UTC
(In reply to Daniel Korostil from comment #1)
> I discovered most players and their shortcuts to find all useful ones to
> reuse it in gnome-music. Some of them have no clear test-cases to be
> proposed (i.e. volume up/down), and some of these I'm proposing we should
> get rid of, I expect. Feel free to comment or discuss on irc.
> 
> General
> -------
> 
> Ctrl + P   Preferences
> Ctrl + F   Find
> Ctrl + Q   Quit
> 
> Selection
> ----------
> 
> Ctrl + A                 Select all
> Ctrl + Backslash   Unselect all
> Esc                       Leave selection mode
> Delete                  Remove
> 
> Playback
> -------
> 
> Space                     Pause/unpause

Space is used for accessibility. We need something else, like P or Ctrl+Space


> Ctrl + N / Ctrl + >   Next Song
> Ctrl + B / Ctrl + <   Previous song
> Ctrl + R                  Toogle Repead mode
> Ctrl + S                  Toogle Shuffle mode
> Tab                        Swich playlist

Tab is needed for accessibility too.
Comment 4 Felipe Borges 2015-12-14 12:55:23 UTC
(In reply to Daniel Korostil from comment #2)
> Created attachment 317354 [details]
> help-overlay

that's something for https://bugzilla.gnome.org/show_bug.cgi?id=757833

The patch we want here introduces the accelerators themselves in the code.
Comment 5 Felipe Borges 2015-12-14 13:35:36 UTC
(In reply to Felipe Borges from comment #3)
> (In reply to Daniel Korostil from comment #1)
> > I discovered most players and their shortcuts to find all useful ones to
> > reuse it in gnome-music. Some of them have no clear test-cases to be
> > proposed (i.e. volume up/down), and some of these I'm proposing we should
> > get rid of, I expect. Feel free to comment or discuss on irc.
> > 
> > General
> > -------
> > 
> > Ctrl + P   Preferences
> > Ctrl + F   Find
> > Ctrl + Q   Quit
> > 
> > Selection
> > ----------
> > 
> > Ctrl + A                 Select all
> > Ctrl + Backslash   Unselect all
> > Esc                       Leave selection mode
> > Delete                  Remove
> > 
> > Playback
> > -------
> > 
> > Space                     Pause/unpause
> 
> Space is used for accessibility. We need something else, like P or Ctrl+Space
> 
> 
> > Ctrl + N / Ctrl + >   Next Song
> > Ctrl + B / Ctrl + <   Previous song
> > Ctrl + R                  Toogle Repead mode
> > Ctrl + S                  Toogle Shuffle mode
> > Tab                        Swich playlist
> 
> Tab is needed for accessibility too.

please, look at https://help.gnome.org/users/gnome-help/stable/a11y.html.en
Comment 6 Allan Day 2015-12-14 17:33:00 UTC
Hey Daniel, thanks for these notes!

(In reply to Daniel Korostil from comment #1)
... 
> Ctrl + P   Preferences

Ctrl+P is generally used for print, so I'm not sure if this might be confusing. I'm not aware of a standard shortcut for preferences, but then I'm not sure if that's a useful thing to have anyway.

> Ctrl + F   Find

I would generally call this search rather than find. 

> Esc                       Leave selection mode

Esc is fairly generic and used for lots of things (exiting search, closing modal dialogs, and so on), so I'm not sure I'd list that.

> Delete                  Remove

Or should this be labeled "Move to trash"?

.... 
> Tab                        Swich playlist

How would this switch playlist exactly? Like, which playlist would it switch to?
Comment 7 Allan Day 2015-12-14 17:33:46 UTC
(In reply to Felipe Borges from comment #3)
...
> > Space                     Pause/unpause
> 
> Space is used for accessibility. We need something else, like P or Ctrl+Space

This use of space is quite common, and is something that it would be good to support. Totem uses space for pause/unpause.
Comment 8 Felipe Borges 2015-12-14 18:01:17 UTC
(In reply to Allan Day from comment #7)
> (In reply to Felipe Borges from comment #3)
> ...
> > > Space                     Pause/unpause
> > 
> > Space is used for accessibility. We need something else, like P or Ctrl+Space
> 
> This use of space is quite common, and is something that it would be good to
> support. Totem uses space for pause/unpause.

what I think totem does is pretty much what we already do: it grabs focus (by default) to the Play/Pause button. But if you press tab, you can see that the Space will have a different action (the next widget, the Forward button in this case).

That's the reason Space is not listed on Totem's shortcuts window: https://git.gnome.org/browse/totem/tree/data/shortcuts.ui
Comment 9 Daniel Korostil 2015-12-14 21:56:23 UTC
(In reply to Allan Day from comment #6)
> Hey Daniel, thanks for these notes!
> 
> (In reply to Daniel Korostil from comment #1)
> ... 
> > Ctrl + P   Preferences
> 
> Ctrl+P is generally used for print, so I'm not sure if this might be
> confusing. I'm not aware of a standard shortcut for preferences, but then
> I'm not sure if that's a useful thing to have anyway.
> 
Totem uses this. Builder provides "Ctrl" + ",". Some apps provide this shortcut. It's not common for every app. Can you please standardize them across Gnome domain at least? Because I see no practice I can rely on.
> > Ctrl + F   Find
> 
> I would generally call this search rather than find. 
> 
I have no strong opinion, but Find is more natural to me, because of F. 
> > Esc                       Leave selection mode
> 
> Esc is fairly generic and used for lots of things (exiting search, closing
> modal dialogs, and so on), so I'm not sure I'd list that.
> 
It's accessibility, so we shouldn't provide it, right?
> > Delete                  Remove
> 
> Or should this be labeled "Move to trash"?
> 
There is no trash, that's from playlist.
> .... 
> > Tab                        Swich playlist
> 
> How would this switch playlist exactly? Like, which playlist would it switch
> to?
It's sidebar,  alternatively we can switch them by Ctrl+pgdown/pgup like polari does.
Comment 10 Daniel Korostil 2015-12-14 22:02:02 UTC
I propose new revision after some chatting on irc and comments. I'm removing Selection group because it's common for every app with selection mode.

General
-------

Ctrl + P   Preferences
Ctrl + F   Search
Ctrl + Q   Quit

Playback
-------

Ctrl + P                  Pause/unpause
Ctrl + N / Ctrl + >   Next Song
Ctrl + B / Ctrl + <   Previous song
Ctrl + R                  Toogle Repead mode
Ctrl + S                  Toogle Shuffle mode
Ctrl + pgup            Next playlist
Ctrl + pgdown        Previous playlist
Comment 11 Felipe Borges 2015-12-15 09:54:09 UTC
(In reply to Daniel Korostil from comment #10)
> I propose new revision after some chatting on irc and comments. I'm removing
> Selection group because it's common for every app with selection mode.
> 
> General
> -------
> 
> Ctrl + P   Preferences
> Ctrl + F   Search
> Ctrl + Q   Quit
> 
> Playback
> -------
> 
> Ctrl + P                  Pause/unpause

It collides with 'Preferences'. I think should be: 
P / Ctrl + Space
Comment 12 Daniel Korostil 2015-12-16 15:29:35 UTC
I'm proposing next iteration. Hope it's pretty clean now.

General
-------
 
Ctrl + F   Search
Ctrl + Q   Quit
 
Playback
-------
 
Ctrl + Space           Pause/unpause
Ctrl + N / Ctrl + >   Next Song
Ctrl + B / Ctrl + <   Previous song
Ctrl + R                  Toogle Repead mode
Ctrl + S                  Toogle Shuffle mode

Navigation
-------

Ctrl + Tab   Switch view
Alt + ^       Go to album list
Comment 13 Allan Day 2015-12-17 10:35:18 UTC
(In reply to Daniel Korostil from comment #12)
> I'm proposing next iteration. Hope it's pretty clean now.

This generally looks good. There are a few issues though. 

> General
> -------
>  
> Ctrl + F   Search
> Ctrl + Q   Quit

The general section is missing F1 for help.

...
> Ctrl + Tab   Switch view

Ctrl + Tab isn't a recognised keyboard shortcut for changing views. My recommendation for this would be to use Ctrl+PgUp and Ctrl+PgDown. This would mimic the way tab switching works, and would therefore be easy to remember.

> Alt + ^       Go to album list

"Go back" would be a better label here, probably.
Comment 14 Daniel Korostil 2015-12-17 11:04:55 UTC
Done. But I'm still not really happy with Ctrl+PgUp and Ctrl+PgDown, Reasoning:
1. Shortcuts are vertical-orientated, view is horizontal-orientated. I'd say that's rather moving between playlists than views.
2. Some apps may use both Sidebar and StackSwitcher, thus we need to make standardized shortcuts for both actions to not differ from app to app.
3. There are very few tabs in StackSwitcher, it makes no sense to use bidirectional shortcuts, one shortcut is pretty enough.

General
-------
 
Ctrl + F                  Search
Ctrl + Q                  Quit
F1                          Show help
Ctrl + ? / Ctrl + F1  Shortcuts
 
Playback
-------
 
Ctrl + Space           Pause/unpause
Ctrl + N / Ctrl + >   Next Song
Ctrl + B / Ctrl + <   Previous song
Ctrl + R                  Toogle Repead mode
Ctrl + S                  Toogle Shuffle mode

Navigation
-------
Ctrl+PgUp      Next view
Ctrl+PgDown  Previous view
Alt + ^           Go back
Comment 15 Allan Day 2015-12-17 16:57:11 UTC
(In reply to Daniel Korostil from comment #14)
> Done. But I'm still not really happy with Ctrl+PgUp and Ctrl+PgDown,

We should maybe leave the shortcut for selecting a view until we've had time to do more research and discussion. The whole thing doesn't need to block on this one shortcut.

> Reasoning:
>
> 1. Shortcuts are vertical-orientated, view is horizontal-orientated. I'd say
> that's rather moving between playlists than views.

Convention trumps logic in these cases. People are used to using PgUp and PgDown for tabs, which are horizontal.

> 2. Some apps may use both Sidebar and StackSwitcher, thus we need to make
> standardized shortcuts for both actions to not differ from app to app.

That is true, although I'm not sure what you'd usually use as a shortcut for changing rows in a sidebar (probably worth investigating).

My greater concern would be what happens when you have tabs and a stack switcher. :)

One possible way to deal with this would be to assign specific shortcuts to views, such as Ctrl+1, Ctrl+2, Ctrl+3, Ctrl+4. We do something similar for tabs.

...
> F1                          Show help

"Help" would be a better label than "Show Help".

...
> Ctrl + R                  Toogle Repead mode

Label should read "Toggle repeat".

> Ctrl + S                  Toogle Shuffle mode
...

Label should read "Toggle shuffle".
Comment 16 Evandro Giovanini 2016-03-22 19:48:47 UTC
Created attachment 324559 [details] [review]
Implement new keyboard shortcuts

This patch implements new keyboard shortcuts for playback:
  Ctrl+N: Next Song
  Ctrl+B: Previous Song
  Ctrl+R: Toggle Repeat
  Ctrl+S: Toggle Shuffle

As well as new shortcuts for navigation: Ctrl+[1-4] switches between
views.
Comment 17 Marinus Schraal 2016-05-16 09:17:01 UTC
Review of attachment 324559 [details] [review]:

In general looks good to me, only doesn't apply to head cleanly. Could you please rebase to head and provide an updated patch?

And could you also update the commit message according to https://wiki.gnome.org/Git/CommitMessages ?
Comment 18 Evandro Giovanini 2016-07-13 17:11:22 UTC
Created attachment 331438 [details] [review]
Implement new keyboard shortcuts

This patch implements new keyboard shortcuts for playback:
  Ctrl+N: Next Song
  Ctrl+B: Previous Song
  Ctrl+R: Toggle Repeat
  Ctrl+S: Toggle Shuffle

As well as new shortcuts for navigation: Ctrl+[1-4] switches between
views.
Comment 19 Marinus Schraal 2016-08-16 13:19:16 UTC
Comment on attachment 331438 [details] [review]
Implement new keyboard shortcuts

Committed with some indent fixes.
Comment 20 Marinus Schraal 2016-08-16 13:20:10 UTC
Thanks all for your effort.

This problem has been fixed in the unstable development version. The fix will be available in the next major software release. You may need to upgrade your Linux distribution to obtain that newer version.