Logo Questions Linux Laravel Mysql Ubuntu Git Menu
 

How to distinguish Multiple Keyboards in Delphi?

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?

like image 855
Dian Avatar asked Jun 17 '10 09:06

Dian


1 Answers

@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

  • Using Raw Input from C# to handle multiple keyboards
  • WM_INPUT Message
like image 121
RRUZ Avatar answered Sep 16 '22 11:09

RRUZ