Determining which keyboard is sending keystrokes

后端 未结 5 872
梦如初夏
梦如初夏 2021-01-22 12:04

I have 2 keyboards hooked up to my machine (one on PS/2, the other on USB). How would I determine which keyboard is sending the keystrokes in C#?

5条回答
  •  走了就别回头了
    2021-01-22 12:35

    If one is on USB, then you should be able to figure it out - at least on driver level. However, higher up the stack I haven't heard of such an option. I wouldn't be surprised if it was not possible at all.

    One avenue you might want to check out are the dancing simulators. You know, the ones with the "dance mat" (or "dance pad"). These dance mats are actually nothing else than but big keyboards. Check it out yourself - open up notepad and jump on the dance mat. :)

    Now, some of these programs also offer competitive mode where you can hook up two dance mats and compete with a partner. In this case they would need to distinguish between the mats in some way - which is the same thing as you're trying to do.

提交回复
热议问题