0
votes

I am trying to differentiate input between two keyboards that are connected to the computer. My java program needs to be able to distinguish between the two. The original solution was to simply have one keyboard with caps-lock enabled while the other is not.

This worked perfectly when testing on Mac OSX. However when I attempted to run the same program on Ubuntu, I notice that turning caps-lock on enables it for all connected keyboards.

I can no longer distinguish between the two. Any suggestions?

1

1 Answers

1
votes

from an OS perspective there is "one keyboard". this one keyboard is receiving events from any number of actual keyboards. you could probably distinguish keyboards by bypassing the regular keyboard input and go directly to the registered USB devices. I found this....

http://nanlee.wordpress.com/2013/06/12/manykeyboard-using-java-hid-api-to-handle-multiple-keyboard-input/