开发者

Generating mouse events in Mac OS X

开发者 https://www.devze.com 2023-01-06 06:02 出处:网络
I have an USB device that will send out some proprietary data and I have an algorithm that converts it to mouse coordinates, the question I have is how do I wr开发者_JS百科ite a driver that reports to

I have an USB device that will send out some proprietary data and I have an algorithm that converts it to mouse coordinates, the question I have is how do I wr开发者_JS百科ite a driver that reports to Mac OS X?

I have seen some references to IOHIDPostEvent but I cannot find detailed documentation on Apple's Developer Website. Is this the correct way? I am trying to write an user-space driver versus an in-kernel drive.

Thanks


You can check a working but deprecated program here: http://www.macosxhints.com/article.php?story=2008051406323031

The new replacement for CGPostMouseEvent is CGEventCreateMouseEvent and you can read more about it here: http://developer.apple.com/mac/library/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html#//apple_ref/c/func/CGEventCreateMouseEvent

0

精彩评论

暂无评论...
验证码 换一张
取 消

关注公众号