Thanks for all the useful information in this thread. I started on the journey with a harmony 650 and the flirc xbmc profile. The latest gui (3.1 at this point) takes away almost all the pain for XBMC.
The only place where I got stuck was -
The amazon fire home button - couldn't get it to work with the command line mapping to 101 - Solved
The back button for amazon fire (the return button works fine for xbmc) - Not Solved
If anyone is looking for a solution to home button not working with 101 - I ended up using 69 ( in the command ;) ) as follows -
flirc_util.exe record_api 0 69
The logic behind that number is this post here which maps all key presses to their codes -
Additional details for logitech Harmony or anyone trying to troubleshoot remote key presses-
As mentioned, I was working with a Logitech Harmony 650. I waanted to map the Menu button with Home and exit button with back for fire tv (not XBMC). For a while I tried a few other buttons and couldn't see any of them even registered on the remote as sending anything.
If you understand the harmony remote universe, I was trying this within an activity for watching movies - i.e. while the remote was working in a combined mode of sending key presses for volume commands to the amp and any media key presses to flirc+aftv etc.
To be able to see what exactly the remote was doing, I installed eventghost (free). If you have used it you would know what its for, if you haven't - suffice it to say it can be used to program your windows OS (and therefore XBMC on windows) to map remote buttons to specific actions.
So the setup was - My laptop running wondows + eventghost and flirc plugged in to the laptop. I also enabled the keyboard plugin on eventghost so that it listens and translates to flirc events as keyboard events. That would mean that any keypresses on my harmony were
seen by flirc
Passed to EG and
displayed on screen as keyboard event they represented.
Part 1 - Event-ghost confirmed that the menu and exit keys on my remote were not doing anything.
For this one, I used the harmony software to include these keys for my chosen activity (watch movies). The action on these buttons could be anything for now, as I wanted to just ensure that the keys were working. (For good measure, I also added these two menu options to the onscreen menu on lLogitech but you can ignore that )
Part 2 - Now that the buttons were firing, I needed to map them to send in whatever fire tv receives as a home button.
I repeated the command line option in the thread so that the button press would be seen as F12. Maybe I tried it too many times but for some reason I couldnt get EG to report it as F12. It would either be registered as something else or an F12 followed by two returns.
That is when I did some more digging and got to the post mentioned above with details on key presses and their numerical equivalents. Ultimately, I got to see F12 and it works.
Part 3 - For some reason though, I still couldnt get the whole thing to work for back button.
It should be recognised as an escape key. As with F12, I have used the corresponding code for my harmony exit button as well as the screen option. It is received as an escape followed by two returns. It might be a case of flirc keeping the old values, although I've tried deleting it a few times. Or it might be a case of fiddling with the key repeat time etc. I was too tired to persist with it but will try again later
Hope all of that is useful to someone.