Closed GuruGurra closed 11 months ago
Hi! Thanks for posting this issue!
Unfortunately, I haven't seen a problem like this before so I can't say what may cause it. I've just looked through some other issues and I didn't find any issues like yours.
I don't think it's a security issue - otherwise the global hook wouldn't have worked on these installations as well. Regardless, could you please try running your application as root
on the failing installations to see whether the issue is still there? As I've said, I don't think it's a security issue, so this will probably change nothing, but you can never be too sure.
Also, could you please share the libuiohook debug logs from those installations?
As for changes in the newer versions - there haven't been any functional changes in how libuiohook (or SharpHook) simulates mouse movement on macOS (there were cosmetic changes to the code, but those don't really matter).
Even if it may be non-trivial for you, I would still recommend updating to the newest version of SharpHook. If I fix this issue, the fix will be in the 5.x line as I don't support older versions.
Hi @GuruGurra! I'm just pinging for updates. As I've said before, could you please provide some more info or update to the latest version and try it out? Otherwise, I'll close this issue in a couple more weeks, though we can still continue the discussion after that.
Sorry, I forgot to report back. I got a message from the user where he said it started to work when he gave the app the Accessibility right on the computer, so it was a security settings issue.
Great, thanks for letting me know! This is expected behavior, so I'm closing this issue.
This question is about version 4.2.0. I realize there have been several updates since then, but since there are breaking changes, I need to perform thorough tests before releasing an updated version of my app. In the meantime...
Are there or have there been any known issues where the mouse does not move on Mac?
My situation is like this: On a key press, the app should query and save the mouse position. On another key press, the app should restore the mouse to the recorded position. This works on a vast majority of the installations but fails on a few. On installations where it fails, the call to SimulateMouseMovement() with the correct target coordinates gives the Success return code. However, the mouse does not move, and when querying the mouse position, it is still in the exact location as before the call to SimulateMouseMovement().
Are there any peripherals, like trackpads or 3D mice or anything, that can cause such problems? Or are there any security settings that may prevent the app from moving the mouse? I haven't found any common denominator between the systems that experience this problem. Or are there any changes in later versions (then 4.2.0) that address such problems, even though the version history doesn't mention this?