gmusicbrowser Forum

Main board => Questions => Topic started by: pat3tiq on February 13, 2012, 19:21:29

Title: Multimedia Keys
Post by: pat3tiq on February 13, 2012, 19:21:29
Forgive me for restarting this topic - it is marked [SOLVED]

I have read over and over the threads related to multimedia keys control in Gmusicbrowser and I could not comprehend the conversation.

Now my multimedia keys work flawlessly.
Simple instructions for others as technically challenged as me:
Using Gmusicbrowser 1.1.9 (I have no idea if this works with other versions)

1. Go to Settings
2. Click on the <Keys> tab
3. At the bottom of the dialogs are 3 fields (Key, Command, Arguments)
   Position the cursor in the <Key> field.
4. Press the multimedia key to map (ex: Play/Pause)
5. The text in the <Key> field now displays: XF86AudioPlay.
6. Click on the <Command> drop down list and select <Play/Pause>
7. The <Add shortcut key> button below will become enabled
8. Click on it to add the keys to the list of keys above.

Repeat for all the keys to map.
Close and restart Gmusicbrowser and presto bravo you have multimedia keys configured.

Enjoy.

Sony Vaio VPCF234FDS
Linux Mint 12 - KDE
Title: Re: Multimedia Keys
Post by: Quentin Sculo on February 13, 2012, 20:53:49
This will only work when gmusicbrowser's window has the keyboard focus.
To make them work all the time, it is more complicated, because you have to ask the desktop/window manager to intercept these keys and do something rather than sending them to the gui software that currently have the focus.
So you have to configure the desktop/window manager you are using, which of course depends on which one is it.
For gnome you have to configure the media keys in settings->keyboard->shortcut and then simply activate the gmb plugin "gnome mmkeys".
For others you have to find where to configure this, and associate your media keys with commands such as "gmusicbrowser -cmd PlayPause".
Title: Re: Multimedia Keys
Post by: pat3tiq on February 14, 2012, 02:49:18
Thanks for the suggestion.

As of now, I have not the foggiest how to accomplish this in KDE.
I'll keep looking though.

tks.
Title: Re: Multimedia Keys
Post by: pat3tiq on February 20, 2012, 13:11:53
The KDE version:

System Settings -> Shortcuts and Gestures -> Custom Shortcuts. Click on Edit -> New -> Global Shortcut -> Command/URL and enter the shortcut under the Trigger tab. You'll (most likely) see a dialog warning that the key already is assigned to a global shortcut, choose Reassign. Finally write the command you want to run under Action.

dbus-send --dest=org.gmusicbrowser /org/gmusicbrowser org.gmusicbrowser.RunCommand string:PlayPause

Repeat for the other keys.