OSX Leopard HID 获得简单的键盘输入示例?

发布于 2024-09-04 11:03:11 字数 460 浏览 3 评论 0原文

我即将在 osx 上为我的引擎实现简单的键盘和鼠标输入。我想将实现抽象为更通用的 C++ 类(例如键盘和鼠标)以及适当的侦听器以实现可移植性。无论如何,我遇到了 Leopard HID Api (http: //developer.apple.com/mac/library/technotes/tn2007/tn2187.html#TNTAG9000-SAMPLE_CODE_)这似乎是这些类的 osx 实现的正确方法。不管怎样,HID 的例子非常复杂,我不能像我希望的那样快地理解它,所以我想知道是否有人已经使用它来获得一些基本的鼠标和键盘输入,或者知道关于一些很好的例子/在线资源。 或者甚至可能采取完全不同的方式?

谢谢

I am about to implement simple keyboard and mouse input on osx for my engine. I want to abstract the implementation in more generic c++ classes like Keyboard and Mouse plus appropriate Listeners for portability. Anyways, I came across the Leopard HID Api (http://developer.apple.com/mac/library/technotes/tn2007/tn2187.html#TNTAG9000-SAMPLE_CODE_)which seems to be the right way to go for the osx implementation of these classes. Anyways, the examples of the HID are very complex and I can't really wrap my head around it as fast as I wished I could, so I was wondering if anybody has used it allready to get some basic mouse and keyboard input, or knows about some good examples/resources online.
Or Maybe even a totally different way to go?

thanks

如果你对这篇内容有疑问,欢迎到本站社区发帖提问 参与讨论,获取更多帮助,或者扫码二维码加入 Web 技术交流群。

扫码二维码加入Web技术交流群

发布评论

需要 登录 才能够评论, 你可以免费 注册 一个本站的账号。
列表为空,暂无数据
我们使用 Cookies 和其他技术来定制您的体验包括您的登录状态等。通过阅读我们的 隐私政策 了解更多相关信息。 单击 接受 或继续使用网站,即表示您同意使用 Cookies 和您的相关数据。
原文