开发者

How do I Capture keyboard/mouse events with my application in focus?

I'm building a synergy like app for Mac OS, that captures keyboard/mouse and sends them to a remote computer.

I wish to capture all user keyboard and mouse events, while开发者_如何学运维 my NSWindow is in focus (if possible, while not in focus would be nicer). the catch is - I don't want system shortcuts like CMD+Tab or CMD+Q to interrupt me, I wish to handle them before the windowing system does, so that my app won't loose focus. Same for mouse.

Thanks


Check this - Cocoa Event-Handling Guide

Hope this helps :)

0

上一篇:

下一篇:

精彩评论

暂无评论...
验证码 换一张
取 消

最新问答

问答排行榜