UI navigation on Android TV

Hi all

I love the new input system. It’s so much easier and flexible to use than the old system. However I got a problem when I tried my game on Android TV.

I have a menu with some UI buttons, and my remote control can navigate the buttons as it should. But I can not click on a button. The DPAD-Center/Enter button on the remote control has no effect. Is this a bug, or is there something I can do?

If you connect the input debugger to the player (if possible) and open the debugger window for the device, which control gets triggered when you press the button on the remote?

My guess would be that the button simply isn’t accounted for in the default UI bindings for the “Submit” action. IIRC that one only gets bound to the A button on the gamepad. Since “normal” gamepads cannot click the dpad as a whole, my guess is that this button is simply mapped to a gamepad button different from the A button. Adding a binding for this should solve the problem.

Would be curious to know which button it comes out as. Probably something we should account for in the default bindings.

Hi. I don’t know how to use the input debugger, but I tested it using my own code:

-The remote control comes up in the device list as a Keyboard
-When I press the center/submit button, Keyboard.anyKey.isPressed returns true
-However, no individual button is marked as pressed in Keyboard.allKeys[×].isPressed

BUTTON_SELECT seems to be mapped to the keyboard pause key in the backend.

        MAP(AKEYCODE_BUTTON_SELECT, Pause);

Binding submit to the pause key should work.

BTW, recommend filing a ticket with the Unity bug reporter for this one as the submit action here should work out of the box on the platform.

I which file can I change this?

I’ve been trying all sorts of things, but just can’t get the DPAD-CENTER button to work on the TV remote.

It always shows up as Keyboard/Any key. Is there any way I can find the exact bit that is set?

I added a custom device in the new input system, tried all sorts of bits (including the pause key) - none of them worked.

Is there any way to make this work?

is there any update?
I am facing issue in unity ui button and input field are hover but not able to click using d-pad center (select/enter/ok) button in Android TV remote.

There’s a bug in the issue tracker: Unity Issue Tracker - [Input System] Unity does not register Amazon Fire TV remote's D-Pad center button press

1 Like