Mac Forums

Mac Forums (http://www.mac-forums.com/forums/)
-   OS X - Operating System (http://www.mac-forums.com/forums/os-x-operating-system/)
-   -   Multimedia Keys Remapping (complicated) (http://www.mac-forums.com/forums/os-x-operating-system/198193-multimedia-keys-remapping-complicated.html)

papalazarou 04-12-2010 12:58 AM

Multimedia Keys Remapping (songbird global keys/griffin powermate)
 
Hi guys,

I have a problem I was really hoping someone would know a quick fix to, or if there was anyone out there that was interested in helping.

Basically, I have a Griffin PowerMate volume control, and I use Songbird, not iTunes. I know this issue would be solved by switching to iTunes, but I actually can't. What I want is for the click on the PowerMate to behave as if I'd clicked the play/pause multimedia key on my MBP.

I have a few avenues I've tried, but have come up against a wall, being limited by my own knowledge. Forgive me if I get some terminology wrong here.

Songbird doesn't have global hotkeys, so I can't map it to that. The Griffin drivers don't allow me to assign it to the multimedia buttons. None of the re-mapping software appears to be able to re-map the multimedia keys, even if they claim they can.

I've tried using AppleScript to send trigger the Songbird play/pause button (spacebar), with this:

Code:

tell application "Songbird" to keystroke " "
But am given this error message;

Code:

error "Songbird got an error: Can’t get keystroke \" \"." number -1728 from keystroke " "
I'm not sure what the issue is, one of you may be able to help there. I've also tried using the Key Code 32, but I can't seem to compile it (I'm guessing my syntax is wrong).

Apart from that here are my current options, and I was wondering if anyone could advise me of a best way to go, or if anyone knows of a solution.

A: Keep trying to get the AS to work (though Songbird has limited AS functionality)
B: Keep trying to figure out a way of mapping the Play / Pause button to another key.
C: Try and modify the mmkeys plugin for Songbird to allow me to re-specifiy the trigger for it's play/pause.

Does anyone have any advice they can give? I know this is a huge one, I also know there are some very clever people on here with wicked powerful OS X voodoo :)

Regards,
K.

Lifeisabeach 04-12-2010 11:08 PM

Grab USB Overdrive. This is a driver that let's you customize input for virtually any USB device. Most helpful for you… the latest version very specifically supports the Powermate. You should be able to map the controls to Songbird's keyboard command equivalents.

©1999-2009 Alessandro Levi Montalcini

papalazarou 04-12-2010 11:12 PM

Thanks, I'm downloading it now.

The problem is Songbird doesn't have any hotkey support, whatsoever. It may be that USB overdrive will need Songbird to have focus.

**EDIT **

Yeah basically, I can't select the multimedia key "Play/Pause" with USB overdrive. I can have it press F8, which is the function key it occupies, but it's the same as pressing F8 without any system function (in other words, triggers spaces).

Lifeisabeach 04-12-2010 11:36 PM

Quote:

Originally Posted by papalazarou (Post 1034771)
Thanks, I'm downloading it now.

The problem is Songbird doesn't have any hotkey support, whatsoever. It may be that USB overdrive will need Songbird to have focus.

**EDIT **

Yeah basically, I can't select the multimedia key "Play/Pause" with USB overdrive. I can have it press F8, which is the function key it occupies, but it's the same as pressing F8 without any system function (in other words, triggers spaces).

I'm fairly certain this will work. Go to System Preferences > Keyboard and click the + button. Select Songbird as the Application, enter the Menu title you want to add a keyboard function for (like Play, for example), then use a keyboard combo not already in use by Songbird. Repeat for each command lacking a keyboard command. Once done, Songbird will have hotkeys (you will even see them in Songbird's menu). Then use USB Overdrive to map the functions of your Powermate to those new hotkeys you made. Be sure you are setting up a Songbird-specific profile, not modifying "Any Mouse, Any Application".

papalazarou 04-13-2010 12:24 AM

Nope, hasn't worked. The keypress maps fine to the Griffin etc, but Songbird doesn't do anything. It flashes the menu though, just doesn't actually play.

Regardless, that's not a global option. What I'm after is a global play/pause.

Are you not able to mimic the multimedia keys with your USB Overdrive app?

The other option is to mimic an apple remote play pause press. Is there any way of doing that?

Lifeisabeach 04-13-2010 07:31 AM

Quote:

Originally Posted by papalazarou (Post 1034802)
Nope, hasn't worked. The keypress maps fine to the Griffin etc, but Songbird doesn't do anything. It flashes the menu though, just doesn't actually play.

Regardless, that's not a global option. What I'm after is a global play/pause.

Are you not able to mimic the multimedia keys with your USB Overdrive app?

The other option is to mimic an apple remote play pause press. Is there any way of doing that?

Hmmm. I'm sure there's a way of making this work. Unfortunately, I don't have one of those controllers to test things out. I'll try to fake it using something else, though it may be the weekend before I can put the time into it.

It would help if you could detail exactly what steps you've tried in configuring USB Overdrive and with the Keyboard Prefs.

Lifeisabeach 04-13-2010 07:36 AM

BTW… try this app to create global hotkeys. Perhaps that will work in conjunction with these other tricks I've brought up.

Lifeisabeach 04-13-2010 11:50 PM

Ok… check this out. There's an extension for Songbird available that will re-map your keyboard to control Songbird in the same manner you can control iTunes. This is a global configuration. So… try that, then you should be able to use your Powermate to mimic those hotkeys. You may or may not have to use USB Overdrive to help with that.
Apple Keyboard Media Key Support - Songbird Add-ons

papalazarou 04-14-2010 06:33 PM

I'll try Global Hotkeys now. I've tried the applekeys addon for Songbird, no go. It allows me to use the multimedia keys, but as I've said, I haven't found a single application that will let me remap those keys to somewhere else, or to my PowerMate. An option would be to modify this addon to listen not for the multimedia keys keystroke, but another. I have no idea how to do this though.

I've pressed the multimedia keys when trying to capture the keystroke in many programs, usually just starts my music without being captured.

In USB overdrive I have the following settings;

Device: Griffin PowerMate @ 0x2642000, Songbird (enabled)
Button 1 is mapped to Shift + Ctrl + P (with the control and shift selections ticked)
(No Key) selected in the dropdown.

In OS X Keyboard settings I have;
Application Shortcuts > Songbird.app > Pause (mapped to Shift + Ctrl + P)

Lifeisabeach 04-15-2010 12:44 AM

After beating my head against a wall… I'm stumped. Basically what I think we need to figure this out is know *exactly* what commands are being sent by the media keys to the OS. It's certainly not simply F8, F9, etc… those get sent by holding down the fn button. I'm assuming it's some sort of script, but what exactly, I haven't figured out yet. If it can be determined what that is, then this will be easy. Otherwise, I think you are handicapped largely by Songbird's own lacking support for Applescript.

papalazarou 04-15-2010 01:22 AM

Yeah that's pretty much where I got to. I was trying to get the source for that AppleKeys Songbird addon, but the site is unresponsive. I figured I might be able to change what the trigger is mapped to, swap it off the play/pause key and onto just a regular keystroke.

I have the equivalent source for the Linux version, called MMkeys. While the map for the multimedia keys for the linux addon would be different, would it be possible to examine how it's triggering Songbird's play/pause, and then simply provide a different trigger, a key that I specify? I'd check it out, but it's C++, and I know none.


All times are GMT -4. The time now is 09:47 AM.

Powered by vBulletin
Copyright ©2000 - 2014, Jelsoft Enterprises Ltd.