Search code examples
windowskeyboarddevice

How can I know hooked keyboard ID?


I have two keyboards connected on my computer. I want to use one for the main keyboard, and another for a specific application. For example, keyboard #1 is used for Windows, and keyboard #2 is used only in my application.

Is it possible? If yes, which language should I use? Do I need to access to the driver? I precise that I'm running under Windows...


Solution

  • I found a link that explain step by step how to intercept keyboard keys, and how to identify the device that sent the keystroke.

    Using Raw Input from C# to handle multiple keyboards

    This example uses C# language.