A Shortcut for Universal Control Sickos

My daily setup is a little unusual- I rock a dual monitors on my desk, but each monitor is driven by a different machine- my work computer on the left, and my personal machine on the right.

behold, my battlestation

Historically, I was one of the brave heroes who actually paid for Synergy. But I was thrilled when apple announced Universal Control, a system-level way to share a mouse and keyboard between devices, and once it was generally available I switched over to it. If you haven't tried it, it's a little like a magic trick, in that 99.9% of the time you're amazed and 0.1% of the time you cut your finger on a playing card and drop everything while the onlookers slowly disperse down the sidewalk in front of the Planet Hollywood.

I'm generally very happy with it and I spend most of my day using my personal machine's keyboard/mouse though it still has a few warts that could be the fault of my network or feature bugginess: about once a day the connection will just drop out of nowhere, and sometimes the network traffic of UC will cause video conferencing to lag. In the former case, toggling the feature off and back on again solves the problem, and if the video lag gets bad enough, I'll just disable it until the call is over. Both solutions require opening System Settings, opening the Displays prefpane, and (classic Apple) knowing to open the Advanced... menu on that screen.

screenshot of the Displays prefpane

screenshot of the Displays prefpane open to the Advanced Panel, showing the Universal Control toggles


Navigating there is a bit of a slog, but there is a shortcut in Spotlight for it (type Universal Control and an option appears). I was curious how the Spotlight shortcut worked and whether I could navigate there via the command line or via Shortcuts. I found a pre-made shortcut but it only took me to the Displays panel. I know from iOS that there's frequently URLs that can deep link into settings screens. After some searching, I found [this list for iOS], but wasn't able to find a macOS equivalent. What I did find was this excellent two part sequence of posts on [constructing deep-link URLs for macOS preference panes]. What's more, it's from just 2 years ago so the info was still useful! With the techniques in those posts (consisting of an AppleScript and some patience), I was able to construct the following URL:


Which I then launched via the terminal:

open "x-apple.systempreferences:com.apple.Displays-Settings.extension?advancedSection"

which sure enough navigated not only to the Displays Panel, but directly to the Advanced modal!

I've since aliased this command locally as ucprefs, but I also wrapped it up in a simple macOS Shortcut, which I keep pinned in my menu bar:

screenshot of the Shortcuts interface, that passes the URL to the "Open URL" action

If that's something you'd like, you can grab a copy here:

Universal Control Settings Get Shortcut

Putting this out there in hopes that the next person who needs this need not search quite as long or toil quite as much. I'm happy to have learned the URL construction technique and I'm sure this won't be the last time Apple hides useful settings multiple menus deep.