Bug 107053 - (non-global) shortcuts for "remove from playlist" and "play", "play/pause" and "stop" functions
Summary: (non-global) shortcuts for "remove from playlist" and "play", "play/pause" an...
Status: RESOLVED FIXED
Alias: None
Product: amarok
Classification: Applications
Component: Playlist (show other bugs)
Version: 1.2.4
Platform: Debian testing Linux
: NOR wishlist
Target Milestone: ---
Assignee: Amarok Developers
URL:
Keywords:
: 107630 124314 (view as bug list)
Depends on:
Blocks:
 
Reported: 2005-06-08 18:43 UTC by Andras Georgy Bekes
Modified: 2007-11-14 23:52 UTC (History)
3 users (show)

See Also:
Latest Commit:
Version Fixed In:


Attachments

Note You need to log in before you can comment on or make changes to this bug.
Description Andras Georgy Bekes 2005-06-08 18:43:31 UTC
Version:           1.2.4 (using KDE KDE 3.4.0)
Installed from:    Debian testing/unstable Packages

I'm missing the delete key for "remove from playlist" function. Global shortcuts for "play", "play/pause" and "stop" functions might be useful for some, but I'd like to have these as local shortcuts.
Comment 1 Seb Ruiz 2005-06-09 02:36:48 UTC
On Thu, 9 Jun 2005 02:43 am, Andras Georgy Bekes wrote:
> I'm missing the delete key for "remove from playlist" function. Global
> shortcuts for "play", "play/pause" and "stop" functions might be useful for
> some, but I'd like to have these as local shortcuts.


Erm, what about pressing the delete key when you have the playlist focused?  
NB: the file browser catches this, so it wont work, but will for any other 
tab open.
Comment 2 Andras Georgy Bekes 2005-06-09 13:58:03 UTC
On Thursday 09 June 2005 02:36, Seb Ruiz wrote:
> Erm, what about pressing the delete key when you have the playlist
> focused?   NB: the file browser catches this, so it wont work, but
> will for any other tab open.

This is true, but I cannot accept this as a solution. I'm refining my wish: I'd like to have a single key shortcut for "remove from playlist" which works also when the file browser tab is active. I'd accept any key, not just delete, that's why I think that defining a local shortcut for "remove from playlist" would be great.

I'm refining my other wish as well: I'd like to use the space button for "play/pause", but space is obviously mindless as global shortcut.
Comment 3 Seb Ruiz 2005-06-09 14:46:21 UTC
On Thu, 9 Jun 2005 09:58 pm, Andras Georgy Bekes wrote:
> This is true, but I cannot accept this as a solution. I'm refining my wish:
> I'd like to have a single key shortcut for "remove from playlist" which
> works also when the file browser tab is active. I'd accept any key, not
> just delete, that's why I think that defining a local shortcut for "remove
> from playlist" would be great.

The delete key is a local shortcut, and its problem with the file browser is a 
bug which already has a bug report open.

> I'm refining my other wish as well: I'd like to use the space button for
> "play/pause", but space is obviously mindless as global shortcut.

You can edit the toolbar to have a Play/Pause button already!
Comment 4 Mark Kretschmann 2005-06-09 15:13:12 UTC
The whole report seems pointless to me. We won't have both global and local shortcuts for the same function.
Comment 5 Andras Georgy Bekes 2005-06-09 15:13:54 UTC
> The delete key is a local shortcut, and its problem with the file
> browser is a bug which already has a bug report open.

What if I want to change it?
I haven't considered the delete key a local shortcut as I cannot find it 
in the "Configure Shortcuts" dialog box.

If it is considered a local shortcut, then I refine my wish:
I'd like to change the shortcut key for "remove from playlist" in the 
"Configure Shortcuts" dialog box (which would actually solve its problem 
with the file browser).

> You can edit the toolbar to have a Play/Pause button already!

Having a play/pause button is nice, but as I said I'd like to have a 
(configurable) play/pause shortcut key.
Comment 6 Andras Georgy Bekes 2005-06-09 15:42:33 UTC
On Thursday 09 June 2005 15:13, Mark Kretschmann wrote:
> The whole report seems pointless to me. We won't have both global and
> local shortcuts for the same function.

So we can't have simple shortcut keys (like space) for some functions (like play/pause), only complicated ones (like Ctrl/Shift/Meta/Alt+Something) because you think it is bad to have both global and local shortcuts for the same function?
Comment 7 Mark Kretschmann 2005-06-09 15:58:34 UTC
Sorry, you seem to misunderstand. I've closed the report. You're not supposed to reopen it.

We can still continue to discuss on the closed report.
Comment 8 Andras Georgy Bekes 2005-06-14 12:08:34 UTC
> We can still continue to discuss on the closed report. 

Fine. Could you please explain the real reason why "We won't have both global and local shortcuts for the same function."?
Comment 9 Mark Kretschmann 2005-06-14 13:37:27 UTC
On Tuesday 14 June 2005 12:08, Andras Georgy Bekes wrote:
> > We can still continue to discuss on the closed report.
>
> Fine. Could you please explain the real reason why "We won't have both
> global and local shortcuts for the same function."?


Well, what is the point? In my view local shortcuts are a subset of global 
shortcuts. I.e. a global shortcut offers all functionality of a local one, 
but it will even work if the application does not have focus. You can assign 
any keyboard sequence to it.

So why have both? This would only confuse the user, and add no real value.
Comment 10 Andras Georgy Bekes 2005-06-14 16:59:07 UTC
> Well, what is the point? In my view local shortcuts are a subset of
> global shortcuts. I.e. a global shortcut offers all functionality of
> a local one, but it will even work if the application does not have
> focus.


> You can assign any keyboard sequence to it. 

Now this is not true.

I'm explaining it again.
For global shortcuts you must choose a key which you don't use in any 
other application. As I said I'd like to use simple keys (like a single 
space) for some functions. I cannot set such simple keys as a global 
shortcuts, as I obviously want to use them in other apps.

Got it?
Comment 11 Mark Kretschmann 2005-06-14 17:20:38 UTC
On Tuesday 14 June 2005 16:59, Andras Georgy Bekes wrote:
> I'm explaining it again.
> For global shortcuts you must choose a key which you don't use in any
> other application. As I said I'd like to use simple keys (like a single
> space) for some functions. I cannot set such simple keys as a global
> shortcuts, as I obviously want to use them in other apps.


Ok, point taken. I agree this makes sense for certain shortcuts.
Comment 12 Mark Kretschmann 2005-06-14 17:22:03 UTC
reopen
Comment 13 Alexandre Oliveira 2005-06-17 21:21:30 UTC
*** Bug 107630 has been marked as a duplicate of this bug. ***
Comment 14 Jasmin Buchert 2005-12-28 16:07:25 UTC
I really would like to see (additional to the global ones) local shortcuts like in other players.
This is the most lacking feature perventing me from using Amarok. Global Shortcuts are cool, but if Amarok is open and your active window, you'll want to have quicker shortcuts like for example b for back and f for forward etc...
Comment 15 Iñaki Baz Castillo 2006-01-15 14:24:14 UTC
I agree with this point of view. In fact, I think there should be too local shortcuts for "Forward" and "Rewind" actions.

I've configured those global shortcuts:
  Ctrl + Shift + >   : Forward
  Ctrl + Shift + <   : Rewind

But I'd like to forward and rewind the playing song just pressing "right/left" keys when I'm in local mode, this is, amaroK (player or playlist) has the focus.
Comment 16 Miles Barr 2006-01-30 20:23:37 UTC
Is there any chance of this feature getting implemented? I'd really like local shortcuts for play/pause, forward and rewind.

If someone could point me in the right direction I'd be happy to give it a go. I've found where the global shortcuts are declared in app.cpp but can't find where the local ones are because it refers to amaroK::actionCollection(). At a guess I'd say they're declared in playlistwindow.cpp, but since I'm not familiar with KDE programming I don't know what parts correspond to getting an entry in 'Configure Shortcuts'.
Comment 17 Mark Kretschmann 2006-12-16 12:18:55 UTC
*** Bug 124314 has been marked as a duplicate of this bug. ***
Comment 18 Mark Kretschmann 2006-12-16 15:39:17 UTC
SVN commit 614153 by markey:

Add local shortcut for Play/Pause. I've set the default to the space key, as I find that really handy in Codeine.

CCBUG: 107053


 M  +2 -0      playlist.cpp  
 M  +8 -6      playlistwindow.cpp  


--- trunk/extragear/multimedia/amarok/src/playlist.cpp #614152:614153
@@ -325,9 +325,11 @@
 
     { // KAction idiocy -- shortcuts don't work until they've been plugged into a menu
         KPopupMenu asdf;
+
         copy->plug( &asdf );
         stopafter->plug( &asdf );
         gotoCurrent->plug( &asdf );
+
         copy->unplug( &asdf );
         stopafter->unplug( &asdf );
         gotoCurrent->unplug( &asdf );
--- trunk/extragear/multimedia/amarok/src/playlistwindow.cpp #614152:614153
@@ -145,12 +145,12 @@
     actionCollection()->action("playlist_burn")->setEnabled( K3bExporter::isAvailable() );
     new KAction( i18n("Play Media..."), Amarok::icon( "files" ), 0, this, SLOT(slotPlayMedia()), ac, "playlist_playmedia" );
     new KAction( i18n("Play Audio CD"), Amarok::icon( "album" ), 0, this, SLOT(playAudioCD()), ac, "play_audiocd" );
+    KAction *playPause = new KAction( i18n( "&Play/Pause" ), Amarok::icon( "play" ), Key_Space, ec, SLOT( playPause() ), ac, "play_pause" );
     new KAction( i18n("Script Manager"), Amarok::icon( "scripts" ), 0, this, SLOT(showScriptSelector()), ac, "script_manager" );
     new KAction( i18n("Queue Manager"), Amarok::icon( "queue" ), 0, this, SLOT(showQueueManager()), ac, "queue_manager" );
     new KAction( i18n("Statistics"), Amarok::icon( "info" ), 0, this, SLOT(showStatistics()), ac, "statistics" );
     new KAction( i18n("Update Collection"), Amarok::icon( "refresh" ), 0, CollectionDB::instance(), SLOT( scanModifiedDirs() ), actionCollection(), "update_collection" );
 
-
     m_lastfmTags << "Alternative" << "Ambient" << "Chill Out" << "Classical" << "Dance"
                  << "Electronica" << "Favorites" << "Heavy Metal" << "Hip Hop" << "Indie Rock"
                  << "Industrial" << "Japanese" << "Pop" << "Psytrance" << "Rap" << "Rock"
@@ -191,12 +191,14 @@
     new KAction( i18n( "Pause" ), Amarok::icon( "pause" ), 0, ec, SLOT( pause() ), ac, "pause" );
     new KAction( i18n( "Next Track" ), Amarok::icon( "next" ), 0, ec, SLOT( next() ), ac, "next" );
 
-    {
-        KAction *gah = new KAction( i18n( "Toggle Focus" ), "reload", CTRL+Key_Tab,
-            this, SLOT( slotToggleFocus() ), ac, "toggle_focus" );
+    KAction *toggleFocus = new KAction( i18n( "Toggle Focus" ), "reload", CTRL+Key_Tab, this, SLOT( slotToggleFocus() ), ac, "toggle_focus" );
+
+    { // KAction idiocy -- shortcuts don't work until they've been plugged into a menu
         KPopupMenu asdf;
-        gah->plug( &asdf );
-        gah->unplug( &asdf );
+        playPause->plug( &asdf );
+        toggleFocus->plug( &asdf );
+        playPause->unplug( &asdf );
+        toggleFocus->unplug( &asdf );
     }
 
     new Amarok::MenuAction( ac );
Comment 19 Mark Kretschmann 2006-12-17 09:44:55 UTC
SVN commit 614298 by markey:

Cursor left/right now seeks forward/backward.

CCBUG: 107053


 M  +2 -1      ChangeLog  
 M  +10 -0     src/playlistwindow.cpp  


--- trunk/extragear/multimedia/amarok/ChangeLog #614297:614298
@@ -5,7 +5,8 @@
 
 VERSION 1.4.5
   FEATURES:
-    * Space key is now a shortcut for Play/Pause.
+    * Improved keyboard navigation: Space key is now a shortcut for Play/Pause,
+      and cursor left/right seeks forward/backward.
     * Cover images are shown in collection browser. Patch by Trever Fischer
       <wm161@wm161.net>. (BR 91044)
     * Send cover art to MTP media devices if they support it.
--- trunk/extragear/multimedia/amarok/src/playlistwindow.cpp #614297:614298
@@ -148,6 +148,8 @@
     KAction *playPause = new KAction( i18n( "&Play/Pause" ), Amarok::icon( "play" ), Key_Space, ec, SLOT( playPause() ), ac, "play_pause" );
     new KAction( i18n("Script Manager"), Amarok::icon( "scripts" ), 0, this, SLOT(showScriptSelector()), ac, "script_manager" );
     new KAction( i18n("Queue Manager"), Amarok::icon( "queue" ), 0, this, SLOT(showQueueManager()), ac, "queue_manager" );
+    KAction *seekForward = new KAction( i18n( "&Seek Forward" ), Amarok::icon( "fastforward" ), Key_Right, ec, SLOT( seekForward() ), ac, "seek_forward" );
+    KAction *seekBackward = new KAction( i18n( "&Seek Backward" ), Amarok::icon( "rewind" ), Key_Left, ec, SLOT( seekBackward() ), ac, "seek_backward" );
     new KAction( i18n("Statistics"), Amarok::icon( "info" ), 0, this, SLOT(showStatistics()), ac, "statistics" );
     new KAction( i18n("Update Collection"), Amarok::icon( "refresh" ), 0, CollectionDB::instance(), SLOT( scanModifiedDirs() ), actionCollection(), "update_collection" );
 
@@ -193,14 +195,22 @@
 
     KAction *toggleFocus = new KAction( i18n( "Toggle Focus" ), "reload", CTRL+Key_Tab, this, SLOT( slotToggleFocus() ), ac, "toggle_focus" );
 
+
     { // KAction idiocy -- shortcuts don't work until they've been plugged into a menu
         KPopupMenu asdf;
+
         playPause->plug( &asdf );
+        seekForward->plug( &asdf );
+        seekBackward->plug( &asdf );
         toggleFocus->plug( &asdf );
+
         playPause->unplug( &asdf );
+        seekForward->unplug( &asdf );
+        seekBackward->unplug( &asdf );
         toggleFocus->unplug( &asdf );
     }
 
+
     new Amarok::MenuAction( ac );
     new Amarok::StopAction( ac );
     new Amarok::PlayPauseAction( ac );
Comment 20 Dan Meltzer 2007-11-14 23:52:24 UTC
Looks like this was fixed.