有没有办法找到按键,物理键盘或虚拟键盘的来源? [英] Is there a way to find the source of the Key pressed, Physical Keyboard or Virtual Keyboard ?

查看:83
本文介绍了有没有办法找到按键,物理键盘或虚拟键盘的来源?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!

问题描述


我有一个WPF应用程序 我也在支持Touch的设备(如Moxa面板)中使用它。我可以使用物理键盘或虚拟键盘进行输入。如果用户按下一个键(比如在Keydown事件中),我怎么知道输入是来自物理
键盘还是虚拟键盘?


其他方式,如何知道该用户使用的是物理键盘还是虚拟键盘?


提前致谢,


Minaketan


解决方案

Hi MinaketanBiswal,


通过我的搜索,KeyDown  当用户按下物理键时会引发事件,我也是找到一个你可以看到
的文件:


https://stackoverflow.com/questions/587840/how-to-distinguish-between-multiple-input-devices-in-c -sharp / 589326#589326



最好的问候,


Cherry


Hi,

I have one WPF application and  I also use it in a Touch enabled device (like Moxa panel). I can use physical keyboard or virtual keyboard for input. If user presses a key (let say in Keydown event), how would I know that input is coming from Physical Keyboard or virtual keyboard ?

In other way, how to know that user is using physical keyboard or virtual keyboard ?

Thanks in Advance,

Minaketan

解决方案

Hi MinaketanBiswal,

By my search, the KeyDown event is raised when a user presses a physical key, and I also find one document that you can take a look:

https://stackoverflow.com/questions/587840/how-to-distinguish-between-multiple-input-devices-in-c-sharp/589326#589326

Best Regards,

Cherry


这篇关于有没有办法找到按键,物理键盘或虚拟键盘的来源?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!

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