Home > Back-end >  [for] about Raw Input device
[for] about Raw Input device

Time:10-02

I have two questions:

===============================1)===============================
Even on my PC has two input device, a USB keyboard and a USB mouse,
I call GetRawInputDeviceList return the equipment in the test program for 6, and then in turn calls GetRawInputDeviceInfo for equipment information,
Above left



It is strange that I get device information told me that two of the device is a keyboard, the two devices are the mouse, and similar other also there is a difference between two devices, don't like the keyboard TotalKeys one is 101 a is 154, but I counted the is a 107 - key keyboard...
And I looked at the device manager, with the same equipment has 2 keyboard hardware ID, and the mouse have a hardware ID the same equipment,

Why is this?

===============================(2)===============================
I use GetRawInputDeviceInfo device, the keyboard UsagePage=1, the Usage=6; The mouse UsagePage=1, the Usage=2;
Then I went to visit the MSDN UsagePage and Usage in this definition, the MSDN says UsagePage is the class of the device; The Usage is the device within the class, if I understand correctly UsagePage should refers to equipment category, and then the Usage refers to the category of the equipment? So the keyboard and mouse UsagePage why are equal?



Hope someone give me light? And instead of his apprenticeship, its confused for it,

CodePudding user response:

Strange nobody reply

CodePudding user response:

For you, need to be solved urgently

CodePudding user response:



Use GetRawDeviceList when capturing the six devices, the keyboard has two, the mouse has two,
And then a keyboard device Name displayed Root RDP_KBD what of,
Another keyboard device Name display VID, HID..

Then I want to ask what is the difference between the two devices is, sometimes WM_INPUT message from a keyboard device, sometimes from another keyboard device,
  • Related