How can I isolate a keyboard into a process?

Patrick Marcel Hertling April 11, 2012
Whatsapp Pinterest

I want to make a program, in java, C++ or whatever.
I have 2 keyboards, A and B.
I use my keyboard A for everything. But I want my program to only work with keyboard B.

For example:
My program is minimized. I’m writing with keyboard A in the notepad. If I press a key with keyboard B, nothing should appear at the notepad. But it should be registered by my minimized program.

Any idea of what I can use? Thank you :).
(The OS assigns an ID for every device, maybe something to do with that?)

  1. ha14
    April 12, 2012 at 12:39 pm

    perhaps you can try with a virtual keyboard?

    How To Use Multiple Keyboards and Mice On One Computer

  2. Mike
    April 11, 2012 at 8:39 pm

    I believe the Windows HID implementation doesn't allow isolating input devices and assigning them to certain applications just like you can't assign different layouts for simultaneously connected keyboards.

    Human Interface Devices are designed for being Plug & Play ~ imagine your keyboard was broken and the only one available would be isolated to a single application... one would probably make more enemies than friends implementing such behavior.