Xfce Forum

Sub domains
 

You are not logged in.

#1 2013-07-07 12:18:33

sguazt
Member
Registered: 2013-07-07
Posts: 5

How to make the XF86AudioPlay button an omni-play button?

Hello,

I'm using XFCE 4.10.1 on Fedora 19 x86_64.
I'd like to create a keyboard shortcut so that when I press the XF86AudioPlay button the audio player that is currently running starts (or stops) to play.

This is the default behavior I can find in GNOME, without the need to create any specific keyboard shortcut.
Under GNOME, I tried with different players, for instance:
- radiotray
- audacious
- rhythmbox
and in all cases it works like a charm.

In XFCE, the XF86AudioPlay is mapped by default to the "pragha" application (which is not installed on my system).

I know I can map this button to a specific player, but is it possible to mimic the GNOME's behavior?


Thank you for your help,

-- Marco

Offline

#2 2013-07-09 16:57:23

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: How to make the XF86AudioPlay button an omni-play button?

Are you saying that when you run radiotray, audacious or rhythmbox under Xfce instead of Gnome (same computer, same distribution, same user), the play/pause key doesn’t work?

AFAIK it’s up to each audio application to react (or not) to the press of this key, so it should work the same under Xfce and Gnome.

Offline

#3 2013-07-09 20:10:46

sguazt
Member
Registered: 2013-07-07
Posts: 5

Re: How to make the XF86AudioPlay button an omni-play button?

No, I'm just saying that currently in XFCE (at least the one shipped with Fedora 19) the XF86AudioPlay is bound to the pragha player
Command: pragha --pause
Shortcut: XF86AudioPlay

I can rebind it to one of my favourite players (one among radiotray, audacious and rhythmbox), but to all of them.

Instead, in GNOME, without making and keyboard binding, I am able to start any of the above players and to have the XF86AudioPlay automa(t|g)ically working.

I admit I don't know how can be obtained, but it's very cool! wink

-- Marco

Offline

#4 2013-07-09 22:12:15

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: How to make the XF86AudioPlay button an omni-play button?

Just delete the annoying shortcut then. (And no this is not caused by Xfce itself; this is the first time I hear about this pragha thing.)

Offline

#5 2013-07-10 07:15:22

sguazt
Member
Registered: 2013-07-07
Posts: 5

Re: How to make the XF86AudioPlay button an omni-play button?

Hi

I've just removed the binding, then I rebooted my system.
Now, if I start either radiotray or audacious and I press XF86AudioPlay the player does not start to play.
Instead, with rhythmbox it seems to work

What is your experience?

Thanks!

-- Marco

Offline

#6 2013-07-10 13:53:18

stqn
Member
Registered: 2010-10-11
Posts: 174

Re: How to make the XF86AudioPlay button an omni-play button?

I don’t use radiotray, audacious or rhythmbox, but Clementine reacts to XF86AudioPlay out of the box, and deadbeef can be configured to do so (I just tried it.)

Offline

#7 2013-07-10 14:04:00

sguazt
Member
Registered: 2013-07-07
Posts: 5

Re: How to make the XF86AudioPlay button an omni-play button?

Indeed, audacious can be configured as well by enabling the Global Hotkey plugin. I didn't know about that, just found now.

For what concerns radiotray, I have enabled two plugins "Mate Media Keys" and "GNOME Media Keys" but does not work.
I'll investigate about it...

Thank you for the hint.

-- Marco

Offline

#8 2015-11-22 18:05:50

konstan_ty
Member
Registered: 2015-11-22
Posts: 1

Re: How to make the XF86AudioPlay button an omni-play button?

Try this - https://help.ubuntu.com/community/XfceMultimediaKeys
it works fine for me on XUbuntu 14.04.1 + xfce 4.10

Offline

#9 2015-11-22 23:06:05

MountainDewManiac
Member
From: Where Mr. Bankruptcy is Prez
Registered: 2013-03-24
Posts: 1,115

Re: How to make the XF86AudioPlay button an omni-play button?

Two years, four months, and some-odd days - is that a forum record, lol?

Laughing,
MDM


Mountain Dew Maniac

How to Ask for Help <=== Click on this link

Offline

#10 2015-12-04 12:10:26

sguazt
Member
Registered: 2013-07-07
Posts: 5

Re: How to make the XF86AudioPlay button an omni-play button?

konstan_ty wrote:

Try this - https://help.ubuntu.com/community/XfceMultimediaKeys
it works fine for me on XUbuntu 14.04.1 + xfce 4.10

Thanks for the reply.
On my system (which is now  Fedora 23 with XFCE 4.12) xev doesn't work as described in the link you posted (e.g., it doesn't print any keycode when I press the volume button).
Anyway, the solution proposed in the above link is not what I meant.
Indeed, this simply creates a mapping between a key and command.
For instance, you map the "play" button to start/stop the audacious music player

Instead, what happens in GNOME is that the audio buttons (volume up & down, mute and play) work with any player without telling to GNOME any command
In GNOME,
- If I start radiotray, the "play" button automatically works with it
- If I start audacious, the "play" button automatically works with this player,
- and so on...

My current solution is to use xfce4-volumed for the volume keys, and give up with the play button

Cheers,

Marco

Last edited by sguazt (2015-12-04 12:10:51)

Offline

#11 2017-10-25 23:42:32

mel00010
Member
Registered: 2017-10-25
Posts: 1

Re: How to make the XF86AudioPlay button an omni-play button?

The lack of an omni-play button annoyed me enough to write a python script to solve this problem.  It uses the MPRIS2 DBus API to control media players, so it should work on all of the major media players.  I put it up on Github.  Here is the link: https://github.com/mel00010/OmniPause

Offline

Board footer

Powered by FluxBB