在vmware虚拟机中运行时如何获取键盘输入? [英] How to get keyboard input while running in vmware virtual machine?

查看:1108
本文介绍了在vmware虚拟机中运行时如何获取键盘输入?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述

我已使用vmware工作站6.5-7.0.1或vmware player 3.0.0登录到虚拟机. 我正在虚拟机中工作. 然后,我按下虚拟机内部的一个键(例如Delete-Key,但它应该与每个键一起使用).

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.

我想识别在虚拟机外部运行的C#应用​​程序中的按键事件".

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

您能想到任何方法吗?

推荐答案

除非您有可以下载的SDK来拦截它,否则我不确定100%是否可以真正挂接到VM,请记住VMWare在模拟一个单独的机器,但逻辑上可以...可以从 VMWare 下载.

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.

我只能猜测(我自己使用Virtualbox),一个虚拟机(VMWare/VirtualBox)抓住了我想像中的键盘钩子的控制权,宿主系统看不到它们……但是这很有趣试用...我提供了到CodeProject的用于键盘挂钩的链接...

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...

  • 'Using Windows Messages to implement global system hooks'
  • 'EasyHook - The reinvention of Windows API Hooking'
  • 'Global System Hooks in .NET'
  • 'Global Mouse and Keyboard Library'

找到一个适合您的易用性,并尝试挂接键盘,运行VMWare,并运行C#应用程序,看看它是否在虚拟机中拾取了任何键...我想知道...

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...

哦,是的,我的问题+1,欢迎您加入! :)

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

希望这会有所帮助, 最好的祝福, 汤姆.

Hope this helps, Best regards, Tom.

这篇关于在vmware虚拟机中运行时如何获取键盘输入?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

查看全文
登录 关闭
扫码关注1秒登录
发送“验证码”获取 | 15天全站免登陆