foohid icon indicating copy to clipboard operation
foohid copied to clipboard

Swift interoperability

Open IgorMuzyka opened this issue 5 years ago • 4 comments

Yo hi. I'm in the process of developing my first mac app and I need to create a virtual HID keyboard so that I could send the events to the system but without intervening user input on the built-in keyboard. I have little to no experience with C++. And I've done my app in Swift 4.2. The question is: how do I use your library from Swift? I've managed to google some techniques with wrapping C++ code with Objective-C++ files and creating a bridging header. Even though I'm almost sure that this way would do this, but I'm kinda lost on how to do this quite right. Would like to hear your guidance on how to approach this. Or maybe you can provide a simple example and I'll learn from that and can cover the rest of calls/methods because I totally need this functionality. The only other option besides your library is also done in C++, this one Karabiner-Elements. To me, it seems that I have no other choice so I'll probably do this anyway, but with some help, I might be able to do this faster.

IgorMuzyka avatar Aug 08 '18 23:08 IgorMuzyka