views:

200

answers:

2

A have two keyboards in 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.

Please help! (I'm new to delphi and DLLs, so please go easy on the technical stuff.)

+1  A: 

As far as I know there is no way to distinguish keyboards unil you have hooked keyboard driver. Windows provide solid input model to application, so there is no difference for application receiving input from keyboard, second keyboard, IR remote control, or from another program that uses SendInput API function.

STO
+14  A: 

@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

RRUZ
+1 Learned something new (again). thx
Lieven
I'm guessing I'll have to make a delphi version of the C# code? *sigh* I'll try. Thanks for answering! :D
Dian
I had NO idea you could do this in Windows at all.
Warren P