本文介绍了如何在Delphi中区分多个键盘?的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有两个键盘连接到个人电脑。一个用于在TMemo2中键入TMemo1,另一个用于TMemo2。两者都可以同时输入。问题是我无法区分什么键盘和键盘两个键入的键盘。有没有办法区分哪些设备某些输入来自? / p>
解决方案
@Dian,你可以使用功能注册键盘并监视消息,以确定输入来自的设备(键盘)。
查看这些链接了解更多信息
I have two keyboards attached to a PC. One is used to type in TMemo1 and the other in TMemo2. Both are allowed to type at the same time. The problem is I cannot distinguish what keyboard-one has typed and what keyboard-two has typed.
Is there any way to distinguish, which device certain input came from?
解决方案
@Dian, you can use the RegisterRawInputDevices function to register the keyboards and monitor the WM_INPUT message to determine the device (keyboard) where the input came from.
check theses links for more info
这篇关于如何在Delphi中区分多个键盘?的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持!