Input System Issues with Amazon Fire Tv Controller. [Solved]

Hello I was working on joystick support for Amazon Fire TV devices.

Just go to final post I wrote a solution

Input System I have issues.
When I try to use Input System I can only get this
Input Values
The previous Input Manager can Handle more Inputs. But I cannot figure out how to enable all the previous supported Inputs (Buttons)

Input manager can read Joystick Button 0.
It was even possible to read the “Back Button” via Input.GetKey(KeyCode.Escape)
But it was really reading the Keyboard Input, it was fine.

I try to override the Input Buttons using a custom UnityPlayerActivity.

public class UnityAtaPlayerActivity extends UnityPlayerActivity
{
    //This Java Code
   //Override the UnityPlayerActivity
    private int PlayPauseTarget = KeyEvent.KEYCODE_SPACE;
    private int MediRewindTarget = KeyEvent.KEYCODE_G;
    private int FastForwardTarget = KeyEvent.KEYCODE_R;

    private int DPadCenterTarget = KeyEvent.KEYCODE_BUTTON_A; // This is a GamePad
    private int MenuTarget = KeyEvent.KEYCODE_MENU;
    private int BackTarget = KeyEvent.KEYCODE_BACK;

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event)
    {
        switch (keyCode)
        {
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
                KeyEvent newEvent = new KeyEvent(KeyEvent.ACTION_UP, PlayPauseTarget);
                return mUnityPlayer.injectEvent(newEvent);         
            default:
                return mUnityPlayer.injectEvent(event);
        }
    }
    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event)
    {
        switch(keyCode)
        {
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
                KeyEvent newEvent = new KeyEvent(KeyEvent.ACTION_DOWN, PlayPauseTarget);
                return mUnityPlayer.injectEvent(newEvent);           
            default:
                return mUnityPlayer.injectEvent(event);
        }
    }
}

But time is not working, I don’t understand why.
What I only found what this

The Input debug have 2 android Joysticks

The First one Triggers the override Keys from the Custom UnityPlayerMainActivity.
The Second triggers the keys from the first Image. No DPad_center.

I mean how can I give support for this remote controller for Input System?
It’s possible to map this controller via Android ?

I’ve checked what keyboard bindings we have right now:

So these should be mapped as following:
KEYCODE_BACK = Escape
KEYCODE_MENU = Menu/contextmenu
KEYCODE_DPAD_UP = Up arrow
KEYCODE_DPAD_DOWN = Down arrow
KEYCODE_DPAD_LEFT = Left arrow
KEYCODE_DPAD_RIGHT = Right arrow

But these 4 are not mapped currently:
KEYCODE_DPAD_CENTER = not mapped
KEYCODE_MEDIA_PLAY_PAUSE = not mapped
KEYCODE_MEDIA_REWIND = not mapped
KEYCODE_MEDIA_FAST_FORWARD = not mapped

The code that you’re suggesting looks reasonable on a first look, so if you put breakpoints do you see KEYCODE_MEDIA_PLAY_PAUSE coming in? Also you’re overriding the activity, but I recon you have unity player frame view in focus, so you need to override UnityPlayer also

Also don’t forget that there are two more handlers, four in total:

public boolean onKeyUp(int keyCode, KeyEvent event)
public boolean onKeyDown(int keyCode, KeyEvent event)
public boolean onKeyMultiple(int keyCode, int count, KeyEvent event)
public boolean onKeyLongPress(int keyCode, KeyEvent event)

dmytro_at_unity

When using the old input, It was possible to use the non mapped keys like this.
Because it will return Keyboard input making everything super easier, just inject

KEYCODE_MEDIA_PLAY_PAUSE → KeyEvent.KEYCODE_SPACE.
When Press PlayPause I get need to read Key.Space in InputSystem.

//This is Android Code!!!!
public class UnityAtaPlayerActivity extends UnityPlayerActivity
{   
    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event)
    {
        switch (keyCode)
        {
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
                KeyEvent newEvent = new KeyEvent(KeyEvent.ACTION_UP); KeyEvent.KEYCODE_SPACE;
                return mUnityPlayer.injectEvent(newEvent); 
            default:
                return mUnityPlayer.injectEvent(event);
        }
    }
}

But this only works with the Old Input System. You cannot use this because it never trigger UnityEngine.InputSystem.Keyboard.
Maybe this need an update or fix in the Input System Library ?

I try to create a Custom Device.
But the result wasn’t great.
For now this could be the best solution I can figure out.

The mapped keys are get by reading the Input System Keyboard.
The Non Mapped keys are get by using Android Java Calls to the Override Main Activity.

It was working, until I compile with IL2CPP (The Build that I need to upload in any Store)
I don’t know what to from here.

using System.Linq;
using System.Runtime.InteropServices;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
#if UNITY_EDITOR
using UnityEditor;
#endif

public struct AftvRemoteDeviceState : IInputStateTypeInfo
{
    public FourCC format => new FourCC('A','G','C');
    //Buttons
    [InputControl(name = "selectButton", layout = "Button", bit = 0, displayName = "Select Button")]
    [InputControl(name = "backButton", layout = "Button", bit = 1, displayName = "Back Button")]
    [InputControl(name = "menuButton", layout = "Button", bit = 2, displayName = "Menu Button")]
    [InputControl(name = "rewindButton", layout = "Button", bit = 3, displayName = "Rewind Button")]
    [InputControl(name = "playPauseButton", layout = "Button", bit = 4, displayName = "PlayPause Button")]
    [InputControl(name = "fastForwardButton", layout = "Button", bit = 5, displayName = "FastForward Button")]
    public ushort buttons;

    [InputControl(name = "stick", format = "VC2B", layout = "Stick", displayName = "Main Stick")]
    [InputControl(name = "stick/x", defaultState = 127, format = "BYTE",
        offset = 0,
        parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5")]
    public byte x;
    [InputControl(name = "stick/y", defaultState = 127, format = "BYTE",
        offset = 1,
        parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5")]
    [InputControl(name = "stick/up", parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=0,clampMax=1")]
    [InputControl(name = "stick/down", parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=-1,clampMax=0,invert")]
    [InputControl(name = "stick/left", parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=-1,clampMax=0,invert")]
    [InputControl(name = "stick/right", parameters = "normalize,normalizeMin=0,normalizeMax=1,normalizeZero=0.5,clamp=2,clampMin=0,clampMax=1")]
    public byte y;
}

#if UNITY_EDITOR
[InitializeOnLoad] // Call static class constructor in editor.
#endif
[InputControlLayout(stateType = typeof(AftvRemoteDeviceState))]
public class AftvRemoteDevice : InputDevice, IInputUpdateCallbackReceiver
{
#if UNITY_EDITOR
    static AftvRemoteDevice()
    {
        Initialize();
    }
#endif

    [RuntimeInitializeOnLoadMethod]
    public static void Initialize()
    {
        InputSystem.RegisterLayout<AftvRemoteDevice>
           (
               matches: new InputDeviceMatcher()
               .WithInterface("Android")
               .WithDeviceClass("AndroidGameController")
               .WithCapability("vendorId", 369) //
               .WithCapability("productId", 1043)
           );
    }

    public ButtonControl selectButton { get; private set; }
    public ButtonControl backButton { get; private set; }
    public ButtonControl menuButton { get; private set; }

    //Unity Activity Override Buttons
    public ButtonControl rewindButton { get; private set; }
    public ButtonControl playPauseButton { get; private set; }
    public ButtonControl fastForwardButton { get; private set; }

    public StickControl stick { get; private set; }

    private static AndroidJavaClass javaClass = new AndroidJavaClass("com.unity3d.player.UnityPlayer");

    protected override void FinishSetup()
    {
        base.FinishSetup();

        selectButton = GetChildControl<ButtonControl>("selectButton");
        backButton = GetChildControl<ButtonControl>("backButton");
        menuButton = GetChildControl<ButtonControl>("menuButton");

        rewindButton = GetChildControl<ButtonControl>("rewindButton");
        playPauseButton = GetChildControl<ButtonControl>("playPauseButton");
        fastForwardButton = GetChildControl<ButtonControl>("fastForwardButton");

        stick = GetChildControl<StickControl>("stick");

    }

    public static AftvRemoteDevice current { get; private set; }
    public override void MakeCurrent()
    {
        base.MakeCurrent();
        current = this;
    }

    protected override void OnRemoved()
    {
        base.OnRemoved();
        if (current == this)
            current = null;
    }


    public void OnUpdate()
    {
        var keyboard = Keyboard.current;

        if (keyboard == null)
            return;

        //Debug.Log("Aftv Update");
        AftvRemoteDeviceState state = new AftvRemoteDeviceState();

        state.x = 127;
        state.y = 127;

        var wPressed = keyboard.wKey.isPressed || keyboard.upArrowKey.isPressed;
        var aPressed = keyboard.aKey.isPressed || keyboard.leftArrowKey.isPressed;
        var sPressed = keyboard.sKey.isPressed || keyboard.downArrowKey.isPressed;
        var dPressed = keyboard.dKey.isPressed || keyboard.rightAltKey.isPressed;

        if (aPressed)
            state.x -= 127;
        if (dPressed)
            state.x += 127;
        if (wPressed)
            state.y += 127;
        if (sPressed)
            state.y -= 127;

        // Map buttons to 1, 2, and 3.

        if (keyboard.leftMetaKey.isPressed || keyboard.rightMetaKey.isPressed || keyboard.escapeKey.isPressed)//back
            state.buttons |= 1 << 1;
        if (keyboard.contextMenuKey.isPressed)//menu
            state.buttons |= 1 << 2;


        ///Call this Only Works once
        ///For the Rewind KeyButton
        ///After that the Input Fails.
        ///I wonder If I can make this different
        ///
#if UNITY_ANDROID && !UNITY_EDITOR
        using (AndroidJavaObject currentActivity = javaClass.GetStatic<AndroidJavaObject>("currentActivity"))
        {
            if (currentActivity.GetStatic<bool>("DPadCenter"))//select
                state.buttons |= 1 << 0;

            if (currentActivity.GetStatic<bool>("RewindButtonDown"))//RewindButton
            {
                state.buttons |= 1 << 3;
            }
            if (currentActivity.GetStatic<bool>("PlayPauseButtonDown"))//PlayPauseButton
            {
                state.buttons |= 1 << 4;
            }
            if (currentActivity.GetStatic<bool>("FastForwardButtonDown"))//ForwardButton
            {
                state.buttons |= 1 << 5;
            }
        }
#endif
        InputSystem.QueueStateEvent(this, state);
    }

#if UNITY_EDITOR
    [MenuItem("Tools/Custom Device Sample/Create Aftv Device")]
    private static void CreateDevice()
    {
        // This is the code that you would normally run at the point where
        // you discover devices of your custom type.    
        InputSystem.AddDevice<AftvRemoteDevice>();
    }

    // For completeness sake, let's also add code to remove one instance of our
    // custom device. Note that you can also manually remove the device from
    // the input debugger by right-clicking in and selecting "Remove Device".
    [MenuItem("Tools/Custom Device Sample/Remove Aftv Device")]
    private static void RemoveDevice()
    {
        var customDevice = InputSystem.devices.FirstOrDefault(x => x is AftvRemoteDevice);
        if (customDevice != null)
            InputSystem.RemoveDevice(customDevice);
    }

#endif

}

This is the override Unity Main Activity

public class UnityAtaPlayerActivity extends UnityPlayerActivity
{
    public static boolean DPadCenter;
    public static boolean PlayPauseButtonDown;
    public static boolean RewindButtonDown;
    public static boolean FastForwardButtonDown;

    @Override
    public boolean onKeyUp(int keyCode, KeyEvent event)
    {
        switch (keyCode)
        {
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
                this.PlayPauseButtonDown=false;
            case KeyEvent.KEYCODE_MEDIA_REWIND:
                this.RewindButtonDown=false;
            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
                this.FastForwardButtonDown=false;
            case KeyEvent.KEYCODE_DPAD_CENTER:
                this.DPadCenter=false;
        }
        return mUnityPlayer.injectEvent(event);
    }

    @Override
    public boolean onKeyDown(int keyCode, KeyEvent event)
    {
        switch (keyCode)
        {
            case KeyEvent.KEYCODE_MEDIA_PLAY_PAUSE:
                this.PlayPauseButtonDown=true;
            case KeyEvent.KEYCODE_MEDIA_REWIND:
                this.RewindButtonDown=true;
            case KeyEvent.KEYCODE_MEDIA_FAST_FORWARD:
                this.FastForwardButtonDown=true;
            case KeyEvent.KEYCODE_DPAD_CENTER:
                this.DPadCenter=true;
        }
        return mUnityPlayer.injectEvent(event);
    }
}

In the debug version the controllers work a little bit strange, when I use the Dpad it works fine.
When using the Media button (Rewind, Play,Pause) it works the first time, after that it fails.

It was working, until I compile with IL2CPP

Likely because of stripping, try placing [Preserve] on the struct/fields.

This is the override Unity Main Activity

Try overriding UnityPlayer frame, not just activity. I’m not 100% sure but activity might not get keyboard callbacks when frame is in focus.

@OscarLeif another detail which might be relevant, is that we use deviceId of events for device association, so if you’re creating a new event be sure to base it’s on original event so fields like deviceId, eventTime, flags, source, etc are preserved.

There are copy ctor KeyEvent(KeyEvent origEvent) and there also expanded constructor KeyEvent(long downTime, long eventTime, int action, int code, int repeat, int metaState, int deviceId, int scancode, int flags, int source) for this.

@dmytro_at_unity
How you override “UnityPlayer Frame” ?
Right now I add the [Preserve] on the struct and it’s working in the IL2CPP Build.
I was working on this and I found that UI navigation with this plugin works fine.
Something interesting was that the Input debugger never register the Input Keys called from the Main Activity.

While the UI navigation works, I cannot get this plugin works with the Component “Player Input”
Maybe it’s the activity override keys are not called in the correct time…But the custom device doesn’t have Execution Order.

Ok I check the Source Code of the Input System.
And with this Script the Remote control of the Fire TV should work fine.
I didn’t know you could actually check how the Input System works.
With this you don’t need

-modify the Android Main Activity (Probably we should avoid doing that)
-call weird JNI scripts (that create a lot of Unnecessary garbage)

The Bit Values where comes from ?

Here: InputSystem/Packages/com.unity.inputsystem/InputSystem/Plugins/Android/AndroidKeyCode.cs at develop · Unity-Technologies/InputSystem · GitHub
It’s the same values from the Android API
KeyEvent  |  Android Developers

If you wan to support Volume Up and Down just add the keys with the Bit value from the previous links.
But I suggest it’s not a great Idea override or use those buttons (but you can :smile:)

using System.Linq;
using UnityEngine;
using UnityEngine.InputSystem;
using UnityEngine.InputSystem.Controls;
using UnityEngine.InputSystem.Layouts;
using UnityEngine.InputSystem.LowLevel;
using UnityEngine.InputSystem.Utilities;
using UnityEngine.Scripting;

#if UNITY_EDITOR
using UnityEditor;
#endif

[Preserve]
public struct AftvRemoteDeviceState : IInputStateTypeInfo
{
    public FourCC format => new FourCC('A', 'G', 'C');

    //Mapped Here
    [InputControl(name = "dPadUpButton", layout = "Button", bit = 19, displayName = "Dpad Up")]
    [InputControl(name = "dPadRightButton", layout = "Button", bit = 22, displayName = "Dpad Right")]
    [InputControl(name = "dPadDownButton", layout = "Button", bit = 20, displayName = "Dpad Down")]
    [InputControl(name = "dPadLeftButton", layout = "Button", bit = 21, displayName = "Dpad Left")]
    [InputControl(name = "backButton", layout = "Button", bit = 4, displayName = "Back Button")]
    [InputControl(name = "menuButton", layout = "Button", bit = 82, displayName = "Menu Button")]
    //Non Maped
    [InputControl(name = "selectButton", layout = "Button", bit = 23, displayName = "Select Button")]
    [InputControl(name = "rewindButton", layout = "Button", bit = 89, displayName = "Rewind Button")]
    [InputControl(name = "playPauseButton", layout = "Button", bit = 85, displayName = "Play Pause Button")]
    [InputControl(name = "fastForwardButton", layout = "Button", bit = 90, displayName = "Fast Forward Button")]
    public uint buttons;
}

#if UNITY_EDITOR
[InitializeOnLoad] // Call static class constructor in editor.
#endif
[Preserve]
[InputControlLayout(displayName = "Aftv Remote", stateType = typeof(AftvRemoteDeviceState))]
public class AftvRemoteDevice : InputDevice
{
#if UNITY_EDITOR
    static AftvRemoteDevice()
    {
        Initialize();
    }
#endif

    [RuntimeInitializeOnLoadMethod]
    private static void Initialize()
    {
        InputSystem.RegisterLayout<AftvRemoteDevice>
            (
                matches: new InputDeviceMatcher()
                .WithInterface("Android")
                .WithDeviceClass("AndroidGameController")
                .WithProduct("Amazon Fire TV Remote")
            );
    }

    public ButtonControl dPadUpButton { get; private set; }
    public ButtonControl dPadRightButton { get; private set; }
    public ButtonControl dPadDownButton { get; private set; }
    public ButtonControl dPadLeftButton { get; private set; }
    public ButtonControl selectButton { get; private set; }
    public ButtonControl rewindButton { get; private set; }
    public ButtonControl playPauseButton { get; private set; }
    public ButtonControl fastForwardButton { get; private set; }
    public ButtonControl backButton { get; private set; }
    public ButtonControl menuButton { get; private set; }
    public bool SelectButtonDown { get; set; }
    public bool RewindButtonDown { get; set; }
    public bool PlayPauseButtonDown { get; set; }
    public bool FastForwardButtonDown { get; set; }

    protected override void FinishSetup()
    {
        base.FinishSetup();
        dPadUpButton = GetChildControl<ButtonControl>("dPadUpButton");
        dPadRightButton = GetChildControl<ButtonControl>("dPadRightButton");
        dPadDownButton = GetChildControl<ButtonControl>("dPadDownButton");
        dPadLeftButton = GetChildControl<ButtonControl>("dPadLeftButton");

        rewindButton = GetChildControl<ButtonControl>("rewindButton");
        playPauseButton = GetChildControl<ButtonControl>("playPauseButton");
        fastForwardButton = GetChildControl<ButtonControl>("fastForwardButton");

        backButton = GetChildControl<ButtonControl>("backButton");
        menuButton = GetChildControl<ButtonControl>("menuButton");
        selectButton = GetChildControl<ButtonControl>("selectButton");    
    }

    public static AftvRemoteDevice current { get; private set; }

    public override void MakeCurrent()
    {
        base.MakeCurrent();
        current = this;
    }

    protected override void OnRemoved()
    {
        base.OnRemoved();
        if (current == this)
            current = null;
    }

    #region Editor
#if UNITY_EDITOR
    [MenuItem("Tools/AftvRemote/Create Device")]
    private static void CreateDevice()
    {
        InputSystem.AddDevice<AftvRemoteDevice>();
    }
    [MenuItem("Tools/AftvRemote/Remove Device")]
    private static void RemoveDevice()
    {
        var customDevice = InputSystem.devices.FirstOrDefault(x => x is AftvRemoteDevice);
        if (customDevice != null)
            InputSystem.RemoveDevice(customDevice);
    }
#endif
    #endregion
}

But even if this was completed I still found some issues with the component “PlayerInput”
It doesn’t work, I use then an Input Action and this one works…If I found something I will post more.

I found more problems with the Fire OS.
While the controller works and event the Input debugger reports Input.
Some button actions stop working when I load a second scene.
This happens with any controller.

Thanks for your work. I could add support for NVIDIA SHIELD Remote by simply register a second device in Initialize() method.

InputSystem.RegisterLayout<AndroidTVRemoteDevice>
    (
        matches: new InputDeviceMatcher()
        .WithInterface("Android")
        .WithDeviceClass("AndroidGameController")
        .WithProduct("NVIDIA SHIELD Remote")
    );

Hello!

If I remember I stop using the Input System because It trigger a lot of errors beyond the editor.
For example I remember Trying to use a Gamepad & a Keyboard on Windows Fails.
Fire TV have this Crazy Error: When I try to Use Events, I don’t remember they will not work.
Not sure if because it was on a Fire TV (Unity Clearly says they will not support Fire OS).

Check here: https://discussions.unity.com/t/728710

I just write this because I spend a lot of time to finally not use this. I really wanted to use the Input System actually is more lightweight than the previous Input Manager but is not stable, at the time I write this message.

In case someone comes across this post again (it’s highly ranked on google for fire tv with the new input system), I have found a solution and turned it into an Asset. It adds Fire TV & Android TV remote devices to the input system.

Supports Fire TV 2. Gen & 3. Gen remotes and I was able to publish my game to the amazon app store with it.

It does not support volume +/- and mute buttons, as this is against Amazons guidelines and you will probably fail their app review.

(I hope linking to my asset from the asset store is okay on these forums)

Well Unity Input system on Android read the bit values.
so Fire Tv and Android TV should be the same.

The Only stuff missing was the “Virtual Keys” for Android.
I try to setup a game using the input system for android but I found that virtual keys didn’t work while the old “Input Manager” work fine.

I was close to switch to the Input System…Not really know if this is important.

Hey everyone, so after 2 days and about 50 rebuilds of my game on to my firetv device, I wanted to share how this worked out in the end since this post was confusing, and one of the first pages to come back for search results on this topic. I found this post in the first hour of trying to solve this problem, and the answer was right there in front of me the entire time. But I understand this thread was originally for Oscar as the OP, and he was figuring stuff out in the process, and eventually it seems wasn’t able to use this solution. So it sounds like it might not work and is not the accepted answer … well Oscar’s solution is really the best one. (full credit to him for the attached file).

It’s not really laid out for a new reader, and while Frenchy gave great information, all of which is true but didn’t make sense to me until after I solved the problem. So Firetv works with Unity Input System but there is no device for it as of this writing, I even checked the newest version as of today. Unity should add this device, along with additional entries for other Android devices as DragonHawk did above (that post was helpful too). But in the meantime here is how to add a custom device for firetv.

Oscar’s file is perfect, and is not a script, it is a struct. So download it below and simply add it to your project. You do not need to edit it or add it to any scenes, game object etc. Just put it in your project and Unity will detect it and add it to the input system. You can see it in the input debugger and it works there, I will not cover that part but its fully working there. It also becomes available in all the UI menus under “Other” for device type. No matter what you try, without a device for Firetv you will never find the center D pad button or the menu button (back works as the escape key, and arrows as the d pad), so without this you may feel some hope but its never going to fully work without a custom device.

When on a firetv, or any other android devices you add to the device list, the game will automatically use that controller. If you download the sample from Unity about a custom device, it is extremely well commented and this all will make more sense (but not required). In custom code you now access the buttons like this:

Instead of: /leftButton it is:

/selectButton
/menuButton

The back button is still escape, it was commented out so I assumed for a reason, but escape works fine and I still use the arrow keys like I used to, but here are those as well:

/dPadUpButton
/dPadDownButton
/dPadLeftButton
/dPadRightButton

And the 3 bottom buttons you are not supposed to use, but they work as well:

/rewindButton
/playPauseButton
/fastForwardButton

Software Mouse:
If you use a software mouse with the new input system, make sure to also add the dpad and select button to that so the mouse can use it too. Mouse settings: Under Stick Action, add a 2D Vector and the 4 options are the arrow keys (I use the actual arrow keys so my game also works with a keyboard, and they work with firetv too). You can of course use the custom dpad ones too.
Required: Add the select button to the left click action: /selectButton

You might also need to edit your Input Settings Asset under UI, point and click and add the custom device there as well. Enable keyboard and mouse for the custom device too. Any other sources of problems are likely in the Input Manager settings under Project Settings.

Keep on gaming everyone.

8596267–1152874–AftvRemoteDeviceState.cs (4.66 KB)

This asset is working till Unity 2022.3.20f1 and after this version Media control buttons stopped working. On Unity 6 also Media control buttons are not working.

anyone have a clue how to gain access to the rewind, play, fast forward buttons in Unity 2022+? the above methods don’t seem to work for newer versions

I submitted a bug to Unity for this, and it’s actually been fixed. The fix requires both one of the recent Unity versions mentioned, as well as InputSystem package 1.15.0.