tvosgamepadsiri-remote

Detect volume and home button presses on the Siri Remote


It's relatively straightforward to detect some button presses on the tvOS Siri Remote: the pause/play button, the touchpad area, and with marginally more effort, the MENU button. But there seems to be no way detect or override the function of the + and - buttons, or the Siri or home buttons.

Or is there?


Solution

  • Currently the + and - (volume) buttons on the Siri remote are accessed through private functions. These can't be overwritten or detected, as they have a reserved function. The same goes for the home button.

    There are a couple of points that support this claim. First, as the OP noted, there are no events that detect any actions related to the volume buttons. They don't trigger the pressesBegan or similar events either.

    Another good place to look for more options with the remote/controller is GCGameController. It looks like it has functionality related to all, but the volume buttons, which are reserved. Take a look at the Using the Apple TV Remote as a Game Controller section here. It mentions all of the buttons on the remote that can be used in a CGGameController.

    As I mention in my other posts, this is a fairly new OS and not everything is available yet. You can always file a bug report with Apple and request certain API to be made public.