I need html / javascript that will capture the input of a Firestick controller and have it do something else. Specifically I need the "Play/Pause" on the controller aka "Next" on the soft keyboard to minimize the keyboard. Since there is no Key ID for the "Back" button, I would like to have the click of next make the selector go left once then press enter.

So far I have the below but this just reloads the page. When I hit next.

Please be aware javascript is new to me so if you assist, please know I know nothing (John Snow) :-)

<script>
function checkKey(e){
    if(e.keyCode == 179) {
        //Play-Pause Button
e.key = "37";
e.key = "13";
    }
}
  </script>

//Later in the form brackets

<form action="#" onkeydown="checkKey(event);" id="custom-data" _lpchecked="1">
onkeydown="checkKey(event);"

https://developer.amazon.com/docs/fire-tv/supporting-controllers-in-web-apps.html

0

There are 0 best solutions below