Notice: This forum has been recovered from an old backup, so some content, links, and dates may be outdated. The forum is currently read-only while we restore sign-in and registration functionality. Details

If you find this forum valuable and would like to help keep it online, donations to help cover hosting and domain costs are greatly appreciated, but never expected. You can support the forum through Buy Me a Coffee or Ko-fi. Thank you for helping preserve the EventGhost community.

Over-riding/intercepting MCE buttons [HID plugin]

If you have a question or need help, this is the place to be.
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

Well after a lot of reading and trying out various tools I finally managed to find one which recognised all the buttons on my remote and gave me some extra functionaility, thank you EventGhost :-)

I do however have a few queries that I hope someone can help me with or point me in the right direction [I think it's fair to say the wiki doesn't seem to be as expansive as it could be but it does welcome use of the forums so I hope my post is well received] I'll start with the obligatory bits:
I'm running the latest EventGhost 0.3.7.r1436, my OS is Vista 64 [SP2] and just a bit of info on my remote. It's a Emprex 3009URF MCE remote [purchased from Amazon EU] which operates over RF, which I picked specifically over an IR remote because I couldn't get line of sight. Here's a image of the remote:

Image

Basically the buttons in the white boxes are recognised by EventGhost's standard HID plugin [3 instances]. The rest of the buttons emulate keyboard keys and send VK_ commands, whilst the HID buttons send a combination of VK_ and WM_ commands [according to an app called ShowKey]

I recognised with a lot of people's remotes they had been able to use the MCE plugin, which didn't work with mine, and I spotted an option within that plugin to disable the HID service which I assume allows EventGhost to take complete command of all of the remote's buttons. With the HID-plugin I do not have this option, therefore, all of the VMC related buttons like the media shortcuts and the "green button" all open an instance of VMC making them unusable for my primary intent, which is to control XBMC.

I notice that there are a large number of other plugins/actions/etc within EventGhost and I am wondering if there is someway to force EventGhost to intercept commands from the Media Center keys so that they can be used exclusively within XBMC, perhaps by forcing them to only work within the application with focus/designated application or something along those lines? Or would my remote need its own specific plugin to achieve this, like with the MCE plugin?

My second query is regarding application focus. I currently have the red teletext button set to "start application: XBMC", however on occasion it will load without focus and will require mouse/keyboard intervention in order to bring it into focus. Is there a way to force XBMC into focus, ideally by pressing the same red button again?

I'm only just getting to grips with what this application can do so I probably don't have it configured to the best of its abilities - at the moment I just have the HID plugins, XBMC plugin and a macro to open up XBMC. Judging by the content of other people's confugration trees there are likely far more additions to be made to mine, and any help or guidance is much appreciated.

Regard

MA
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by adeb2 »

Regarding your second question: You can create an action on your macro that searches for a window:
1) Select: Add Action -> Window -> Find a window (use drag finder to get the right window)
2) Select: Add Action -> Window -> Bring to front (this will bring the window found with the action in step 1 to the front/active)

I'm also new to this all but i think this should work.
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

Thanks for the reply adeb2, I think I have partially solved the issue. XBMC still opens in the bg but now when I press the red button a second time it does as you say and finds and brings the selected window into focus. The image shows the structure of the macro at the moment, I had hoped this would force all these actions on the first key press but it doesn't appear that it does it that way?

Image

Strangely, the first few times the red button would open XBMC to focus but now it appears to always open in the bg, I'm not sure what caused the switch in behaviour?
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by adeb2 »

I think the first "find window" action fires too early to find the XBMC window as it might not yet be completely started.
The action "EventGhost->Wait some time" might help if inserted after the start XBMC and before "find window" action
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

Good thinking adeb2, putting in the function did the job, thanks for the info ;-)

Any ideas on getting XBMC to use my media buttons rather than VMC? Once I sort that my remote setup should be pretty much complete.
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by adeb2 »

Looking at the plugin source for MceRemote, there is a registry key that disables the HID service.
Maybe, your RF remote has an identical registry entry that you can be disabled.
The key for the IR remote:
Registry key -
HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidIr\Remotes\745a17a0-74d3-11d0-b6fe-00a0c90f57da
Registry value - CodeSetNum1
Registry value - CodeSetNum2
Registry value - CodeSetNum3
(where the CodeSetNumX entries must be deleted )

You might have some entries like HKEY_LOCAL_MACHINE\SYSTEM\CurrentControlSet\Services\HidRf

I found some additional info, which also has a utility to tweak settings but it might only be for XP media center:
http://www.eggheadcafe.com/software/asp ... e-can.aspx
http://lb1.www.ms.akadns.net/downloads/ ... laylang=en

Good luck
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

Hey, thanks for the suggestions. I've taken a look at the registry but didn't spot anything that I could discern as being RF related. I also checked out the MC tweak but couldn't find anything to adjust remote settings beyond assiging a specific remote and allowing universal remote support - never had a problem with this remote using VMC, everything worked as it should, just the software wasn't any good :S

To assure you I haven't been sat idly by I have been actively searching for solutions. I had hoped that EventGhost, due to its comprehensive appearance would be able to offer some elegent solution to this problem but I haven't been able to come across anything as of yet, at least not for the HID plugin. This is perhaps because it requires the service in order to function whilst the MCE plugin can disable it and thus, as far as I can gather from other posts, frees all the buttons up to be used however one wishes. I am residing myself to the fact that this may not be possible with the HID-plugin.

I have therefore been looking more towards the XBMC/VMC side of things. I came across an interesting post on the XBMC forums where people had been seeking solutions to the "green buttons" use in particular. As the thread progressed a way of replacing the default ehshell.exe that launches VMC when the green button is pressed with a batch file to start XBMC had been proposed. I decided to give this a try and was pleased to find that I could now launch XBMC with the green button! Assuming the media shortcuts had now lost their path to VMC I decided to give XBMC a try with them. Sure enough they would take me directly to videos, tv shows, etc but upon closing XBMC I found that they had also been queing up queries to ehshell.exe[/selected menu] Unfortunately this meant XBMC kept on opening again and again everytime I closed it down :S Not quite the outcome I had hope for.

I think my next step is to destroy the new link to XBMC and try and let EventGhost do all the button handling, hopefully this should put me one step closer to using these buttons as I want. I will post back with progress, the intention being that it may be of some help to others in my situation. Thanks again for the help adeb2 ;-D
adeb2
Posts: 11
Joined: Tue Feb 16, 2010 1:16 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by adeb2 »

I understand your struggle. I for example need my MCE IR remote to work without Windows Media Center having focus. WMC however is a horri* ehh, lacks a decent API for remote control. After working all day on it, I now think switching to MediaPortal might be the only solution.

Anyway, good luck, if I come across anything that might help I sure let you know.

Arend
marcaronson408
Posts: 8
Joined: Mon Feb 15, 2010 10:36 pm
Location: USA

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by marcaronson408 »

I did some searching, hoping to find you an eventghost plugin that works with your remote but no luck n that front. I did find a developer who said he just added Emprex 3009 support to a package called Intelliremote. I have no idea of Intelliremote is any good as I am using Eventghost successfully with my PHX01RN remote, but here's the link in case it helps you out -- http://melloware.com/products/intelliremote/

Marc
scat
Posts: 31
Joined: Sat May 05, 2007 12:55 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by scat »

try this

turn off Media Center from reacting to a MSC keyboard or IR remote

click Start | Control Panel | Default Programs | Set Program access and computer defaults

then select the option for Custom
expand chevron at right side of screen
then scrool down for category: Choose a default media player
find: Windows Media Center
then uncheck option: Enable access to this program
beside: Windows Media Center

Scat
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

@ adeb2, I hope you sorted the issue with your remote without WMC having focus. I considered MediaPortal as it was an offshoot of XBMC, in the end I decided I didn't need the TV support and capability for external media players/codecs.

@ marcaronson408, I had a look at that intelliremote program, it does indeed say that it supports my remote and there is a thread on their forums discussing its integration. Had I not been able to find a work-around thanks to Scat's advice I probably would have considered purchasing their software. I think the main issue is that my remote has only been around a couple of months so support is only just making its way into software such as Intelliremote - with it being pay software there is obviously more incentive for the developer's to provide that support as soon as possible.

@ Scat, thanks a lot, your advice finally got it sorted. I had tried severing all links to the ehshell.exe but that only meant that when I pressed one of the offending buttons I would get a dialog pop up warning me of an error trying to open Media Center. By following your instructions nothing pops up when the Media buttons are pressed and I am free to assign them in EG.

Thanks alot guys for all your help :-D
defender013
Posts: 10
Joined: Mon Feb 15, 2010 10:53 am

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by defender013 »

Hi all,

I am going through a similar problem on my setup and was hoping to get your expert input, since it sounds like most of you have one way or another resolved the HID remote problem.

The problem I am having right now (my setup is xbmc + KMPlayer) is that KMPlayer always responds to my remote HID commands. So even if through EG I bind them to a different action, the default HID command is still taken.

For example, the "previous" button on my remote I have bound to skip backwards 1 minute, however, KMPlayer will always recognize this first as a "previous file" command before my re-bound command.

I know this is similar to the problem you have brought up where we try to use something to intercept the HID commands, but my remote device is very generic and I haven't been able to find or think of way to stop the command from being sent to KMPlayer. Is this something I should be investigating inside KMPlayer? or could i find a way outside to circumvent it?

Many Thanks
martian_aphid
Posts: 6
Joined: Thu Feb 18, 2010 10:28 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by martian_aphid »

Hey defender013, basically what I ended up doing was turning off VMC's response to my remote so only EG was controlling it. Since you are using kmplayer as th frontend for viewing videos I think you need to look at a way of preventing it from responding to your remote. In MPC, which is my standard video player there is a options page where I can set what responses to keyboard shortcuts or remote actions is makes. I assume kmplayer has a similar thing, try to find out if you can disable it or it might be that you remote is sending keyboard shortcuts in which case it may be that you need to alter them in kmplayer so that they aren't triggered.

Hope that helps.

MA
Chrisb
Posts: 1
Joined: Wed May 12, 2010 8:24 am

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by Chrisb »

Using the same Emprex 3009URF remote on Windows XP professional, SP3, I tried opening Control panel -> Administrative Tools -> Services, and stopping 'HID Input Service' makes this problem go away. It is also necessary to set the startup type to 'Manual' rather than 'Automatic' to stop it from coming back at the next reboot!

Hope this helps - please post here if it works for you as it looks as if quite a few people have this or similar problems.
wyvernshill
Posts: 1
Joined: Fri Aug 06, 2010 12:42 pm

Re: Over-riding/intercepting MCE buttons [HID plugin]

Post by wyvernshill »

I know i'm being a bit lazy but seeing as how "difficult" it is to set up this remote "Emprex 3009 URF" ...

Can you post the configuration file you used in eventghost so i can use it directly in evenghost and XBMC ?

I'm planning on using XBMC and windows 7 64 bit and just bought this remote (should be here in a few days) and i would love to use it without having to dig around like you had to do.

Thanks in advance !
Post Reply