Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Can not create Event Taps #253

Closed
tlindsay opened this issue Apr 17, 2024 · 2 comments
Closed

Can not create Event Taps #253

tlindsay opened this issue Apr 17, 2024 · 2 comments

Comments

@tlindsay
Copy link

I'm sure I'm missing something here–I'm new to Mac development. But I tried for several hours last night, and couldn't come up with a way to create an event tap. I don't see the CGEventTapCreate function anywhere in the documentation. Am I meant to import "C" to accomplish something like this?

I tried doing something like objc.Call[corefoundation.MachPortRef](...), but couldn't figure out a valid handle to give, and everything I tried panicked because the handle was nil.

I am using the 0.5.0-preview, so maybe the functions I need just haven't landed yet? I was just confused because all of the supporting constants/types (i.e., EventTapLocation, EventTapOptions, etc.) do exist.

@progrium
Copy link
Owner

We don't create function bindings yet, but yes you can use CGO in the meantime.

@tlindsay
Copy link
Author

👍 Got it. Thanks for the reply!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants