I need html / javascript that will capture the input of a Firestick controller and have it do something else. Reason is I have a splash page that when you hit "Play/Pause" aka "Next" after filling out your email in the form field, it reloads the page and removes my input. The "Previous" button minimizes the keyboard, but since there is no Key ID for the "Back" button, not sure what the best solution is. I was thinking I could have the screen have the "Play/Pause" button make the selector go left once then press enter. This would trigger the "Back" button. (Of course open to any other suggestions on how to minimize the on screen keyboard.)
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);"
-
- Alexa
- Alexa Prize
- Alexa Connect Kit (ACK)
- Alexa Dev Days
- Alexa Developer Programs
- Alexa Developer Rewards
- Alexa Flash Briefing Skill API
- Alexa Gadgets
- Alexa Skill Management API (SMAPI)
- Alexa Skills Kit (ASK)
- Alexa Smart Home Skill API
- Alexa Video Skill API
- Alexa Voice Service (AVS)
- Amazon Pay
- In-Skill Purchases
- Works with Alexa
- Appstore
- Frustration-Free Setup
- Leaderboards & Tournaments
- Amazon Fire Devices
- Merch by Amazon
- Amazon Underground
- Mobile APIs and Services
- General Android
- Amazon Dash Replenishment
- 日本語版ナレッジベース
- 亚马逊应用开发者中文论坛
- Forum Help
- Alexa
- Sign in