Creating IOHIDEvent objects for DriverKit/IOHIDUserService

The documentation for IOHIDUserService lists the following instance method:

virtual void dispatchEvent(IOHIDEvent *event);

It specifically says, "You can also call it directly to dispatch events for which you create an IOHIDEvent object." I see nowhere in any documentation on the details for the IOHIDEvent class and creating your own. Google searches let me find https://opensource.apple.com/source/IOHIDFamily/IOHIDFamily-368.20/IOHIDFamily/IOHIDEvent.h.auto.html

Unfortunately i see nowhere on my computer where IOHIDEvent.h exists.

Is this something i'm going to have to build/pull in manually, or is there a framework that I'm just not seeing that I can pull in to create an IOHIDEvent?

And in further investigation, looks like the newest version is at https://github.com/apple-oss-distributions/IOHIDFamily/tree/main I opened the project and tried to build it, but it is looking for a macos.internal sdk which i can't find anywhere. I'm guessing this is an Apple-only thing. Hopefully someone has more info on this?

Creating IOHIDEvent objects for DriverKit/IOHIDUserService
 
 
Q