viability of implementing global shortcuts via KDED and DBus

Andreas Hartmetz ahartmetz at gmail.com
Fri May 11 14:50:05 BST 2007


On Friday 11 May 2007 12:09:15 Thiago Macieira wrote:
> Lubos Lunak said:
> >  Arguably. If I have both KSCD and Amarok and they both have 'Next track'
> > global shortcut, should I really be prevented from using the same
> > shortcut?
> > Not that I really know the right answer.
>
Hey, I didn't think of that. My feeling is that this can get ugly though, for 
example because "next track" can actually start the music in some players 
that are not playing. And what about volume setting, equalizers etc...?
I'm 75% sure that most people use only one application for any given task. 
If in doubt, I want to keep it simple.
IMO the (user advantage / library messyness) ratio would not be worth it.

> From the user's point of view, I think the global shortcut superposition
> should be allowed and, not only that, it should work even if both
> applications are running.
>
> That is, if you press the "Next track" shortcut, the one application that
> is actually playing any music.
>
> It's no different than the proposed "media player manager" idea. If you
> have an applet on your Plasma that skips forward or backward in the media
> player, which media player should it access?
>
If and when we have defined semantics for classes of applications, shortcuts 
for abstract actions will become natural. In the case of a media player 
manager it's dead easy: The manager has the global shortcuts and communicates 
with any  player, problem solved (from my KGlobalAccel perspective).

I would really like to see this kind of high level integration.

> It's possible to use the D-Bus connection name structure for this task. If
> there's interest, I can show some proof-of-concept code.

If this would still be needed when a generic e.g. media player manager is 
availabe, yes please. But only if it doesn't take you too much time.
I might ask you some DBus questions in the future >:}




More information about the kde-core-devel mailing list