core-graphics-rs icon indicating copy to clipboard operation
core-graphics-rs copied to clipboard

CGEventTapCreate not implemented

Open AsafFisher opened this issue 4 years ago • 4 comments

AsafFisher avatar Jan 09 '21 18:01 AsafFisher

Anyone against it?

AsafFisher avatar Jan 14 '21 16:01 AsafFisher

Nope. What do you want it for?

jrmuizel avatar Jan 14 '21 17:01 jrmuizel

I want to make a cross platform mouse + keyboard sharing... I saw a rust project that's called winit and so I decided to implement it there... the winapi side is already taken care of (CreateHookEx) so I just need to hook the Mac OS and Unix's mouse/keyboard event system (: It will also be useful for all these malicious people who want to make a cool rust ransomeware 🤧

Btw does anyone knows where the shared object containing this symbol located at?

Why am I asking? I got a problem right now where CGCreateEventTap returns a null... so I tried to debug it using lldb and I found that the symbol it's located in the skylight module or something like that... I am familiar with Linux and macos is Unix based so I guess there is a shared object that contains this symbol somewhere... does anyone know where this dynamic/shared object located at? I want to reverse it a bit to understand what I am doing wrong...

AsafFisher avatar Jan 14 '21 17:01 AsafFisher

On 10.15 SkyLight is here: /System/Library/PrivateFrameworks/SkyLight.framework/Versions/A/SkyLight. If you're on Big Sur (11.0) the files aren't stored on disk in the same way anymore. See https://github.com/gimli-rs/object/issues/268 for some of the info.

jrmuizel avatar Jan 15 '21 03:01 jrmuizel