Using a Microsoft remote control in Windows: Difference between revisions

From Official Kodi Wiki
Jump to navigation Jump to search
>Jhsrennie
No edit summary
>Jhsrennie
No edit summary
Line 39: Line 39:
messages are being sent, and KeyMapEdit is a utility for editing the keyboard.xml
messages are being sent, and KeyMapEdit is a utility for editing the keyboard.xml
file.
file.
The remainder of this article describes the gory details of configuring the
Microsoft remote. This probably looks frighteningly complicated to most
of us, but very few people need to read further as EliteGamer360's scripts
and/or the MCERemote add-on should do everything you need. Only the curious
and determined need read further.


== How the MS remote works ==
== How the MS remote works ==


The article [[Using a remote control with XBMC]] describes the four
The Microsoft remote, or more accurately the eHome device driver, keeps the  
ways that MCE remotes work in Windows. With the default eHome driver
button configuration in the registry value <i>ReportMappingTable</i> in the key:
the MS remotes uses a combination of all four ways:
 
<ol>
  <li>The <i>i</i> button and the coloured buttons send
  IR signals and won't do anything in XBMC.</li>
 
  <li>The <i>Play</i>, <i>Pause</i> and various other buttons
  send APPCOMMAND messages. These messages are handled by XBMC so the
  buttons will work in XBMC.</li>
 
  <li>Some of the buttons like <i>Stop</i> and the <i>Next</i> and
  <i>Prev</i> 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.</li>
 
  <li>The remaining buttons just send keypresses e.g. pressing the
  <i>5</i> button looks to Windows (and XBMC) as if you just pressed
  the <i>5</i> key on the keyboard. The only button that doesn't do
  the obvious is the <i>Clear</i> button, which sends the keypress
  <i>Escape</i>.</li>
</ol>
 
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 <i>ReportMappingTable</i> in the key:


<pre>HKEY_LOCAL_MACHINE
<pre>HKEY_LOCAL_MACHINE
Line 92: Line 59:
       \745a17a0-74d3-11d0-b6fe-00a0c90f57da</pre>
       \745a17a0-74d3-11d0-b6fe-00a0c90f57da</pre>


This is a binary value, and it's in an abscure format. See the
This is a binary value
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
<i>.reg</i> 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 <i>Play</i>. XBMC handles
all these keys though some, like the <i>Live TV</i> 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 <i>Yes</i> 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.


[[category:Remote]]
[[category:Remote]]

Revision as of 09:12, 29 November 2010

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.

Useful resources

EliteGamer360 has written a registry config file and associated keyboard.xml and these are available from http://xbmccustomregis.sourceforge.net/.

jhsrennie has written an add-on to configure MS remotes. To install it run XBMC and go to Settings, Add-ons, Get Add-ons, XBMC.org Add-ons, Program Add-ons and select MCERemote. Once installed, you can open the add-on by selecting Programs from the home page then MCERemote. The addon includes an option to display the instructions.

http://xbmcmce.sourceforge.net/ has various utilities to help with tweaking the button mapping. ShowKey will show you what keypresses or AppCommand messages are being sent, and KeyMapEdit is a utility for editing the keyboard.xml file.

The remainder of this article describes the gory details of configuring the Microsoft remote. This probably looks frighteningly complicated to most of us, but very few people need to read further as EliteGamer360's scripts and/or the MCERemote add-on should do everything you need. Only the curious and determined need read further.

How the MS remote works

The Microsoft remote, or more accurately the eHome device 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