Using a Microsoft remote control in Windows

From Official Kodi Wiki
Revision as of 08:56, 29 November 2010 by >Jhsrennie
Jump to navigation Jump to search

Note that this article applies only to the Microsoft remote and full compatibles. Specifically this means remotes that use the Microsoft eHome driver. To see if your remote uses the eHome driver open Device Manager and look under the heading Human Interface Devices to see if there is a device called Microsoft eHome Infrared Transceiver. For other remotes and general notes on remote controllers see Using a remote control with XBMC.

Any version of Windows from Windows XP onwards will automatically detect and install a Microsoft remote as soon as you connect it. With versions of XBMC from v10.0 Dharma onwards most of the buttons on the Microsoft remote will work immediately. The exceptions I know about are:

  • The Info button; sometimes labelled More or just i.
  • The volume buttons will control the Windows volume setting not the XBMC volume
  • The four coloured buttons (not all MS remotes have these) won't do anything
  • With Vista/Windows 7 the Live TV, Recorded TV and Guide buttons will start Windows Media Center. With Windows XP (non-Media Center Edition) these buttons won't do anything
  • The Green/Windows button will start Windows Media Center

For most people this will be fine, and in that case you don't need to do anything further. The only reason for continuing with this article is if you want to customise the Microsoft remote to change the actions of any of the buttons or to make the Info and coloured buttons work.

How the MS remote works

The article Using a remote control with XBMC describes the four ways that MCE remotes work in Windows. With the default eHome driver the MS remotes uses a combination of all four ways:

  1. The i button and the coloured buttons send IR signals and won't do anything in XBMC.
  2. The Play, Pause and various other buttons send APPCOMMAND messages. These messages are handled by XBMC so the buttons will work in XBMC.
  3. Some of the buttons like Stop and the Next and Prev buttons send an APPCOMMAND message followed by a multimedia keyboard press. It isn't obvious why MS chose to make some buttons send both APPCOMMAND messages and multimedia keypresses, while others send just an APPCOMMAND messages. Anyhow, these buttons will work in XBMC.
  4. The remaining buttons just send keypresses e.g. pressing the 5 button looks to Windows (and XBMC) as if you just pressed the 5 key on the keyboard. The only button that doesn't do the obvious is the Clear button, which sends the keypress Escape.

The Microsoft remote keeps the button configuration in the registry, and you can configure the action of any of the buttons by editing the registry. The remainder of this article describes how this can be done.

This article refers to various configuration files that are included with the MCERemote Addon for XBMC. At the time of writing this addon can be downloaded from http://xbmcmce.sourceforge.net/ and it will one day be added to the XBMC.org addon repository. You don't need to install the addon to get at the config files. Just unzip it, and you'll find the files in plugin.script.mceremote\resources\data.

Configuring the MS remote

The gory details are in the ReadMe.txt included with the MCERemote addon. In brief, the eHome driver keeps the button configuration in the registry value ReportMappingTable in the key:

HKEY_LOCAL_MACHINE
 \SYSTEM
  \CurrentControlSet
   \Services
    \HidIr
     \Remotes
      \745a17a0-74d3-11d0-b6fe-00a0c90f57da

This is a binary value, and it's in an abscure format. See the ReadMe.txt in the MCERemote addon for full details. For the purposes of this article you just need to know that the addon includes two .reg files that you can run to update the button configuration:

MSRemote.reg

- This will configure all the buttons on the remote to send the Media Centre shortcut keys e.g. ctrl-shift-P for Play. XBMC handles all these keys though some, like the Live TV keypress, ctrl-T, won't do anything useful until PVR support is added to XBMC. The remote will continue to work normally with Windows Media Center. In the unlikely event that you're interested see http://msdn.microsoft.com/en-us/library/bb189249.aspx for a list of (most of) the Media Center keyboard shortcuts.

MSDefault.reg

- This restores the default eHome button configuration. You can use this to back to the default settings in case there is any problem with changing the button config.

If you want to change the button config first check that the registry key mentioned above exists. If the registry key isn't present this means your remote is not using the eHome driver and the registry files won't work (though they won't do any harm). Assuming the registry key is present just run the appropriate .reg files and answer Yes when it asks if you're sure you want to make the changes. You need to restart Windows for the changes to take effect.

The MCERemote addon includes an applet called ShowKey that shows you what the buttons on the remote are doing. Run ShowKey.exe and press any button on the remote. ShowKey will show you if that button is sending a keystroke or an APPCOMMAND message. If the button doesn't send a keypress or message ShowKey won't detect the button press.