mouclass filter identifying touchpad / trackpad

Can a mouclass upper filter driver reliably tell whether its filtering a touchpad / trackpad device?

AFAIK for precision touchpads, no. Generic mouse data flows through the mouse top level collection. Precision touchpad data flows through a separate TLC. “Legacy” or “not precision” touchpads/trackpads usually just show up as generic mice without the additional TLC.

See https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/windows-precision-touchpad-required-hid-top-level-collections

What bigger problem are you trying to solve?

@Doron_Holan said:
What bigger problem are you trying to solve?

Nothing at the driver level. But the user mode heuristic engine will use this as an attribute for its purposes.

Given that its NO at the driver level, can it be done at the user mode level?

In user mode you can look at the device relationships. For instance, for a given mouse, you can inspect if it has a peer device which is a precision touchpad ( digitizer/touchpad (Page 0x0D, Usage 0x05)), see https://docs.microsoft.com/en-us/windows-hardware/design/component-guidelines/touchpad-windows-precision-touchpad-collection . Without a clear understanding of what you will do with the heuristic, it is not clear what detection mechanism you need nor the required fidelity of it.

The user mode engine is a security software which takes various data points from the given system as inputs, one such input is the types of all mice present in the system. Of course, we would like to classify a device with 100% certainty to improve the engine’s performance.

I am guessing that you are referring to use HidP_GetCaps and determine the type based on the Page/Usage for all TLC’s. This will work for USB/i2C hid devices only. Please correct me if I am wrong.

Wow do we classify the native PS2 based device?

I am guessing that you are referring to use HidP_GetCaps and determine the type based on the Page/Usage for all TLC’s. This will work for USB/i2C hid devices only. Please correct me if I am wrong.

Yes, that is the right API. That should work for **ALL **HID devices, regardless of underlying transport.

Wow do we classify the native PS2 based device?

Good luck with that. AFIAK they will only enumerate as a mouse with no additional pnp devices to expose extra functionality beyond a pointing device. One brute force method is to maintain a list of hardware IDs of ps2 precision touchpads and use SetupApi to query for the IDs and match against your list. This assumes the device reports a unique hardware ID beyond the ps2 compat IDs.

Thanks Doron