在vmware虚拟机中运行时如何获取键盘输入?
我使用 vmwareworkstation 6.5-7.0.1 或 vmwareplayer 3.0.0 登录虚拟机。 我正在虚拟机内工作。 然后我按下虚拟机内的一个键(例如删除键,但它应该适用于每个键)。
我想识别在虚拟机外部运行的 C# 应用程序中的“按键事件”。
你能想出什么方法来做到这一点吗?
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?
如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论
评论(1)
我不是 100% 确定你是否真的可以连接到虚拟机,除非有一个可以下载的 SDK 来拦截它,记住 VMWare 正在模拟一台单独的机器,但逻辑上的机器好吧......可以从这里下载 < a href="http://communities.vmware.com/community/developer/" rel="nofollow noreferrer">VMWare。
我只能猜测(我自己使用 Virtualbox),虚拟机(VMWare/VirtualBox)夺取了我想象的键盘钩子的控制权,主机系统不会看到它们......但是尝试一下会很有趣...我提供了 CodeProject 键盘挂钩的链接...
找到一个在易用性方面适合您的库 -使用,并尝试挂钩键盘,运行 VMWare,运行 C# 应用程序,看看它是否在虚拟机中拾取任何键...我很想知道...
哦,是的,我的 +1对于好问题,欢迎来到SO! :)
希望这有帮助,
此致,
汤姆.
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.