Media keys support please:D:D:D

Discuss Decibel, a high quality audio player.
Post Reply
Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Media keys support please:D:D:D

Post by Dexter12345 » Tue Nov 01, 2011 10:46 pm

Hey!

I really want Media keys support for Decibel and I think many many users are crawing it!

Now the Media keys only work when you have Decibel selected as your current program. Would be awesome if you guys could add support for when you are using other programs as well!

Thanks!

Great player otherwise, super:D

sbeav
Posts: 2
Joined: Thu Mar 08, 2012 8:16 am

Re: Media keys support please:D:D:D

Post by sbeav » Thu Mar 08, 2012 9:29 am

I found a work around to get my media keys (F7-F9) to control Decibel globally.

Decibel 1.2.6 (26)
Snow Leapoard 10.6.8

First stop iTunes from opening when you hit "Play/Pause" using this hack to the rcd process:

http://www.thebitguru.com/projects/iTunesPatch

Then use Function Flip to make F7-F9 scriptable:

http://kevingessner.com/software/functionflip/

This part was the trickiest, I used Global Hotkey to map F7-F9 and make them global.

http://www.monkeybreadsoftware.de/Softw ... tkey.shtml

I had to move the contents of the Global Hotkeys .dmg into a new location so i could edit. In the "Apple Scripts" folder create three text files simply named "F7", "F8" and "F9", with no extension.

In each file use Apple Scripts to command Decibel.

for "F7":
  • tell application "Decibel"
    • playPreviousTrack
    end tell
for "F8":
  • tell application "Decibel"
    • playPause
    end tell
for "F9":
  • tell application "Decibel"
    • playNextTrack
    end tell
That should work!

*** Make sure you add Global Hotkey to your startup apps list, and check "Start FunctionFlip at Login" in FunctionFlip's settings.

-Colin

Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Re: Media keys support please:D:D:D

Post by Dexter12345 » Fri Mar 09, 2012 11:25 pm

Thanks you so much:D:D:D I will check ths out!

Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Re: Media keys support please:D:D:D

Post by Dexter12345 » Sun Mar 11, 2012 12:23 am

I can't get this to work. I have done everything you said in the description. I'm running Max Os X Lion. Maye that's the problem?

When I press F7 and F8 nothing is happening and when I press F9 Expose is going on:P

Would be very glad for some help with this!

Thanks!

Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Re: Media keys support please:D:D:D

Post by Dexter12345 » Sun Mar 11, 2012 12:41 am

It's Working:D yeaa! I just had to save the text files as plain text not the normal text format created by Mac. Thank you so so much:D

sbeav
Posts: 2
Joined: Thu Mar 08, 2012 8:16 am

Re: Media keys support please:D:D:D

Post by sbeav » Thu Jun 21, 2012 6:17 am

Also, I've expanded the Forward/Back keys (F7/F9) so they seek forward and back when you hold them. Extra Suites (from http://www.kanzu.com) is required to capture the held key. It is free but unfortunately it has an annoying banner that appears when you use it. Oddly you can use itself to get rid of the banner (see code below).

Use this script in the "F7" file in the Apple Scripts folder:

Code: Select all

delay 0.1

on keyPressed()
	tell application "Extra Suites"
		if (ES keys down) = {""} then
			return "True"
		else
			return "False"
		end if
	end tell
end keyPressed

if keyPressed() = "True" then
	repeat
		tell application "Decibel" to seekBackward
		if keyPressed() = "False" then exit repeat
		delay 0.1
	end repeat
else
	tell application "Decibel" to playPreviousTrack
end if

--Get Rid of Stupid ES Banner
tell application "Extra Suites"
	local mouseLoc
	set mouseLoc to ES mouse location
	ES move mouse {23, 685}
	ES click mouse
	ES move mouse mouseLoc
end tell
Use the same code for F9, just change seekBackward->seekForward and playPrevious->playNext.

Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Re: Media keys support please:D:D:D

Post by Dexter12345 » Thu Jun 21, 2012 12:46 pm

Nice:D I will try it^^

Dexter12345
Posts: 22
Joined: Mon Oct 31, 2011 10:07 pm

Re: Media keys support please:D:D:D

Post by Dexter12345 » Tue Sep 04, 2012 10:57 pm

Hey again! I just erased my computer and installing everything again. I can't get the media keys to work like you showed me:S

Where I'm I supose to copy all the files in the global hotkey dmg?

And should i just make a text file with the scripts you wrote? What fileformat should I save them in?

Please get back to me, I really want this to work. It kina sucks, becuse I got them to work before:P

Thanks again for all your help!

wiger123
Posts: 2
Joined: Mon Oct 08, 2012 8:13 am

Re: Media keys support please:D:D:D

Post by wiger123 » Mon Oct 08, 2012 8:17 am

Yesterday I noticed that the Decibel icon in my dock (MacMini) has a ? on it and I cannot open the program. Not sure what has happened. I also could not find the program in my Applications folder. Is there a way to re-download the program?
wiger

Post Reply