Need to discern which HID device inputs are coming from (C# Windows Form)

mjeschke 40 Reputation points
2025-05-20T22:38:36.73+00:00

I'm programming a system which will have several HID devices. Each HID device is intended to input to a different part of the process (program).

Specifically I'll have three bar code readers, one at different parts of a test system, to monitor where a test tray (barcode label) is in a production test.

I need to determine which HID device (barcode reader) an input is coming from so it can be handled appropriately.

Does anybody know how to see which device a keyboard input is coming from?

C#
C#
An object-oriented and type-safe programming language that has its roots in the C family of languages and includes support for component-oriented programming.
11,557 questions
0 comments No comments
{count} votes

Accepted answer
  1. RLWA32 49,401 Reputation points
    2025-05-20T22:50:17.82+00:00

    Does anybody know how to see which device a keyboard input is coming from?

    This can be accomplished by handling raw input. For example, see If I have multiple attached keyboards, how can I read input from each one individually?

    1 person found this answer helpful.

0 additional answers

Sort by: Most helpful

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.