Improvements to remote keymapping

Taken straight from http://forum.xbmc.org/showthread.php?tid=142910