Capture button presses on a Fire Tv remote

Hello,

I made a simple platform game, and I installed the apk on a Fire Tv Stick.

The Fire Tv remote has a directional pad with up, down, left, right, and a center button.

And below that, 3 buttons that should be testable: Rew, Play, and FF

The directional keys are mapped properly and work.

The center button should just be Enter or keycode 13, but when I check for “Return” pressed, it doesn’t work.

The 3 other buttons are identified by keycode.info as:

227 MediaRewind
179 MediaPlayPause
228 MediaFastForward

How can I check if these buttons are pressed?

Thanks,

Jared

After more testing, I’ve found that checking for “NumpadReturn” works for the Center button.

I really only need the MediaPlayPause for a pause button.

Perhaps a little snippet of Javascript could work?

It seems that something like this might work,

document.addEventListener("keyup", function(event) {
    if (event.keyCode === 179) {
        alert('Pressed!');
    }
});

But, I don’t know how to implement that in Gdevelop.

Any help, or even a poke in the right direction would be greatly appreciated.

1 Like

Please any help will be appreciated sir !! How can I use the center button on the fire tv remote. it should of worked as the A button but it doesn’t. The d-pad controls work fine when I test on the fire tv but the center button doesn’t work. please help I’m new to Gdevelop
thank you

Hi Tony,

The center button on the Fire Tv remote emulates the enter key. But for some reason, it’s not the regular Enter key, It’s the Enter key over by the Number Pad.

If you test for ‘NumpadReturn’ the Center button will work.
NumRet

Hello, I searched the forums and interestingly enough I couldn’t find this thread unless I searched on Google. I think because this is a very old thread, and my apologizes for resurrecting an older topic.

However, I am very interested in seeing what you did for some platformer controls for Fire TV on the Amazon app store. I submitted my app for fire TV but it just got rejected. It seems you could not navigate past the main menu, when you press the center button on the Fire TV remote. So my questions are:

NumpadReturn works for the center button on the fire remote?
Is player movement controlled with the Fire TV Remote directional buttons?
I only have two other buttons for gameplay, what works for a jump or pause button?
Are javascript code blocks required to get this to work?

Thanks so much for your help