wdx1992828 发表于 2015-12-30 12:52:47

在mac os x中建立事件钩子

需求
  建立监听系统范围的事件消息,实现EasyStroke,StrokeIt类似的功能
探索
  Google “mac os hook”,会发现非常困难,除非是用进程注入的方法,可以使用的方法有 SIMBL(http://www.culater.net/software/SIMBL/SIMBL.php)和mach_start(https://github.com/rentzsch/mach_star),实现的功能是进程模块替换(http://www.core.dk/~lp/)
  柳暗花明又一村, "Quartz event taps"可以为我们提供全局事件监听的能力
  http://stackoverflow.com/questions/6657511/osx-carbon-quartz-event-taps-to-get-keyoard-input
  https://developer.apple.com/library/mac/#documentation/Carbon/Reference/QuartzEventServicesRef/Reference/reference.html
  以此作为突破口,可以考虑实现mac下的鼠标手势程序. 是为记
页: [1]
查看完整版本: 在mac os x中建立事件钩子