OSX Leopard HID 获得简单的键盘输入示例?
我即将在 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 技术交流群。
绑定邮箱获取回复消息
由于您还没有绑定你的真实邮箱,如果其他用户或者作者回复了您的评论,将不能在第一时间通知您!
发布评论