How to simulate a low level keypress on os x?

前端 未结 2 953
误落风尘
误落风尘 2020-12-15 12:15

I am trying to generate keyboard keydown and keyup events programmatically. I am currently using CGPostKeyboardEvent to do this, but I am searching for a way to do this at

2条回答
  •  我在风中等你
    2020-12-15 12:44

    Event taps can inject at the HID level if you run as root

    http://developer.apple.com/mac/library/documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html#//apple_ref/c/tdef/CGEventTapLocation

提交回复
热议问题