Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

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?

like image 663
Grumdrig Avatar asked Jan 11 '16 06:01

Grumdrig


People also ask

What is the Home button on the Siri Remote?

Pressing the TV button once on your Siri Remote takes you to Up Next in the Apple TV App, and pressing the TV button again takes you to the Home Screen. You can change this setting so that pressing the TV button once takes you directly to the Home Screen.

Why is the volume button not working on my Apple Remote?

To fix Apple TV remote volume not working, try moving the remote closer to the Apple TV and check the remote batteries' level and condition. Additionally, ensure that the HDMI-CEC has been enabled and that the remote is programmed to volume.


1 Answers

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.

like image 74
Vel Genov Avatar answered Sep 28 '22 02:09

Vel Genov