Amazon Fire TV-How to map keys for Remote Control
Monkey Targets Forums/Android/Amazon Fire TV-How to map keys for Remote Control
| ||
Hi to all, I bought a Fire TV and need to understand how to map the buttons on the remote control into the MonkeyX. In the Fire TV documentation, I saw that the keys are mapped as follows: Fire TV Remote Button KeyEvent -------------------------- ------------------------- Home -------------------> none Back---------------------> KEYCODE_BACK Menu --------------------> KEYCODE_MENU Select (D-Pad Center) -> KEYCODE_DPAD_CENTER Up (D-Pad) -------------> KEYCODE_DPAD_UP Down (D-Pad) ----------> KEYCODE_DPAD_DOWN Left (D-Pad) ------------> KEYCODE_DPAD_LEFT Right (D-Pad) -----------> KEYCODE_DPAD_RIGHT Play/Pause --------------> KEYCODE_MEDIA_PLAY_PAUSE Rewind ------------------> KEYCODE_MEDIA_REWIND Fast Forward------------> KEYCODE_MEDIA_FAST_FORWARD In the monkey directory structure, exist a file called keycodes.monkey in : /modules/mojo Into this file there are a mapping: Const KEY_BACK = $ 1A0 'back button (android/winphone8) Const KEY_MENU = $ 1a1 menu button (android/winphone8) Which must be the BACK and MENU buttons on the remote control, but how to map the other keys? My idea is to create a module for the Fire TV and I think this is the main point to do that. Thank's ! |
| ||
Test with this values: KEYCODE_DPAD_CENTER: 23 (0x00000017) KEYCODE_DPAD_DOWN: 20 (0x00000014) KEYCODE_DPAD_LEFT: 21 (0x00000015) KEYCODE_DPAD_RIGHT: 22 (0x00000016) KEYCODE_DPAD_UP: 19 (0x00000013) Edit: Don't forget to enable the gamepad in the android target! |