Find centralized, trusted content and collaborate around the technologies you use most.
Teams
Q&A for work
Connect and share knowledge within a single location that is structured and easy to search.
我想知道是否可以从某个地方读取 OSx 上的键盘输入,例如带有 /dev/input 文件的 GNU/Linux。
这样做的目的是制作一个非常简单的键盘记录器(学习目的),或者如果有一个我可以在 C 中调用的函数。
谢谢。
由于并非所有读者都像您一样具有良好的意图,因此我不会详细说明,而是为您指明正确的方向。
您可能知道,WindowServer 在两种环境中工作:Carbon(旧)和 Cocoa(新)。这些是各自的 API: