Skip to content

Instantly share code, notes, and snippets.

@sorrell
Last active April 3, 2024 21:39
Show Gist options
  • Save sorrell/c006b180ab3bfb3107810af9d26692b6 to your computer and use it in GitHub Desktop.
Save sorrell/c006b180ab3bfb3107810af9d26692b6 to your computer and use it in GitHub Desktop.
Activate Sidecar Shortcut

Sidecar Shortcut

This is a list of steps for creating a keyboard shortcut to activate Sidecar on macOS Ventura.

Steps

  1. Open Automator and create a new Quick Action
  2. Select Run AppleScript as the first and only step
  3. Input the below but be sure to replace "iPad New" with your device name
on run {input, parameters}	
	tell application "System Settings"
		activate
		delay 1
		reveal pane id "com.apple.Displays-Settings.extension"
		delay 1
		tell application "System Events" to click first pop up button of first group of second group of first splitter group of first group of window "Displays" of application process "System Settings" of application "System Events"
		delay 1
		tell application "System Events" to click menu item "iPad New" of first menu of first pop up button of first group of second group of first splitter group of first group of window "Displays" of application process "System Settings" of application "System Events"
		quit
	end tell
	return input
end run 
  1. Assign keyboard shortcut by opening System Settings -> Keyboard -> Keyboard Shortcut
  2. Select Services in the left column, then expand the General node. Double click to assign shortcut (I used Cmd-Option-X)
  3. Pick an app that you'll be launching this shortcut from to give access to controlling your mac (for example Finder)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment