我如何获得全局的touchesBegan,touchesMoved,touchesEnded,touchesCancelled,mouseDown和mouseUp?我知道如何针对我的视图进行操作,但是如何针对其他应用程序进行操作?我知道这是有可能的,因为BetterTouchTool可以做到。
使用CGEvent.tapCreate全局处理拦截GCEvent。 CGEvents变成NSEvents。