3
votes

I'm logged into a virtual machine using vmware workstation 6.5-7.0.1 or vmware player 3.0.0. I'm working inside the virtual machine. Then I press a key (for example the Delete-Key, but it should work with every key) inside the virtual machine.

I want to recognize the "key-press-event" in my C# application which is running outside of the virtual machine.

Can you think of any way to do this?

1
You want to recognize keystrokes made in the Virtual machine from the host running a C# application, outside of the virtual machine?t0mm13b
@youllknow: Please let me know how you get on.. :)t0mm13b
Yes, this is exactly want I want to do! I'll let you know if I find a (more or less) solution.raisyn

1 Answers

1
votes

I am not 100% sure if you can actually hook into the VM unless there's an SDK that you can download to intercept it, remember the VMWare is simulating a separate machine, but a logical one alright...The downloads are available here from VMWare.

I can only guess (I use Virtualbox myself), that a Virtual Machine (VMWare/VirtualBox) seizes control of the hooks for the keyboard I would imagine, the host system would not see them...but it would be interesting to try out... I have provided links to CodeProject for keyboard hooks...

Find the one that would suit you in terms of ease-of-use, and try hook in the keyboard, run the VMWare, with your C# application running and see if it picks up any keys within the virtual machine... I would be interested to know...

And oh yeah, +1 from me for good question and welcome to SO! :)

Hope this helps, Best regards, Tom.