Camelot Alpha 2 MCE remote support
#1
I've added support for the Windows Media Center remote to the Camelot Alpha 2 release. You can get the modified version here:

http://www.ratsauce.plus.com/camelot-a2.zip

Note that the URL is case sensitive.
The zip includes installation instructions and details on the modification.

Strictly speaking this isn't the Alpha2 release as it's build 24570, but it's pretty close. Don't use this release for bug checking. Use the official Alpha2 build instead. This is just for checking your MCE remote still works.

JR
Reply
#2
Thanks! I will be testing this.
Reply
#3
Thanks for the constant remote updates.

But is there any chance you can support all of the MCE remote's buttons? The biggest thing stopping me from using this is that the 'back' button no longer works. This means once you have the OSD up during a video, you cannot get rid of it quickly. Also makes menus a bugger to use.
Reply
#4
FNi31 Wrote:But is there any chance you can support all of the MCE remote's buttons? The biggest thing stopping me from using this is that the 'back' button no longer works. This means once you have the OSD up during a video, you cannot get rid of it quickly. Also makes menus a bugger to use.

In the readme file that comes with my hacked build is a list of all the keycodes generated on my XBMC remote. There are several buttons I haven't used because it wasn't obvious to me what they could be used for. If anyone wants to suggest uses for the other keys I'm happy to listne.

Actually, looking at that file I haven't included the back button, but then the back button just sends a Backspace keypress i.e. it should be exactly the same as just pressing the Backspace key on the keyboard. XBMC is configured to map the Backspace keypress to "Back" by default, so the back button should work even with the standard build. Have you tried your remote with the standard Alpha1 or Alpha2 builds?

JR
Reply
#5
Hi Jr,

I'm facing the same problem. I own a HP eHome RC6 remote control and neither the back nor the info button are working. In addition to the back button it would be nice if the "info" button activates the context menu. Is that possible?

Cheers,

Eric
Reply
#6
@FHi31 and ericchaves: grab http://www.ratsauce.plus.com/showkey.zip

This is a quickly hacked together applet to show keypress codes. It doesn't need any installing, just unzip to some convenient directory and run it. If you now press a button on the remote it will show you what keypresses the remote is sending. There will be a WM_CHAR code and a WM_KEYDOWN code. When I press the "back" button on my remote I get:

WM_CHAR: Backspace
WM_KEYDOWN: Backspace

i.e. it send a backspace keypress. If you press the Backspace key on the keyboard you should get the same output.

Can you see what the "back" button on your remotes does. My mods to XBMC don't process the Backspace key because XBMC already handles it correctly. Also try (in XBMC) pressing the Backspace key on the keyboard to check that it goes back.

@ericchaves: let me know what keystrokes the "info" button sends. Also what do you mean by the "context menu". Obviously I know what the Windows context menu is (right mouse click) but what does it mean in XBMC?

JR
Reply
#7
Hi JR,

The showkey gives me "WM_KEYDOWN: Key cod 166" for the back button. The info button does not output any keystroke, is there a way to check the IR code instead?

I also own and MCE remote keyboard (old model from Microsoft) and the backspace gives the keycode you said. The keyboard has the buttons "back" and "info" (actually the button is labeled "info" in the keyboard and "more" in the remote).

I guess this should be the case for most MCE Remotes, because I had other "generic-brand" remote and it also has those two buttons behaving just like the HP remote. I could not try the old one because its no longer with me.

I'm totally new to XBMC and by "context menu" I was referring to this context menu, which seems to be activated by the right-click mouse.

Best regards,

Eric.
Reply
#8
ericchaves Wrote:The showkey gives me "WM_KEYDOWN: Key cod 166" for the back button

Aha, there's the problem. Your remote is sending a keycode that neither XBMC nor my mods know about. FNi31, does your remote generate the same keycode? I thought the MCE buttons were all standard. Certainly all the remotes I've played with all generate the same keypresses.

Re the info button, for my mods to do anything the remote has to generate a keypress, and if the Info button doesn't generate a keypress there's nothing I can do. To make this work you're going to have to use some program like IR server suite that links directly to the remote through the IR driver.

JR
Reply
#9
Big Grin 
Hi Jr,

jhsrennie Wrote:Aha, there's the problem. Your remote is sending a keycode that neither XBMC nor my mods know about. FNi31, does your remote generate the same keycode? I thought the MCE buttons were all standard. Certainly all the remotes I've played with all generate the same keypresses.

Thanks for the help anyway. I'm trying to figure out how could I modify the keymap.xml so I could manage how to assign those new keycodes to XBMC actions.

jhsrennie Wrote:Re the info button, for my mods to do anything the remote has to generate a keypress, and if the Info button doesn't generate a keypress there's nothing I can do. To make this work you're going to have to use some program like IR server suite that links directly to the remote through the IR driver.

Although it seems to not generate the keypress event, it certainly raise some window event. I said that because when the info button or the "MCE" button (a button with a windows logo) is pressed, it automatically starts the Microsoft Media Center front-end, so definitely has to rise something that is intercepted by the OS. It may not be a keypress event however. As soon I got some free time, I'll try to figure it out.

Do you a good tutorial/explanation for the XBMC keymap? I read the docs but still not clear to me how should I do to remap it. It would be nice if there was a utility that allow us to load and test a keymap, without need to run XBMC. But thats for another thread.Big Grin

Best regards,

Eric.
Reply
#10
There are two steps to processing keys. Firstly XBMC has to detect and process the keypress, and then if XBMC accepts the keypress it uses the keymap.xml to work out what to do with it. My mods to XBMC work at the first step. It detects the keypresses sent by the remote and converts them to the standard keypresses used by XBMC. For example pressing the Stop button sends control-shift-S. My mods detect this and convert it to "X", which is the standard XBMC keypress for "Stop".

The keymap.xml will probably be enhanced for the next version of XBMC, but for Camelot the keymap.xml is fairly basic and can only process keys like "X", and in particular it can't process control and shift keys. That's why I have to intercept keypresses like control-shift-S, because the keymap isn't capable of handling key combinations like this.

So there isn't a good tutorial on the keymap.xml because it's so basic that anything that isn't obvious probably can't be done.

To get the Back key working the simplest course is probably to scrap your HP remote and get a standard MS remote or one of the many clones. The Info and MCE buttons probably send what we programme dudes call a WM_SYSKEYDOWN message. I haven't looked into processing these messages. It might be possible, but I suspect it would take significantly more work than the changes I've already made.

When Camelot is released I'll have another look at the keymapping and see what I can do. At the moment I have to redo my changes every time a new alpha or beta version is released, so I'm reluctant to invest too much effort in it. Once we have a stable officially released version I can spend more time on it.

As I mentioned above, the version after Camelot is likely to have an enhanced keymap that can process control and shift keypresses, so the changes I've been making will no longer be necessary.

JR

PS you might want to look at http://forum.xbmc.org/showthread.php?tid=61571

This describes how to modify the keypresses sent by the remote. It's still on my list of things to play with so I can't say how well it works, but if it isn't too intimidating you might be able to map the "Back" key on your remote back to the Backspace keypress.
Reply
#11
Can anyone confirm what remote works 100% (or close to) with this modded XBMC.exe? I have this remote http://cgi.ebay.com/Microsoft-MCE-Media-...230345a71e and it does not work. Just the up/down/left/right buttons work.
Reply
#12
X7JAY7X Wrote:Can anyone confirm what remote works 100% (or close to) with this modded XBMC.exe? I have this remote http://cgi.ebay.com/Microsoft-MCE-Media-...230345a71e and it does not work. Just the up/down/left/right buttons work.

Hmmm, that's a standard MS remote. And should definitely work. Have you tried using http://www.ratsauce.plus.com/showkey.zip to see what keystrokes the remote is sending?

As it happens I've just bought a standard MS remote on eBay (I developed my mods using a clone) and I'll be testing my mods to future releases of Camelot using the pukka MS remote. So I'll be able to give a definitive answer to your question in a few days.

JR
Reply
#13
First I installed your .exe and the control+shift commands work. So that is good. I then tried using showkeys with my remote and only the up/down/left/right, all the numbers and a few other buttons showed in showkey. Could I have the wrong driver for the IR receiver? I assumed since those buttons where working correctly that it wasnt that.

Any ideas?

Thanks
Reply
#14
X7JAY7X Wrote:Any ideas?

I must admit I'm stumped.

The showkey app is a very simple app that just shows any keypress messages it receives. So if it doesn't show anything when you press e.g. the Play button on the remote then your remote must not be sending a keypress.

Is any software installed for the remote? It shouldn't need any software as when you connect it Windows autodetects it as a keyboard and mouse, just like a "real" keyboard and mouse. I wonder if there is some obscure setting for the MS remote that makes it not send keypresses.

What version of Windows are you using? Is it XP Media Center edition or just standard Windows?

JR
Reply
#15
I am not running any software. I just plugged my receiver into the computer and it found the driver. It is winxp media center.

Do you know where the driver is? Maybe I have an old driver?
Reply

Logout Mark Read Team Forum Stats Members Help
Camelot Alpha 2 MCE remote support1