Say I have two peripheral devices, both connected via PS/2 (such as as keyboard and a scanner). Is there any way to distinguish between the sources programmatically?
I’d like to know whether the input came from the keyboard or the scanner.
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
You can use the
RegisterRawInputDevicesfunction. For a complete sample application check this articleUsing Raw Input from C# to handle multiple keyboards.