Detect input device type .NET
<p>I'm writing a C# application in .NET 4. In the application I have 2 text boxes - one is used for user input, the other one is used for input from USB scanner. Is there some way to detect from which device the input comes - from keyboard or scanner (the scanner sends the characters from the barcode and Enter in the end). Is there any way to achieve this. So far I've tried to catch it in the text boxes <code>onKeyDown</code> <code>onKeyPress</code> triggers but without success. I get only the characters.</p>

<p>I guess I have to look somewhere in the reflection but I don't find anything since 3 days.</p>

<p>Thanks,
Mihail</p>
