Hacker News new | ask | show | jobs
by signed0 4749 days ago
My main issue with Radium is that it does not support the play/pause/fast-forward/rewind keys on my MacBook. Does Radio support these?
2 comments

It does not at the moment. And not from the want of trying! Unfortunately the App Store sandbox does not yet allow you to detect the media keys being pressed. The old way of doing it uses a very low-level function that is not available for security reasons (its essentially a key logger) within the sandbox..

Its common problem across all App Store apps, for now. Drives me crazy as well!

That's a shame. Perhaps someone needs to build a small library that exists outside of the App Store that notifies App Store apps when those keys are pressed. :P

This reason alone is what keeps me using VLC for radio playlists.

This seems like a great idea. Build some sort of universal bridge for media keys that any compatible app can hook into? Or would the OS X sandbox prevent that, too?
It is a great idea and should be possible so long as Apple is willing to approve an sandboxed app that accepts incoming connections (listens) on a port against the local interface.
The bridge could be the listener, and the sandboxed apps could open a connection to it. This is probably preferable design anyway.

The apps should request subscription to a set of keypress events, the bridge should get approval from the user (maybe only if the app requests keys other than F keys and media keys?). The bridge should be discoverable by local bonjour rather than running on a known port.

I asked this question of the radium devs. I was told that its an App Store limitation. Apple will not approve third party apps that use the media keys.
Not only not approve, it physically won't work. The sandbox enforced partially at a kernel level will prevent the necessary low-level functions from working.
Interesting use of "physically".