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 373939 - Add support for the MEDIA key
Add support for the MEDIA key
Status: RESOLVED OBSOLETE
Product: gnome-control-center
Classification: Core
Component: [obsolete] Keybinding
2.17.x
Other Linux
: Normal normal
: ---
Assigned To: Control-Center Maintainers
Control-Center Maintainers
Depends on: 362578
Blocks:
 
 
Reported: 2006-11-11 17:34 UTC by Nicolas Mailhot
Modified: 2008-07-24 15:07 UTC
See Also:
GNOME target: ---
GNOME version: ---



Description Nicolas Mailhot 2006-11-11 17:34:31 UTC
The play/pause action in gnome-keybinding-properties should launch the default media player if none is running
Comment 1 Thomas Wood 2007-02-10 18:18:57 UTC
I think this bug would be resolved by bug 114796, where you could assign the play/pause button to a command that would perform the requested action (such as binding to "totem --play" for example). Having a key binding that performs two different operations depending on the current context is likely to be confusing.

*** This bug has been marked as a duplicate of 114796 ***
Comment 2 Nicolas Mailhot 2007-02-11 12:07:30 UTC
I disagree rather strongly.

Special keys are there to work around the GUI menu for people not technical enough to put shortcuts to the relevant programs on their panels or desktops

While bug #114796 is nice for technical users and special uses, forcing the use of the CLI to assign a shortcut to such a common action as play is thoroughly missing the point about special keys (aka multimedia keys, remember) 

Home users use
1. a browser
2. a multimedia player
3. a mail agent (SPAM made webmail a popular choice for lots of people today)

There is really no excuse to have 2. depend on a manually assigned CLI command. 2. is no longer an optional feature nowadays - multimedia graduated to core OS feature a few years ago, users don't want a return to the bad old I'll-install-a-specific-player winamp days.
Comment 3 Thomas Wood 2007-02-11 14:02:21 UTC
I'm still not convinced that using the play/pause action to start a media player isn't confusing. For example, if you have a movie player playing, and wish to pause it, you would not want your preferred media player starting when you pressed your play/pause button on the keyboard.
Comment 4 Bastien Nocera 2007-02-22 01:52:09 UTC
(In reply to comment #3)
> I'm still not convinced that using the play/pause action to start a media
> player isn't confusing. For example, if you have a movie player playing, and
> wish to pause it, you would not want your preferred media player starting when
> you pressed your play/pause button on the keyboard.

With the new code we can actually tell whether a media player is listening or not.
Comment 5 Thomas Wood 2007-02-22 09:27:29 UTC
So wouldn't this be even more confusing? For example, if you had been watching a movie in Totem, and paused it, and then wanted to listen to some music, pressing the play/pause keyboard button would start Totem playing again. The user might have expected that it would have opened their music player based on previous experience when Totem was not open.
Comment 6 Bastien Nocera 2007-02-22 09:43:33 UTC
As I said, we know whether there's a media player listening, so we would only launch the player if there wasn't a player listening for events. But I agree that launching it solely on the basis that play/pause was typed is wrong.
Comment 7 Thomas Wood 2007-02-22 10:11:45 UTC
What I meant was that if the user happened to have another player (e.g. totem) already listening for the event somewhere in the background or minimized, then the user may expect to start their default player by using play/pause. This wouldn't happen and instead the existing player (e.g. totem) would respond to the play/pause.

Nicolas, do you have any comments on these thoughts?
Comment 8 Bastien Nocera 2007-02-22 10:44:56 UTC
Yeah, the behaviour would be a bit too confusing, IMO.
Comment 9 Nicolas Mailhot 2007-02-23 10:16:42 UTC
(In reply to comment #7)

> Nicolas, do you have any comments on these thoughts?

1. play/pause should launch the default multimedia player if none is running (as evidenced by the fact enhanced keyboards do not sport a separate "launch player" button, while they have "launch browser/MUA/calculator" ones

2. default IMHO should be audio, audio+video in audio mode or audio+video in last used mode on last used content (video by itself is bad, remembering the previous state is good)

3. I don't really care if GNOME is smart enough to detect several players or only the default one. Both behaviours are OK, and people relying heavily on the MM buttons will only use one player anyway
Comment 10 Bastien Nocera 2007-02-23 10:53:46 UTC
(In reply to comment #9)
> (In reply to comment #7)
> 
> > Nicolas, do you have any comments on these thoughts?
> 
> 1. play/pause should launch the default multimedia player if none is running
> (as evidenced by the fact enhanced keyboards do not sport a separate "launch
> player" button, while they have "launch browser/MUA/calculator" ones

But it will break older applications that use XF86Play, etc. and don't implement the new D-Bus API.
Comment 11 Nicolas Mailhot 2007-02-24 08:21:57 UTC
(In reply to comment #10)
> (In reply to comment #9)
> > (In reply to comment #7)
> > 
> > > Nicolas, do you have any comments on these thoughts?
> > 
> > 1. play/pause should launch the default multimedia player if none is running
> > (as evidenced by the fact enhanced keyboards do not sport a separate "launch
> > player" button, while they have "launch browser/MUA/calculator" ones
> 
> But it will break older applications that use XF86Play, etc. and don't
> implement the new D-Bus API.

I don't have a magic answer, but it's getting to the point finding a keyboard without a play button is harder than a keyboard with it, and people do expect it to launch a player. Too bad for legacy apps but one can not ignore hardware changes indefinitely.
Comment 12 Thomas Wood 2007-03-22 18:52:25 UTC
I guess if we add a default media player, then this would be the only one the multimedia keys should interact with.
Comment 13 Bastien Nocera 2007-05-31 15:32:28 UTC
(In reply to comment #12)
> I guess if we add a default media player, then this would be the only one the
> multimedia keys should interact with.

No. The code is clever enough to know which is the last used application, so we can juggle with multiple applications (say, a movie and music player) and have the keys work as expected.

(In reply to comment #11)
> (In reply to comment #10)
> > But it will break older applications that use XF86Play, etc. and don't
> > implement the new D-Bus API.
> 
> I don't have a magic answer, but it's getting to the point finding a keyboard
> without a play button is harder than a keyboard with it, and people do expect
> it to launch a player. Too bad for legacy apps but one can not ignore hardware
> changes indefinitely.

My laptop keyboard doesn't have play/pause keys. And my desktop keyboard has a media button to launch the music/movie player.

I can add support for the Media key, I'm not willing to break older applications for the sake of it though, and I won't be making play launch the default media player.
Comment 14 Nicolas Mailhot 2007-06-10 15:43:59 UTC
So your problem is bug 373934, keybindings are mutually exclusive
Comment 15 Bastien Nocera 2008-07-24 15:07:34 UTC
There's already support for the media key, so closing this.