opc0de
opc0de

Reputation: 11768

Get HID Device data only from my delphi application

I have 2 keyboards attached via usb. I want that my application to receive input only from one of them. I tried to use the TJvHidDeviceController i sucesefully get a handle to the device but i can't get any data.

Is it possible to prevent other applications to receive input from the second keyboard ?

Upvotes: 0

Views: 2114

Answers (1)

Stijn Sanders
Stijn Sanders

Reputation: 36850

Is it possible for your set-up to not load a device driver for the keyboard you want to listen to? If it is, you could try this method:

  • Use QueryDosDevice to list all devices on your computer. You can either search the vendor and device ID in the list if you know them, or build a list before and after you plug in the second keyboard and see which item(s) appear on the list.
  • Use CreateFile with the \\?\ prefix to connect to this device and read/write raw data from it.

Upvotes: 1

Related Questions