Using `CGEventSourceSetLocalEventsSuppressionInterval` instead of the deprecated `CGSetLocalEventsSuppressionInterval`

白昼怎懂夜的黑 提交于 2019-12-05 17:56:58
Krystian Gałaj

Event sources don't seem to be explained anywhere, and no one knows how to use them.

CGPoint warpPoint = CGPointMake(42, 42);
CGWarpMouseCursorPosition(warpPoint);
CGAssociateMouseAndMouseCursorPosition(true);

Call CGAssociateMouseAndMouseCursorPosition( true ) immediately after a warp call to make the Quartz events system drop the delay for this specific warp.

Did you ever solve this problem?

Have you tried using CGEventCreateSourceFromEvent(...) to create your CGEventSourceRef from a CGEventRef?

易学教程内所有资源均来自网络或用户发布的内容,如有违反法律规定的内容欢迎反馈
该文章没有解决你所遇到的问题?点击提问,说说你的问题,让更多的人一起探讨吧!