C#C
C#7mo ago
Phill

Parsing Input From Separate Keyboards

I volunteer at a digital makerspace (https://www.seattlesim.com/) that has A LOT of USB keyboards and a lot of people who know how to make games. I'm trying to make something in c# that can parse input from separate keyboards the same way you would with separate controllers. The plan is to let a bunch of people make games with it.

I've gotten as far as getting the form to capture the keypress event but nothing in any of the variables will let me tell which keyboard triggered the event.

I've also been able to successfully utilize ManagementObjectSearcher(@"SELECT * FROM Win32_Keyboard") but none of the fields give me any clear text identifiers. PnpDeviceID and DeviceID are the same on each individual device but unique among the different devices. I'd like to pull the names I see in the windows device manager.

After spending all day trying unsuccessfully use user32.dll I think it's time to stop and ask for help. Am I even going about this the right way?
Seattle Interactive Media-Lab
Was this page helpful?