Readers like you help support MUO. When you make a purchase using links on our site, we may earn an affiliate commission. Read More.

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?)

MAKEUSEOF VIDEO OF THE DAY
SCROLL TO CONTINUE WITH CONTENT
ha14
2012-04-12 12:39:00
perhaps you can try with a virtual keyboard?How To Use Multiple Keyboards and Mice On One Computerhttp://www.makeuseof.com/tag/teamplayer-use-multiple-keyboard-and-mice-on-one-system/
Mike
2012-04-11 20:39:00
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.