Tweaking the MCE remote in windows en

By wheez50 on Monday 16 August 2010 21:41 - Comments (1)
Category: Tweakers, Views: 12.936

I've found a way to get the MCE remote working under windows without any additional software like ghostevent, HID helper or IRRS. I'll give an introduction and then I'll explain how it works. It's not a clear cut solution (yet), but it should be enough for anyone with some brains to alter and use how you want it. It works in winXP and also in Win7 x64.


I first started with XBMC (win) a few days ago. (Now months). Eventually, I'll set up a htpc/linux/xbmc/mythtv combo. But for now I'm getting the parts working. One of those parts was a replacement for my keyboard to control XBMC. It's simply too bothersome to sit on the couch and have a full size keyboard around (albeit wireless). So I 'stole' my dad's MCE remote (clone) (which he wasn't using anyway, and ofc with permission) and hooked it up. Then I found out it had only basic functionality. And whenever I hit the on/off button, windows would go to sleep, severing my internetconnection as well. I didn't like that at all, so I went on, finding the already existing guides how to use the MCE remote through third party tools. After having a few crashing and burning during or right after install, I quit and tried to find another solution.

I knew the MCE remote communicated with windows through some sort of virtual key exchanges. I simply didn't know what keys, where configured and how to edit it. Another guy found out (and I googled him after a few hours of searching). This is the OP post:
http://forums.gbpvr.com/showthread.php?t=43135
Basically he found out the MCE remote (the microsoft one or a similar clone using the same driver) was remappable through the registry. And he found the key and the way to edit it. All hail to him. And now you can share his solution :)
Together with the links in the OP, this link is very valuable: http://mediacenterguides.com/book/export/html/31

Linkylink to MicroSofts original pdf:
http://mediacenterguides.com/sites/default/files/IRCodes_ReportMappingTable_InputINF.pdf

Disclaimer: This works for the original MCE remote and clones. Other remotes probably work very differently.

How does it work? In the register key:HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da there's a few values that take care of it all! Actually, it's only the 'reportmappingtable' value. And I'll explain how it's coded. By exporting just this key, you can make an editable version from it: The resulting .reg file is easily edited in notepad and a simple doubleclick will add your updated key to the register again. All changes do need a reboot (or reinit of the HID driver). Any mess-ups can be corrected by reinstalling the driver completely.

My key (with ample comments):


code:
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
Windows Registry Editor Version 5.00

[HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da]
"CodeSetNum0"=dword:00000000 ;
"CodeSetNum1"=dword:00000000 ;These four values put the standard global windows keys out of function. These are
"CodeSetNum2"=dword:00000000 ;volume +, -, mute and .... windows sleep mode. I so hated that button
"CodeSetNum3"=dword:00000000 ;
"ReportMappingTable"=hex:\
  01,00,00,00,04,00,1e,\ ;1
  02,00,00,00,04,00,1f,\ ;2
  03,00,00,00,04,00,20,\ ;3
  04,00,00,00,04,00,21,\ ;4
  05,00,00,00,04,00,22,\ ;5
  06,00,00,00,04,00,23,\ ;6
  07,00,00,00,04,00,24,\ ;7
  08,00,00,00,04,00,25,\ ;8
  09,00,00,00,04,00,26,\ ;9
  00,00,00,00,04,00,27,\ ;0
  0a,00,00,00,04,00,29,\ ;escape
  0b,00,00,00,04,00,2b,\ ;return (remap: tab (to switch to fullscreen))
  0c,00,00,00,04,04,3d,\ ;power key (remapped:alt-F4)
  0e,00,00,00,01,e2,00,\ ;mute
  0f,00,00,00,04,00,10,\ ;info? (remapped:OSD key = m)
  10,00,00,00,01,e9,00,\ ;vol up
  11,00,00,00,01,ea,00,\ ;vol down
  12,00,00,00,04,00,4b,\ ;chan up (remapped: page up)
  13,00,00,00,04,00,4e,\ ;chan down (page down)
  14,00,00,00,01,b3,00,\ ;ff
  15,00,00,00,01,b4,00,\ ;rew
  16,00,00,00,01,b0,00,\ ;play
  17,00,00,00,01,b2,00,\ ;record
  18,00,00,00,01,b1,00,\ ;pause
  19,00,00,00,01,b7,00,\ ;stop
  1a,00,00,00,01,b5,00,\ ;next
  1b,00,00,00,01,b6,00,\ ;prev
  1c,00,00,00,04,02,20,\ ;# (shift-3)
  1d,00,00,00,04,02,25,\ ;* (shift-8)
  1e,00,00,00,04,00,52,\ ;up
  1f,00,00,00,04,00,51,\ ;down
  20,00,00,00,04,00,50,\ ;left
  21,00,00,00,04,00,4f,\ ;right
  22,00,00,00,04,00,28,\ ;return (ok)
  23,00,00,00,04,00,2a,\ ;back
  4e,00,00,00,01,08,02,\ ;?? (not on my remote anyway)
  26,00,00,00,04,02,11,\ ;tvguide? (not (yet) remapped functionally, it capital N now)
  5a,00,00,00,04,00,4a,\ ;text (remapped to 'home')
  5b,00,00,00,04,02,04,\ ;red (cap A)
  5c,00,00,00,04,02,05,\ ;green (Cap b)
  5d,00,00,00,04,02,06,\ ;yellow (cap c)
  5e,00,00,00,04,02,07,\ ;blue (cap d)
  0d,00,00,00,04,00,65,\ ;logo (remapped app key (context menu, c doesn't work in my install)
  24,00,00,00,04,02,08,\ ;dvd menu (cap e)
  25,00,00,00,04,02,09,\ ;live tv (cap f)
  48,00,00,00,04,02,10,\ ;recorded tv (cap m)



By putting above code in a new notepad file and renaming it to remoteremap.reg, adn then doubleclicking it you'll add it to your register. But of course you'll be wanting to edit it! I've not used the four tv buttons, nor the four colour buttons. The remaps I did right now are btw from my testing.
Basically you see 7 columns with two hex numbers each. The first column is simply a list of all the buttons on the remote, numbered. Every number is a button (second provided link gives insight in number-button connection). Then three columns of zeroes follow. Then there's three columns that count. Either it's 01 and then some non-keyboard codes (look 'em up yourself) or it's 04, then 00-0c (ctrl/shift/alt states) and then the keyboard equivalent. Microsoft hasn't used the standard USB HID list, but hey, it's Microsoft, and they'll never adhere to standards anyway :)

list of ctrl/alt/shift states:
CTRL 1 (0x01)
SHIFT 2 (0x02)
CTRL+SHIFT 3 (0x03)
ALT 4 (0x04)
CTRL+ALT 5 (0x05)
SHIFT+ALT 6 (0x06)
WIN 8 (0x08)
CTRL+WIN 9 (0x09)
SHIFT+WIN 10 (0x0A)
ALT+WIN 12 (0x0C)


Don't forget, it's all hex codes. Have fun using your remote how it's meant to be used. But then without extra services, performance hogs and other botherings.

Volgende: Booting Windows 7 x64 from a SCSI drive on a Dell Precision 670 08-'10 Booting Windows 7 x64 from a SCSI drive on a Dell Precision 670
Volgende: recept: Standaard pasta, maar dan lekker 06-'08 recept: Standaard pasta, maar dan lekker

Comments


By Tweakers user wheez50, Thursday 10 February 2011 03:56

FYI - based on the same principle there's a plugin for XBMC now. It's part of the standard package.

Comments are closed