Kodi Community Forum

Full Version: Solution for capturing Play/Pause key when NOT active
You're currently viewing a stripped down version of our content. View the full version with proper formatting.
I have a dual-monitor configuration at home and prefer to use XBMC (in my secondary monitor) as my main media player due to its great management abilities. But even with the appropriate media remote add-on, it responds to the windows Play/Pause command (on my keyboard, and I've also mapped it to a button my mouse) ONLY when XBMC is the active app. Other media applications (such as WMP) respond to it regardless of whether they have focus, which is the point, as if I can click in the window, I'm already within range to click the on-screen button.

Does anyone have a suggested solution to this, to get XBMC to pay attention to this command when not the foreground-selected running application?
Event Ghost.
You can add the XBMC plugin which sends the commands direcly to XBMC and bind any key to a special action.
Eventghost is the only way I know of to do this.

In Windows MCE remotes normally work by sending key presses or appcommand messages. In both cases the message is only sent to the app that has the focus, so XBMC won't receive the button press unless it has the focus. Eventghost can detect keypresses regardless of what app receives the keypress, so it can forward the keypress to XBMC even when XBMC doesn't have the focus.
I have the same issue as TurboFool where I have dual monitors running. Just the same I would like to be able to use my keyboard (http://www.newegg.com/Product/Product.as...920-000914) to be able to control XBMC when not the active screen. The two extended questions I have are

1)Will eventhost override other applications that make use of the same keyboard functions? (ie. pause/play media button)
2)How do you use EventGhost? I get the basics but I have no idea how to set it up. Is there a plugin that you have already completed that I can make use of or is it different for every user?

This was the closest I got on these forums, on the EvetnGhost forums I only see posts related to remote controls rather than a keyboard. Any help is much appreciated.
1. Start Eventghost.
2. On the right hand side you can see Configuration Tree. Right Click 'Autostart' > 'Add Plugin'
3. Select XBMC2 under 'Program Controls'
4. Now you can see 'Plugin: XBMC2' under 'Autostart'
5. Similarly add a Plugin for 'Keyboard' under 'Remote Receiver'
5. Look below for a node named 'XBMC2'. It has the icon of folders.
6. Expand xbmc2 to Actions > Media Playing > Play. Under you should see XBMC2: Play
7. On the left hand side there is a log window. Press the Media button for play on your keyboard and the log will show a Keyboard.Play event. I'm not sure what exactly is the code as I don't have a media keyboard. But you can see for every keyboard presses a Keyboard event is generated like Keyboard.A when you press button A. Drag this event and drop it under XBMC2: Play in step 6
8. Start xbmc and test.
Thanks baijuxavior, that's awesome. If only it would work on the first try. Ha! I got 1-6 done, but when I look at the log window it shows all the events such as when I "Mouse.MiddleButton", select a new top window "Task.Activated.EventGhost", hit the space bar, F11 "Keyboard.F11" and so on. On my keyboard the pause/play button is F11, but it's Fn+F11. So it's an alternative function of F11. Which apparently does not show up in the event log. Now as a test I tried one of the other function keys, Fn+F7 opens up calculator which showed int he event log as "Task.Activated.calc". So it registered the event of the opening of the app, but not the keypress.

Any idea on how to manually type in a alternate function keypress?

p.s. You should see the event log after typing this response too, LOL.
You can delete or disable all other plugins except xbmc2 under Autostart . For multimedia keys, try 'generic hid' plugin instead of keyboard as given in this thread - http://www.eventghost.org/forum/viewtopi...f=4&t=2889

http://www.eventghost.org/forum/viewtopi...f=2&t=2579