I got everything working except for search and home. Search isn't really needed because it only accepts voice search by default so it looks for a bluetooth mic to activate which I don't have. No home button is killing me though. I can't exit some apps (XBMC) and can't easily jump between apps.
*I found something interesting in that the keyboard shortcuts for home (alt+esc) will not exit apps. When you are within an app it only sends a back keypress. So if the app doesn't have a way to exit within the menu you may be stuck. I tested this with the flirc as well as with a keyboard. The home button on the remote is somehow detected differently when in an app.
Normally the record_api command in flirc_util.exe allows you to record a key with a modifier. The first number is a combination of modifiers (left/right shift/control/alt/windows) and the second is a USB HID key code of the key. There is a special case when the second number is 102. This tells Flirc to send a key code defined by a first number from different HID usage table. The code 154 then means a Media Select Home button. I'm not sure if this is the correct one so you need to check it yourself.
So 154 didn't work. I mapped it and tried pushing the remote key and nothing happened. So instead on my linux machine I ran xev to try and see what code my "home" key was pushing and it showed code 180 (B4 on the list). I tried mapping tat key and it just does a normal exit/backspace. Do you know another way to read the raw input from the keyboard media key? It might be tricky because I have to push function + f12 to get the key. I tried searching for a way to read the raw input but couldn't find anything that worked with the function/media keys so anything else you know of would be a big help.
This is what I'm getting on HID interface when pressing Home media button on my Logitech keyboard. I've used EventGhost's Generid HID input plugin. It can't read input from keys in the HID keyboard usage table (Windows captures this earlier with hid keyboard filter driver) but it sees media key presses which are in HID consumer usage table.
Maybe I'm missing a step. After doing record_api is there anything I need to do to unset that IR code from the keyboard button sent? I have used the same IR code all 3 times and just thought maybe the old keys are still set in the flirc and new keys aren't being used.
My last suggestion is for you to try all codes from 1 to 255 (second number still 102). I know that this may take some time. Maybe save your current config from the GUI or command line, then erase Flirc and start recording starting from code 1 102 and increment for all available buttons on the remote (remember which code for which button). Then try all the buttons with Android TV and if you don't find the Home button then erase again and start from next code after the one you recorded in previous round.
I have an old Acer A500 tablet at home which has a normal USB A port. I only had time to do a quick test and I couldn't get any response from Flirc using my custom configuration. I've also confirmed that the media home button on a normal USB keyboard works properly with the tablet.
I didn't find the the home or search buttons so I'm not sure if there are other keys to try or what that means. Maybe just saying that I'm using a Goldtouch keybard and the fn+f10 does home and fn+f11 does search.
Here is a list of HID usage tables and codes: _hid_usages.php. The codes are given in hex format so you need to convert from/to decimal. The code 140 (0x8C hex) in table 12 you've found to do something is defined as Media Select Telephone so it would probably work on phones and invoke dialer app.
On the other hand I think I've just found the working key combination for invoking Home. It works at least for me on the Acer tablet. First go in the GUI into File->Advanced in the menu and check Sequence Modifiers option. Then record Alt+Esc or Win+Esc for Home button and Win+Space for Search button. Give it a try and let me know.
I just bought Flirc and Nexus player and integrate them with my universal remote URC-880. I got every keys mapped and working on my URC-880 except Nexus Home button, which can exit any apps and go back to Nexus home screen. Logitech keyboard Media home key can also work the same as Nexus home button.
thanks to yawor from another thread. I used command line to map window key. combing window key and right navigation key into one search button on my URC-880, I can launch search globally from anywhere (no matter what app you are in).
just found another way to mimic Home button: Alt + Tab. This would take you back to Nexus home screen from any apps, including Netflix. This is better my previous work around above. Now I can use one button on my universal remote to go back to Nexus home from any apps.
I noticed one different about this key combo. when it takes you back to the home screen, you would see a text line "your recent screen is here" or something like that. the home button from Nexus remote does not have this.
I investigated how the Android key triggering system works, and I think that I pretty much understand why combinations like alt+esc works only in some programs, why it always work with the nexus remote, and what we need to achieve to have a fully working remote (even if I am not there yet).
So the first thing Android does is to match a HID codes it receives to the related "Linux key code" (also called "scan code"), using the appropriate layout file which is stored in the "/system/usr/keylayout/xxxxxxx.kl" files. Each "Linux key code" will trigger an "Android key codename". In our case, Android will use the Generic.tl layout for the flirc because there is no specific file for it. An other example is the original remote of the nexus player which uses the "Nexus_Remote.kl" layout. Later on, we will see that we can create our own layout file for any input device by using its "Vendor ID" and "Product ID". I recommand you to have a look a this sample "Generic.kl" to better understand what .tl files are.
When an "Android key codename" is triggered, it will also be interpreted according to the keychar file, which is stored in the "/system/usr/keychar/xxxxxxx.kcm" files. Most of the "Android key codenames" can result in a different action when used together with a key-modifier such as ctrl, alt, numlock, etc. Those additional actions are specified in the keychar file. Again, Android will use the Generic.kcm keychar in our case, and we could create our own keychar file using the device "Vendor ID" and "Product ID".
Now to make the analyse complete, I have noticed that some Android applications like netflix or kodi will bypass the keychar file, and only the "Android key codenames" called in the layout file will be triggered. That's why a keyboard combination like alt+esc sometimes doesn t work, while in the same condition the original remote will trigger HOME flawlessly.
So how can this help us ? First let's have a look at the "Generic.kl" file. Our main problem is to trigger the HOME and the DPAD_CENTER "Android key codenames" , which are the actions used by the original remote to go to home and perform a click which works with the virtual keyboard. By looking through the file, we can see the two "Linux key code" which correspond to those actions, respectively 172 and 353. Now we need to find which HID codes match those "Linux key codes". For that I found this table where the first row is the HID code in hexa, and the third is the "Linux Key Code", aka LKC, in hexa :
Thanks to the flirc "record_api" command, we can record HID codes from the 7 and 12 HID tables, but we seem to be limited to a decimal value of 255 (at least in the 12th table, as stated by yawor above). A great new feature would be to simulate any HID code from any HID page via the flirc, without limitations ^^
So what else can we do ? Instead of reproducing complex HID codes to trigger existing LKC, we could simply modify the actions of the LKC in the layout file to trigger our own "Android key codenames". The flirc user "halfluck" already came up with this solution in this thread. The documentation to create a custom layout file is described here. We should duplicate the Generic.kl file and rename it to "Vendor_20a0_Product_0001.kl", then edit the action of some less used keyboard keys. For example, "key 35 H" could become "key 35 HOME", which would make any flirc record of keyboard key "h" triggers the home screen, whatever application is running in foreground.
Maybe jason could review a bit the handling of the basic HID codes: since there are only 231 characters in the table "7 - Keyboard/Keypad", could we use some codes from 232 to 255 as exceptions to fully cover the "12 - Consumer Devices" table ? For now you are using the code 102 (Keyboard Power) as an exception to send the first 255 HID codes via the modifier byte, but as we know, one byte is not enough to cover the 667 commands of the "12 - Consumer Devices" table.
On windows explorer, navigate to the flirc folder ( \Program files x86\flirc\) , maintain shift and right clic on an empty space. In the menu you should see "open commands here" (or something like that, my computer is not in english).
Does somebody have a config file they can link for the Nexus Player? I'm trying to set the keys, but pressing any key (i.e. up arrow, down arrow) on my keyboard doesn't register.. I can only get IR commands from remote controls to work with this.
Hi all,
I would like to automatically start a specific netflix tv show on my firetv stick. I have configured the androidtv component and everything works fine. I can send some standard commands through the androidtv.adb_command service with a json formatted like this:
I think the best approach for you is to mimic the turn_off command in the androidtv package. Instead of using Harmony to send the down and OK commands, use the androidtv.adb_command service with something like this:
I found it! This command worked on my new FireTV Cube to launch a youtube video. I used this with the ADB bridge addon. I will try next with the python method to see if I have the same results. Hope this helps!
90f70e40cf