I am trying to track mouse events in RemObject c#, for OSX Application. For this I tried the solution below but it does not work. Can you tell me how is it work
Hmm, this looks correct, but i can’t get it to work, either
however if I change the event type to Any, I do get MouseMoved (and only MouseMoved) events… this seems to be something that’s broken on OS level, not specific to Elements, as I see many questions about this on Google, and no solutions.
Hi, as you mentioned in your reply that might be this OS level issue therefore I have no way but to test it in swift. I have written a small program for macos which useses the NSEvent.addGlobalMonitorForEvents and I was able to capture all the events.
So, my question is that why it is not working in Elements.
Strange. I coped your exact code over to Elements (attached), and I see only mouse events, yet I can confirm in the Xcode version I see keyboard events too…
It could be, but I don’t see how/why, if it works in Xcode. Let me double-check if the Xcode project had any entitlements or anything else special set, by default (it shouldn’t).
Oddly, the Xcode project is set to run sandboxed (which should be, if anything, more restricted). But worth trying the same in the Elements one
Nothing else stands out; the project is “signed to run locally” only; same as Elements does (required on arm Macs to run anything).
…
Oddly, now (not sure if that’s only because I added the entitlements, I do get “keyboard flags events”. but still no “key down” ones :(. I also get others with type “1”, “4” and “22” (left mouse down, right mouse down, and scrollwheel)