I posted a couple of quick samples / tools you might find handy...
onRemoteHandler.zip contains a complete onRemoteEvent handler which traps all of the remote control buttons passed into hosted HTML applications. Well, almost all -- I didn't explicitly include the 'More Information' button because we don't really recommend you leverage that button.
KeyPress.zip is a utility function which will present a Media Center dialog for each button press passed into hosted HTML applications. I've used this in the past to confirm my remote control presses were actually being passed into the pages if experiencing some weird behavior. It's especially helpful if you are using frames and you need to validate the button presses are being passed from parent to child.