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.
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 toimport "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 wasnil
.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.