开发者

Intercept keyboard input in OSX

I'm trying to write an application that prevents certain key signals from propagating beyond the OS in OSX. To clarify, I want to make it so that it almost seems to the us开发者_StackOverflow社区er that the key they are pushing on their keyboard is broken. So, the associated letter won't show up in a textarea, the key won't activate a function in another application, etc. Any ideas? Thanks in advance.


You probably want to look into Quartz Event Taps. Note that your process will need to be running with "root" privileges to intercept events at the system level.

See also OSX Quartz Event Taps: event types and how to edit events

0

上一篇:

下一篇:

精彩评论

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

最新问答

问答排行榜