Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
1–10 of 13 posts
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#2Nice. But why?
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#3Nice. But why?
For example to automate what couldn't be automated otherwise.
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#4This is legend. I’ll be putting this to extensive use tomorrow.
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#5Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#6This is legend. I’ll be putting this to extensive use tomorrow.
You've always had this ability, but with more convoluted syntax:
osascript -e "tell application \"System Events\" to keystroke \"whatever\""
Specify the application too with multiple -e parameters. This will copy whatever is selected in Safari: osascript -e "tell application \"Safari\" to activate" -e "tell application \"System Events\" to keystroke \"c\" using {command down}"Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#7Wonder how this compares to Autohotkey on Windows.
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#8Now to finetune my local LLM on the sendkeys syntax, add kyutai for streaming voice recognition, and my mac will be fully voice operable.
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#9Wonder how this compares to Autohotkey on Windows.
Ahk isn't cli, and also is a full-blown programming language, so not as limited in its input
Re: Sendkeys: Command line tool for automating keystrokes and mouse events on macOS
#10This is legend. I’ll be putting this to extensive use tomorrow.
You've always had this ability, but with more convoluted syntax: osascript -e "tell application \"System Events\" to keystroke \"whatever\"" Specify the application too with multiple -e parameters. This will copy whatever is selected in Safari: osascript -e "tell application \"Safari\" to activate" -e "tell application \"System Events\" to keystroke \"c\" using {command down}"
How do you stimulate delays, animation intervals, key down/ups a with System Events?