Mac os 代码实现鼠标双击事件

    for(int i = 0;i<4;i++)
    {
        CGEventSetIntegerValueField(theEvent,kCGMouseEventClickState,2);

        CGEventSetType(theEvent, kCGEventLeftMouseDown);

        CGEventPost(kCGHIDEventTap, theEvent);

        CGEventSetType(theEvent, kCGEventLeftMouseUp);

        CGEventPost(kCGHIDEventTap, theEvent);
    }
    原文作者:酷行僧
    原文地址: https://segmentfault.com/a/1190000000717571
    本文转自网络文章,转载此文章仅为分享知识,如有侵权,请联系博主进行删除。
点赞