BlueM / cliclick

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

Issue with cliclick kp: commands on MacBook Sonoma #177

Open Pory55 opened 2 months ago

Pory55 commented 2 months ago

Hi, I'm on MacBook Sonoma, and currently using cliclick version 5.1, installed via Homebrew. I've successfully implemented commands such as c:123,614, t:hello, and ku:cmd in scripts without any issues using Automator, Script Editor, or Terminal. However, I'm encountering a specific problem with kp: actions such as kp:volume-down, kp:arrow-up, kp:return or similar key press commands do not execute as expected. The script runs without errors, but no action occurs. I've checked command syntax and attempted various actions as listed in the documentation, but none of them for kp: seem to work. Any insights or suggestions on troubleshooting or resolving this issue would be greatly appreciated.

vitor-rc1 commented 1 month ago

Hi @Pory55. I faced that too. I'm using this workaround with AppleScript. You can use any key on keyboard :)

tell application "System Events"
    -- Emulate Enter key
    keystroke return
end tell
kazkl commented 1 month ago

Hello there. The same issue occurs. I executed this command in my terminal. When the kp: command is used frequently in a while loop, I observed irregular input.

while true; do
    cliclick "kp:arrow-left"

    sleep 0.1
done
stephen714 commented 1 month ago

Seeing this too, it is driving me crazy! Specifically with sleep 3; for i in {1..100}; do cliclick -w 100 -m verbose kp:arrow-down; done