BlueM / cliclick

macOS CLI tool for emulating mouse and keyboard events
https://www.bluem.net
Other
1.59k stars 116 forks source link

The "move" command doesn't work anymore (macOS Monterey 12.6.3) #168

Open alin89c opened 1 year ago

alin89c commented 1 year ago

First I got this warning in Terminal: WARNING: Accessibility privileges not enabled. Many actions may fail. Enable the checkbox for the containing app in: System Preferences → Security & Privacy → Accessibility

Then, after enabling the checkbox for the containing app (Terminal and Script Editor), I ran "cliclick m:0,0" (got no warning this time, but the mouse pointer still didn't move). The "click" command works though...

Is this a known issue? Is there anything I can do to fix this problem I have with cliclick? Thank you!

joelc0193 commented 1 year ago

Looks like it works if you move the cursor at least twice:

cliclick m:0,0 m:100,100

alin89c commented 1 year ago

Hi, and thanks! Tried it and it works (on my OpenCore Ventura 13.3.1 Retina Mid 2012 MacBook Pro). Good job!

joelc0193 commented 1 year ago

Hi, and thanks! Tried it and it works (on my OpenCore Ventura 13.3.1 Retina Mid 2012 MacBook Pro). Good job!

is was ChatGPT who gave me the idea while debugging

BlueM commented 1 year ago

As I haven’t been able to reproduce this behavior (neither #169 on a different Mac running macOS 13), I don’t see how I could provide a fix.

shuiwujiao commented 11 months ago

ChatGPT suggests that the terminal application itself may not be authorized to use "accessibility". For example, if you connect through a terminal or sshd, you need to allow the terminal or sshd to use "accessibility". This method works well on my PC.

BlueM commented 11 months ago

@shuiwujiao: the author of the issue mentioned he did grant the accessibility privileges.

alin89c commented 11 months ago

Maybe this issue is related only to Macs running an officially unsupported MacOS... Good thing I have this workaround (to input the values twice).

jamesdh commented 5 months ago

I just now tried cliclick myself for the first time and experienced this issue. @joelc0193's comment worked for me also.

jamesdh commented 5 months ago

@BlueM for what it's worth, I only experience this bug using iTerm. It doesn't reproduce using Terminal.