Using Input from the Amazon Fire TV Remote
Most Amazon Fire TV remote controls have these buttons. Some Fire TV remotes do not include the microphone or voice search buttons.
Remote control
| Amazon Fire TV Remote Button | Key Code | Standard Behavior |
|---|---|---|
| Select (D-pad Center) | 13 | Selects the user interface item with the current focus. |
| Up (D-pad) | 38 | Moves the focus upward in the user interface. |
| Down (D-pad) | 40 | Moves the focus downward in the user interface. |
| Left (D-pad) | 37 | Moves the focus left in the user interface. |
| Right (D-pad) | 39 | Moves the focus right in the user interface. |
| Play/Pause | 179 | Controls media playback. Play/Pause is a toggle. |
| Rewind | 227 | Rewinds or skips backwards in media playback contexts. |
| Fast Forward | 228 | Fast Forwards or skips ahead in media playback contexts. |
| Back | 4 | Navigates back in the history stack or back to home screen if the history stack is empty. |
Using Input from the Amazon Fire Game Controller
Developing for the Amazon Fire Game Controller is straightforward:- Amazon WebView supports the W3C standard Gamepad APIs.
- The buttons on the Amazon Fire Game Controller map to the standard gamepad format.
- In using the Gamepad APIs with the Amazon Fire Game Controller, the Back button is equivalent to Select on a standard controller, and the Menu button is equivalent to Start. If you do not use the Gamepad APIs, the buttons behave as Back and Menu buttons.
The Amazon Fire TV (1st Generation) Game Controller has these buttons:
The following table shows the key mappings.
| Amazon Gamepad Controller Button | Key Code | Standard Behavior |
|---|---|---|
| Up (D-pad/Joystick) | 38 | Move the focus upward in the user interface. |
| Down (D-pad/Joystick) | 40 | Move the focus downward in the user interface. |
| Left (D-pad/Joystick) | 37 | Move the focus left in the user interface. |
| Right (D-pad/Joystick) | 39 | Move the focus right in the user interface. |
| A | 13 | Select the user interface item with the current focus. |
| B | 8 | None |
| X | 13 | Select the user interface item with the current focus. |
| Y | 13 | Select the user interface item with the current focus. |
| Back | 4 | Navigates back in the history stack or back to home screen if the history stack is empty. |
Play/Pause Media Button
A requirement for all media apps submitted for Amazon Fire TV is that they handle the media Play/Pause key events to control media playback. All Game applications must also handle the media Play/Pause key events to play or pause the game. The key code for the Play/Pause button is 179.Back Button
When a user presses the Back button in a web app on a Fire TV, the web app receives a standard Android key event from theKeyEvent class. For details on how to capture key events on the Fire TV remote, see Remote Control Input. For details on how to capture key events on the Amazon Fire Game Controller, see Game Controller Input.
