Emulate Keystroke not passing through when vmware is active

If you have a question or need help, this is the place to be.

Emulate Keystroke not passing through when vmware is active

Postby medowl » Wed Jan 18, 2012 8:07 am

I have one computer on which i do everything, its my media player with XBMC but also my test station running VMWare Workstation to test out new stuff..
VMWare Workstation runs beside XBMC and EventGhost, so I'm not trying to get it working inside a VM.

I use a MS MCE remote controller and use the XBMC2 plugin which works just fine, some of the commands from the plugin I've replaced with emulated keystrokes because I find the behavior within XBMC more appropriate. like "XBMC2: Select" -> "Emulate Keystroke: {Enter}" & "XBMC2: Back" -> "Emulate Keystroke: {Backspace}"...

Now this works nicely when VMWare Workstation is not running any machines in the background, but when VMWare is running a machine the emulated keystrokes never make it to XBMC. the actions using the XBMC2 Plugin work just fine! also the logs in EG show normal behavior, the RC command is received just and the actions are sent. its like the VMWare process is somehow stealing those key emulations..

anyone experienced the same thing ? or even better, has a good solution ? thnx a lot!

EG 0.4.1.r1544
Windows7 x64 SP1
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby jonib » Wed Jan 18, 2012 10:41 am

medowl wrote:I use a MS MCE remote controller and use the XBMC2 plugin which works just fine, some of the commands from the plugin I've replaced with emulated keystrokes because I find the behavior within XBMC more appropriate. like "XBMC2: Select" -> "Emulate Keystroke: {Enter}" & "XBMC2: Back" -> "Emulate Keystroke: {Backspace}"...
Select and Back are they from the XBMC2\Buttons or XBMC2\Actions folder? If it's from the XBMC2\Actions folder try the ones in the XBMC2\Buttons\Remote folder.
And also you can change how the actions in XBMC2\Buttons behave by modifying remote.xml keymap within XBMC config files.

I don't use VMWare Workstation so can't help with your specific question.

jonib
Last edited by jonib on Fri Jan 20, 2012 2:40 am, edited 2 times in total.
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 714
Joined: Thu Mar 26, 2009 9:33 pm

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Thu Jan 19, 2012 8:36 am

i tried them both : XBMC2\Actions & XBMC2\Remote , but none do exactly what i want them to do.
I'll try the remote.xml keymapping workaround, thanks for the suggestion.

still weird tho that vmware somehow steals the emulated keystrokes from reaching the designated program..
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby jonib » Thu Jan 19, 2012 5:40 pm

medowl wrote:i tried them both : XBMC2\Actions & XBMC2\Remote , but none do exactly what i want them to do.
I'll try the remote.xml keymapping workaround, thanks for the suggestion.
I could add the Backspace and enter keyboard buttons to my plugin, but I would like to know why you prefer them?

Edit: I have added Enter and Backspace to my XBMC2 plugin, get the updated version from here.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 714
Joined: Thu Mar 26, 2009 9:33 pm

Re: Emulate Keystroke not passing through when vmware is act

Postby Livin » Fri Jan 20, 2012 6:10 am

I run VMware workstation/player on my HTPC and EG works perfectly fine for me. I don't know what version you run, but if it is 7 or 8 (only versions I've used on the same machine with XBMC & EG) then I suspect your problem is that you have a VMware setting capturing all keyboard commands and/or the way you are invoking VMware makes it retain control of the keyboard... thus, it captures all keystrokes.

What is your Enhanced Virtual Keyboard setting set to?

Three easy tests...

1) after you launch the VM, open Task Manager and kill vmware.exe ... it will close the GUI but your VM will still run :then: See if your Emulate Keystrokes works.
- You can restart vmware.exe and connect back to your VM when you want to.
`
2) launch your VM, go into into... move the cursor around, type some stuff... then release mouse control from the VM by pressing CONTROL-ALT :then: See if your Emulate Keystrokes works.

3) script the launch of the VM, this way you never actually touch the VM. This requires you install VIX and run a script like this...
"C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe" -T player start C:\Users\ha\Documents\XP_lite_base\XP_lite_base.vmx
... you'll need to change player to workstation (I use player since it is less overhead)
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Fri Jan 20, 2012 8:28 am

jonib wrote:
medowl wrote:i tried them both : XBMC2\Actions & XBMC2\Remote , but none do exactly what i want them to do.
I'll try the remote.xml keymapping workaround, thanks for the suggestion.
I could add the Backspace and enter keyboard buttons to my plugin, but I would like to know why you prefer them?

Edit: I have added Enter and Backspace to my XBMC2 plugin, get the updated version from here.

jonib


Thanks a lot Jonib! will test the new plugin this weekend.

why i prefer enter over select is because when playing a video enter behaves as the menu, opening the top controls, which i use a lot to download subtitles & backspace closes that menu again. so instead of having to use different rc keys for select/menu/back/escape I can actually control all of XBMC with just 6 keys : right/left/up/down/enter/backspace. (plus volume, pageup/pagedown, etc..)

where as select in playing mode, changes the displaymode, a function i hardly ever use..
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Fri Jan 20, 2012 8:40 am

Livin wrote:I run VMware workstation/player on my HTPC and EG works perfectly fine for me. I don't know what version you run, but if it is 7 or 8 (only versions I've used on the same machine with XBMC & EG) then I suspect your problem is that you have a VMware setting capturing all keyboard commands and/or the way you are invoking VMware makes it retain control of the keyboard... thus, it captures all keystrokes.

What is your Enhanced Virtual Keyboard setting set to?

Three easy tests...

1) after you launch the VM, open Task Manager and kill vmware.exe ... it will close the GUI but your VM will still run :then: See if your Emulate Keystrokes works.
- You can restart vmware.exe and connect back to your VM when you want to.
`
2) launch your VM, go into into... move the cursor around, type some stuff... then release mouse control from the VM by pressing CONTROL-ALT :then: See if your Emulate Keystrokes works.

3) script the launch of the VM, this way you never actually touch the VM. This requires you install VIX and run a script like this...
"C:\Program Files (x86)\VMware\VMware VIX\vmrun.exe" -T player start C:\Users\ha\Documents\XP_lite_base\XP_lite_base.vmx
... you'll need to change player to workstation (I use player since it is less overhead)


thanks for the answer Livin, i'll try your suggestions to try and find out more about it..
i've tried killing vmware-vmx.exe, that of course works, but also kills all of the running VMs, so not really an option..

there's another thing though. before i had this computer (2 months now..) i was running my VMs on a standalone ESXi machine, so no VMWare workstation (I'm using version 7 btw) on my main/XBMC computer, but just the VMware vSphere Client to connect to the ESXi machine. When ever the vSphere Client was running (even minimized to the tray) the same thing happened in EG, Emulated keypresses wouldn't reach XBMC. But in that setup it was easy, just kill the vSphere client, as all the VMs would just keep running on the ESXi machine anyway, no harm done, so i never really payed much attention to it.

but now that I'm running VMs on my actual machine its pretty annoying, because i don't want to have to stop them.
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby jonib » Fri Jan 20, 2012 8:43 am

medowl wrote:why i prefer enter over select is because when playing a video enter behaves as the menu, opening the top controls, which i use a lot to download subtitles & backspace closes that menu again. so instead of having to use different rc keys for select/menu/back/escape I can actually control all of XBMC with just 6 keys : right/left/up/down/enter/backspace. (plus volume, pageup/pagedown, etc..)
Interesting. That's why I like options we all use stuff slightly differently, I use the displaymode button all the time as videos just don't use the correct aspect ratio, specially on Youtube.

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 714
Joined: Thu Mar 26, 2009 9:33 pm

Re: Emulate Keystroke not passing through when vmware is act

Postby Livin » Fri Jan 20, 2012 4:29 pm

medowl wrote:i've tried killing vmware-vmx.exe, that of course works, but also kills all of the running VMs, so not really an option..


You did not follow my instructions... kill VMWARE.EXE and nothing else. It will only kill the UI and keep the VM running.

I suspect your problem is isolated to your setup... I run VMware Player 24x7 (runs my home automation software) on my HTPC which runs XBMC & Win7 MC and I have zero problems with VMware stealing keystrokes, focus, etc... and I don't even kill the UI, I just have it minimized (but this does not matter, works fine even when it is not at min).

I use EG to launch Player using the command I gave you.
setup... XBMC, W7MC for DVR & Live OTA TV, JRMC for multi-zone audio, EG, MiCasaVerde Vera3, USB-UIRT IR receiver, Harmony remote, 5.2 home theater system
User avatar
Livin
Experienced User
 
Posts: 749
Joined: Wed Oct 08, 2008 4:56 am

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Sat Jan 21, 2012 1:59 am

Livin wrote:You did not follow my instructions... kill VMWARE.EXE and nothing else. It will only kill the UI and keep the VM running.

I suspect your problem is isolated to your setup... I run VMware Player 24x7 (runs my home automation software) on my HTPC which runs XBMC & Win7 MC and I have zero problems with VMware stealing keystrokes, focus, etc... and I don't even kill the UI, I just have it minimized (but this does not matter, works fine even when it is not at min).

I use EG to launch Player using the command I gave you.


i meant to say i tried killing vmware-vmx.exe before you even suggested it... and that worked at that time.
anyway, i now tried killing vmware.exe but that didn't help...

though i found out something interesting: it depends on what VM i was last active in with keyboard/mouse if 'emulated keystrokes' will work or not..
i have a Windows Server 2008 VM, if i take over the console inside vmware workstation, type some stuff, move the mouse etc.. then release the mouse with Ctrl-Alt and bring up XBMC then Emulated Keystrokes don't work! though if i take over the console of a linux VM, type some stuff, release the mouse with Ctrl-Alt , bring up XBMC, Emulated Keystrokes do work!

if i take over the windows 2008 machine, release, emulated keystrokes dont work
if i take over the windows 2008 machine, release, take over the linux machine, release, emulated keystrokes do work
no matter if vmware workstation is still active or killed

so i thought it might be vmware tools installed within the VM, because they were installed inside the win2008 machine and not inside the linux machine. so i uninstalled the vmware tools from the win2008 vm: no difference. i also have a windows XP VM with vmware tools installed, but if thats the last machine i take over and release from emulated keystrokes also work!
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Sat Jan 21, 2012 5:58 pm

jonib wrote:
medowl wrote:why i prefer enter over select is because when playing a video enter behaves as the menu, opening the top controls, which i use a lot to download subtitles & backspace closes that menu again. so instead of having to use different rc keys for select/menu/back/escape I can actually control all of XBMC with just 6 keys : right/left/up/down/enter/backspace. (plus volume, pageup/pagedown, etc..)
Interesting. That's why I like options we all use stuff slightly differently, I use the displaymode button all the time as videos just don't use the correct aspect ratio, specially on Youtube.

jonib


i've tested you new plugin and it works great !! now it doesn't matter anymore what vmware is doing!
only i more request : could you maybe also add <tab> as a separate key ? i find it better as home, as <tab> toggles the 'home menu' in fullscreen mode, and goes back to 'now playing' if you hit it again. with home there's no way to get rid of the side menu again.
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am

Re: Emulate Keystroke not passing through when vmware is act

Postby jonib » Sat Jan 21, 2012 6:43 pm

medowl wrote:only i more request : could you maybe also add <tab> as a separate key ? i find it better as home, as <tab> toggles the 'home menu' in fullscreen mode, and goes back to 'now playing' if you hit it again. with home there's no way to get rid of the side menu again.
Well XBMC2\Buttons\Remote\Display works the same as Tab, but I'll add it just because you asked nicely (and because I added it before I checked the difference between Tab and Display :oops: ).

jonib
XBMC2 plugin to control XBMC. If you want to flatter me Image
jonib
Plugin Developer
 
Posts: 714
Joined: Thu Mar 26, 2009 9:33 pm

Re: Emulate Keystroke not passing through when vmware is act

Postby medowl » Wed Jan 25, 2012 8:56 am

jonib wrote:Well XBMC2\Buttons\Remote\Display works the same as Tab, but I'll add it just because you asked nicely (and because I added it before I checked the difference between Tab and Display :oops: ).

jonib


ah right, Display works fine too! missed that one...
anyway thnx again for the quick mod to your plugin. i'm totally happy now ! :)
medowl
 
Posts: 8
Joined: Wed Jan 18, 2012 7:51 am


Return to General Support

Who is online

Users browsing this forum: No registered users and 3 guests