Skip to content

Instantly share code, notes, and snippets.

@bjhomer
Last active July 7, 2021 20:26
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save bjhomer/9393869 to your computer and use it in GitHub Desktop.
Save bjhomer/9393869 to your computer and use it in GitHub Desktop.
Starting and stopping VoiceOver from the terminal
//The very slow, but more semantically correct way
osascript -e 'tell application "VoiceOver" to activate'
osascript -e 'tell application "VoiceOver" to quit'
// The really fast way. (96 is the keycode for F5.)
osascript -e 'tell application "System Events" to key code 96 using command down'
@bjhomer
Copy link
Author

bjhomer commented Mar 6, 2014

The activate command takes a couple seconds… still looking to see if there's a faster way.

@bjhomer
Copy link
Author

bjhomer commented Mar 6, 2014

And by "a couple seconds", I mean more like 10 seconds.

@bjhomer
Copy link
Author

bjhomer commented Mar 6, 2014

Also… it seems that the 'activate' command doesn't want to quit. I have to kill it with Ctrl-C. So yeah, still looking for a better solution.

@bjhomer
Copy link
Author

bjhomer commented Mar 6, 2014

Updated with a much faster method.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment