• 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 8
[WINDOWS] HOW-TO get MCE remote to work in XBMC without other programs
#46
Again, thanks for responding.

To >>X<<,

I really appreciate the link to that util, as it may help me partially.
My problem stems from my particular remote sending a combination of keyboard strokes (WM_KEYDOWN), as well as what I would call "special" commands, (WM_APPCOMMAND).

The scary thing i dont' get about AHK is what portion of it do you use to detect what the remote is sending when a button is pushed?

Also, any idea how to map WM_APPCOMMAND to just normal keyboard presses?

To JHSRennie,

I really appreciate your hard work, again due to my issue above (the fact my remote does a weird combination of both exotic keyboard keys and appcommands), I really wouldn't be ideal to test the ad-hoc support of CNTRL, SHIFT, and ALT (my remote doesnt use ANY of those).

Here is what my remote uses:

Using Eventghost :

All in Win764bit with the following:
Using the Generic HID plugin. On selection, it allows me to select a "IR603 HID MCE" device, manafacturer being "Formosa21". Because I know the remote is sending keyboard commands, I also have the "Keyboard" plugin loaded. I am able to get, listed in order the buttons on my remote are labeled, (again, remember I have MC disabled):

Power Button: nothing! But god damn, if this doesn't put the computer in "suspend" mode...who in their right mind would want this??
Pictures: HID 73
Radio: HID 80
Videos: HID 74
Music: HID 71

Rec: nothing!
Pause: nothing!
Stop: nothing!
Skip Back: nothing!
Play: nothing!
Skip Fwd: nothing!
Rwd: nothing!
Fwd: nothing!

Green Button: HID 13
Back: nothing!
More: nothing!

Vol Up: nothing!
Vol down: nothing!
Chan up: nothing!
Chan down: nothing!
Up arrow: Keyboard Up
Down arrow: Keyboard Down
Left arrow: Keyboard Left
Right arrow: Keyboard Right
OK: Return
Mute: nothing!

Rec TV: HID 72
Guide: nothing!
Live TV: HID 37
DVD Menu: HID 36

Number keys equal their expected keyboard numbers.

Button *: (3 events!)
Keyboard L Shift
Keyboard L Shift + 8
Keyboard 8

Button #: (3 events!)
Keyboard L Shift
Keyboard L Shift + 3
Keyboard 3

Clear: Keyboard Escape
Enter: Keyboard Return

Using Showkey.exe, it gives me these responses to the remote buttons (only listing those that did not give me a response using default HID in Eventghost):

Rec: WM_APPCOMMAND 48 : Windows XP SP1 : Begin recording the video stream
Pause: WM_APPCOMMAND 47 : Windows XP SP1 : Pause
Stop: WM_KEYDOWN : vkey 0xB2 (178), scancode 0x0 (0) - VK_MEDIA_STOP
Skip Back: WM_KEYDOWN : vkey 0xB1 (177), scancode 0x0 (0) - VK_MEDIA_PREV_TRACK
Play: WMAPPCOMMAND 46 : Windows SP SP1 : Begin playing at current position
Skip Fwd: WM_KEYDOWN : vkey 0xB0 (176), scancode 0x0 (0) - VK_MEDIA_NEXT_TRACK
Rwd: WM_APPCOMMAND 50 : Windows XP SP1 : Go backward in a stream at higher rate of speed
Fwd: WM_APPCOMMAND 49 : Windows XP SP1 : Increase the rate of speed

Back: WM_KEYDOWN : vkey 0xA6 (166), scancode 0x0 (0) - VK_BROWSER_BACK
More: nothing, STILL!

Vol Up: WM_KEYDOWN vkey 0xAF (175), scancode 0x0 (0) - VK_VOLUME_UP
Vol down: WM_KEYDOWN vkey 0xAE (174), scancode 0x0 (0) - VK_VOLUME_DOWN
Chan up: WM_APPCOMMAND 51 : Windows XP SP1 : increment channel value
Chan down: WM_APPCOMMAND 52 : Windows XP SP1 : decrement channel value
Mute: WM_KEYDOWN vkey 0xAD (173), scancode 0x0 (0) - VK_VOLUME_MUTE

Guide: nothing, STILL!

Interestingly, the Up, Down, Left, Right keys, which were detected in Eventghost as Keyboard arrow keys, are detected in Showkey.exe as WM_KEYDOWN vkey 0x?? [where ?? are the numbers 25, 26, 27, 28 respectively for each arrow] (?? [where ?? is 37, 38, 39, 40], scancode 0x?? [where ?? is 4B, 48, 4D, 50] (?? [where ?? is 75, 72, 77, 80] - VK_?? [?? is LEFT, RIGHT, UP, DOWN].

So as you can see, my remote does some weird commands...i might have to use two different solutions, running in parralel (Eventghost and AutoHotKey), to get this things working right, still missing the ability to map WM_APPCOMMAND....

Sigh...
Reply
#47
My test build allows you to map any keys including the VK_MEDIA_PREV_TRACK etc keys, and even includes a new version of Showkey that gives you the keyboard config to put in keyboard.xml.

Also I've added support for a few extra APPCOMMAND codes, though XBMC beta2 already supports most of the APPCOMMANDs.

With these two I would have thought you should be able to get your remote working OK.

JR
Reply
#48
elgen

Anything that has a key id can be used with AutoHotKey forget whats on the end of the line VK_WHATEVER_ETC

So your stop key is

Stop: WM_KEYDOWN : vkey 0xB2 (178), scancode 0x0 (0) - VK_MEDIA_STOP

AutoHotKey Script

;Stop
vkb2::
{
SendInput x
return

As you can see that will map the vkey 0xB2 to x key stroke, which is already correct in the script in the link

Looking at jhsrennie's comment you wont need AutoHotKey anyway, many thanks jhsrennie for your work will certainly make life easier for windows users, do you think it would be possible to add right and left mouse buttons as I know some remotes include these as I said my info button is right mouse click ?
Reply
#49
jhsrennie Wrote:My test build allows you to map any keys including the VK_MEDIA_PREV_TRACK etc keys, and even includes a new version of Showkey that gives you the keyboard config to put in keyboard.xml.

Also I've added support for a few extra APPCOMMAND codes, though XBMC beta2 already supports most of the APPCOMMANDs.

With these two I would have thought you should be able to get your remote working OK.

JR


OK, I will be definetely checking this out when I get home today. One quick question, is your test build built on the latest beta, camelot beta 2? If not, which is it built on? (I had heard that the new beta2 did add some support for remotes, installed, and indeed some more buttons do work, but using your test build to provide even more support will be awesome!)

Thanks very much to you!

Also, thanks very much >>X<<, you also have been very helpful. I played with AHK and got it, in conjunction with Eventghost, to launch XBMC at the press of my Green Button! Yay!
Reply
#50
jhsrennie Wrote:My test build allows you to map any keys including the VK_MEDIA_PREV_TRACK etc keys, and even includes a new version of Showkey that gives you the keyboard config to put in keyboard.xml.

Also I've added support for a few extra APPCOMMAND codes, though XBMC beta2 already supports most of the APPCOMMANDs.

With these two I would have thought you should be able to get your remote working OK.

JR

Now using your test build. Awesome stuff! Most of the thing just works, and I am using Eventghost to trigger off of some of the oddball remote buttons sending just HID commands...Smile

Couple buttons STILL not working are:

Pause: (my remote sends WM_APPCOMMAND 47)
Play: (WM_APPCOMMAND 46)
FFW: (WM_APPCOMMAND 49)
RWD: (WM_APPCOMMAND 50)

Is there any way to map those appcommands?
Reply
#51
elgen Wrote:Couple buttons STILL not working are:

Hmm. The appcommand codes you mention are (copying and pasting from the Visual C++ include file):

#define APPCOMMAND_MEDIA_PLAY 46
#define APPCOMMAND_MEDIA_FAST_FORWARD 49
#define APPCOMMAND_MEDIA_REWIND 50

and the slightly puzzling thing is that beta2 (and my test build) does process those appcommands so they should work. I don't have a remote that sends that appcommand, but give me a day or two and I'll see if I can mock up an applet to simulate the remote and send the appcommands to see what happens.

JR
Reply
#52
@elgen: grab a copy of http://www.ratsauce.plus.com/FakeAppCommand.exe (NB the case matters). This is a command line app that sends WM_APPCOMMAND messages to XBMC. Run my build of XBMC and if necessary switch it to running in a window pressing alt-Return. Select an MP3 or video but don't start playing yet.

Now run a command prompt and cd to wherever you downloaded FakeAppComand.exe. Type:

FakeAppCommand play

and whatever track is selected in XBMC should start playing. If it does, this shows the appcommand handling is working. Likewise "FakeAppCommand ff" and "FakeAppCommand rew" should fast forward and rewind. Type "FakeAppCommand -?" for a list of all the commands.

Assuming all FakeAppCommand commands work, that means the APPCOMMANDS set by your remote ought to work too. If debugging is on you should see the corresponding APPCOMMAND messages in xbmc.log.

JR
Reply
#53
Sweet, I will post back results when I am able to try this tonight...thanks!
Reply
#54
Well, after trying your suggestion, I think I know the problem with those specific keys. (Pause: WM_APPCOMMAND 47; Play: WM_APPCOMMAND 46; FFW: WM_APPCOMMAND 49; and RWD: WM_APPCOMMAND 50)...

The problem lies in the fact I stupidly tested on Windows 7, where everything worked, and then went to Server 2003 (which is ultimately what I am wanting to run XBMC on permanently).

Using FakeAppCommand, it works fine, even in Server 2003. The problem is apparently the underlying Windows "driver" (just whatever is default, as it came with no specific driver) for the remote's USB IR receiver, does not relay those APPCOMMANDS in Server 2003, but does so fine in XP and Win 7. Even ShowKey.exe does not show anything when I use those buttons in Server 2003, whereas it DOES show those APPCOMMANDS in XP and Win 7 (which is how I know what the buttons are doing).

So, unless anyone has an idea on either hacking (difficulty: hard!) the .dll's or whatever is being used as a driver for a generic HID IR device in Windows 2003, or possibly overwriting them from XP Pro or Win 7 (maybe easier and more likely), I am out of luck with those buttons....ahh well, I wanted to try Server 2008 anyway, LOL...

Thanks for your help!

PS, has anyone noticed playing music in camelot beta 2 of XBMC with Milkdrop set as the visualization pretty much hangs XBMC? Or is it just me?
*Edit. Most likely another symptom of me running in Server 2003...bah!
Reply
#55
Aha, yes I used to run W2k3 on my workstations and it is missing some multimedia stuff. I now run Server 2008 R2 and it also is missing some multimedia stuff (exactly what is missing I haven't investigated). Fair enough I suppose since they're server OSs. I use XBMC on a Revo with XP.
Reply
#56
I just used the Program "Showkey" to see what commands my RC sends out, but it seems that not all are recognized because for many buttons it shows nothing??
Reply
#57
Nitehawk Wrote:I just used the Program "Showkey" to see what commands my RC sends out, but it seems that not all are recognized because for many buttons it shows nothing??

Hi Nitehawk. What model is your remote? If it is an official MS remote, or a fully compatible, it doesn't send keystrokes by default but it can be configured to do so.

JR
Reply
#58
jhsrennie Wrote:Hi Nitehawk. What model is your remote? If it is an official MS remote, or a fully compatible, it doesn't send keystrokes by default but it can be configured to do so.

JR

No, it is the remote that was shipped with the Asus EB1501.
Reply
#59
Nitehawk Wrote:No, it is the remote that was shipped with the Asus EB1501.

I think that's a Philips MCE compatible. Have a look at mceremote.zip from http://sourceforge.net/projects/xbmcmce/files/ and see if it helps. NB read the instructions carefully and make sure you have a system state backup before changing the registry.

JR
Reply
#60
jhsrennie Wrote:I think that's a Philips MCE compatible. Have a look at mceremote.zip from http://sourceforge.net/projects/xbmcmce/files/ and see if it helps. NB read the instructions carefully and make sure you have a system state backup before changing the registry.

JR

Thanx, but unfortunately it does not work :-( RC does act as usual, nothing changed...
Reply
  • 1
  • 2
  • 3
  • 4(current)
  • 5
  • 6
  • 8

Logout Mark Read Team Forum Stats Members Help
[WINDOWS] HOW-TO get MCE remote to work in XBMC without other programs0