Extending the Apple Remote to non-Plex Apps

Is there a way to change the mapping of the Apple Remote so that when Plex is not running, the directional buttons and play/pause will work? I love being able to call Plex via the menu button at any time, but I would appreciate being able to control VLC/iTunes/etc when not using Plex without turning off the Remote Helper.



I recently looked at the config file for the remote mappings and noticed the “Home” section only mapped the menu button. Does Home refer to the main home screen of Plex (when it’s running) or “home” as in your desktop? I would think it would be easy to do some kind of SendKeys equivalent to pass the unmapped remote keystrokes to the next event handler in line (VLC/iTunes/etc).



Any help would be greatly appreciated.

Mira does this. I haven’t tested it but there’s a free trial download.

Thanks, but I don’t think I made myself perfectly clear. I am just looking for a way to have the Plex RemoteHelper pass off the commands when they don’t apply.



For example, Plex is not running, but the remote helper is “Always Running.” I am watching a random video in VLC and want to pause it. When I push the play/pause button on my remote, Plex’s remote helper intercepts the event and ignores it because Play/Pause does not do anything if Plex is not currently running (it only looks for Menu in order to activate Plex). If I disable the remote helper in the Plex settings, VLC has no problem understanding the remote control so I don’t need some bloated software solution to change the keystrokes.



Does that make sense?



Thanks.

Have you disabled Settings > System > Input Devices > Always Running?

No. That’s the point. I like being able to start Plex via the menu button on my remote at any time. It is simply a matter of having the remote helper call the next even handler in line.



The following is some sample code that I wrote years ago in C#. I just want the Plex remote handler to ignore the commands it doesn’t process and let the Mac OS/kernal/whatever process them as usual (as IF it were off).



[codebox]

public class StatManager : System.Windows.Forms.Form, IMessageFilter //extends IMessageFilter

{ …

public bool PreFilterMessage(ref Message m)

{

Keys keyCode = (Keys)(int)m.WParam & Keys.KeyCode;

//Look ignore all key sequences until CardReader sends a semicolon

// indicating the start of the ID number

if (keyCode == System.Windows.Forms.Keys.OemSemicolon)

{



return true; //Key command intercepted.

}

else

{

return false;

//Key passed to general interface handler (Windows)

}

}

}[/codebox]



Unfortunately I don't think it's that simple - receiving events from the Apple Remote is an all-or-nothing option. We can't selectively ignore certain button presses. They'd have to be interpreted then passed on to other applications if required.

Give Remote Buddy a look. It does exactly what you are looking for.



I have it setup so that when I hold menu down it will launch Plex. When Plex is hidden, minimized or closed you can launch other apps and control them with Remote Buddy.

Unless Jam or one of the other devs wants to take a crack at passthrough you’ll need an application that knows which app is frontmost and sends signals accordingly.



Mira is one option, Remote Buddy is another. I don’t know how many keyboard shortcut oriented apps can handle remotes.



Have a look at IRControl. The price is right.

Thank you for all your help. I will look into different solutions.



At the moment, I am just sucking it up and have the “Always running” option off. I have to manually start Plex, but at least the remote still works while Plex is running.



I would suggest looking into SofaControl as well. It's price is great and will let you control all your apps through your apple remote, including Plex.

Cheers,

Amadawn

This topic was automatically closed 90 days after the last reply. New replies are no longer allowed.