I moved from XBMC on a Mac to XBMC on an ATV2 just recently and wanted to share a few things I've learned, mostly a summary of what's in this thread or elsewhere.
First, unlike on a Mac, there is only a small set of buttons that the ATV2 can recognize and there's no way around this. This set has already been defined by Logitech in the Harmony Remote app under the "Apple TV" device, under Media Center PC -> Apple -> Apple TV. These are:
Second, most of these buttons are reasonably well defined by the default keymap in current builds of XBMC Eden. So basically if you add the Apple TV device in Harmony and make an activity (of type "Watch TV" which you would rename "Watch Apple TV"), there's not a lot you need to do further.
Now there are a few quirks and caveats that confused me for some time:
• In the default "Apple TV" device configuration, the hard "Skip Back" button is mapped to the device "SkipBackward" button while the hard "Skip Forward" button is mapped to the device "NextChapter" button. But it turns out that it doesn't matter because each set of SkipBack/PreviousChapter and SkipForward/NextChapter buttons send out the same button ID code: 21 for SkipBackward & PreviousChapter and 20 for SkipForward & NextChapter. And these are now mapped correctly in the XBMC default keymap, whereas in previous builds they had been erroneously reversed.
• What really made me dig into this was the glaring lack of any way to access either the "Info" or the "context menu" buttons in XBMC. So I was tempted to map those skip fw/back hard buttons onto those, and still may later. But I discovered that both each be accessed with
long presses of the Select Button (for "Info") and the Menu Button (for "context Menu"). I don't see this point made obvious in any FAQ I've seen, and it's really key.
• It's apparently not possible to define a button in Harmony software as a long press button, so that hard buttons could be directly mapped without the need for a long press. Not possible even by learning Raw remote codes. (I tried.) I've read in forums that Harmony support could do this, but if you're out of your original 90 day support window, they won't do this without a charge. Perhaps someone who has recently bought a Harmony One and is reading this could get them to do that. (If you do, post here!)
• The only viable option for Info and Context Menu (or any other function you might need either a hard or a soft button for), in my view, other than the skip buttons, would be to give up the Page Up/Page Down buttons. But these are needed for browsing a library.
• If you did want to remap one or more of those buttons to other functions, you would need to edit a copy of the default keymap ("joystick.AppleRemote.xml") file and put the edited version in your userdata folder. There are FAQs etc on how to do that, I just mention it here for completeness.
• There are 3 additional buttons that's not included in the default activity for Apple TV but is included in the default device. These are: Video Mode, Pair, and Unpair. I chose to map Video Mode to a soft button, in the hopes XBMC would recognize it (by looking and /var/log/syslog). However it doesn't. It is intercepted by Apple TV and does go to a video mode (resolution configuration screen). So might be handy to have as a soft button but it's not useful for XBMC. I did not experiment with Pair and Unpair but I expect similar results.
• The Play/Pause hard button on the factory remote is handled somewhat strangely (both by Harmony and by XBMC). Play and Pause are mapped separately. This seems to work in XBMC as expected. But I found that it in aTV Black's Last FM application, neither play or pause works (as mapped). Select seems to serve the function instead. Strange. I don't yet know what other issues this might cause. (Be interested in comments on that.)
So in the end, I made only a few minor modifications to the default watch Apple TV activity, and did not edit the default XBMC keymap:
• mapped the hard "Exit" button (in addition to the menu button) to "Menu"
• mapped the hard "Info" button (in addition to the select button) to "Select" (though it requires a long press still)
• added the "Video Mode" button as a soft button
• changed the map of the "Skip Forward" hard button from "PreviousChapter" to "SkipForward", just for consistency's sake. (As noted above it makes no difference).
Hope that helps.