Here is project I am researching: https://developer.apple.com/documentation/hiddriverkit/handling_stylus_input_from_a_human_interface_device
I have a Touch screen and I want:
- can control this screen, I can enable extension and control Touch screen successfully.
- can pen on this screen. To do this, I need to send X,Y to StylusApp(AppKit) But I Can not send X, Y to Swift StylusApp
Eventhough I can log X,Y it by default code:
But I don't know how to send it to AppKit to Pen. I have research about communicate Driver and Client: https://developer.apple.com/documentation/driverkit/communicating_between_a_driverkit_extension_and_a_client_app#4324306 but seem HID driver don't support inheritance from IOUserClient:
I have receive a solution for this, I just install HIDDriver, then it will dispatchDigitizerStylusEvent: dispatchDigitizerStylusEvent(timestamp, stylusData);
Then I can get x, y coordinates from DragGesture.
But one more thing that is I also need get Width of touch to send to client app, that would be perfect.
But I also feel very satisfy with this, thank everyone.