如何检测物理键盘? [英] How to detect physical keyboard?
本文介绍了如何检测物理键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
bool keyboardattached = new KeyboardCapabilities()。KeyboardPresent == 1;总是返回true。 使用MS曲面RT。
如果这不起作用,我们假设用什么来检测是否存在物理键盘?
If this doesn't work, what are we suppose to use to detect the presence of a physical keyboard?
推荐答案
KeyboardPresent基本上是通过驱动程序报告的内容,因此可能会在某些系统上出现误报。
KeyboardPresent basically passes through what the driver reports and so may have false positives on some systems.
没有一个好的直接告诉方法,但根据你需要知道的原因可能有间接方式。
There isn't a good direct way to tell, but depending on why you need to know there may be indirect ways.
- Rob
这篇关于如何检测物理键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文