Request for Help: Changing Sound When HDMI Plugged in and I'm on My University's Network

I'm a university prof and plug my MacBook into the school's A/V system using HDMI. But I always forget to go in and change the sound output in System Preferences to HDMI, so I'd like to use KM to do this for me.

I can't simply use the Display Layout trigger (at least, I don't think), because at home I use HDMI for a second monitor and don't want to change the sound output at home.

So I'm hoping someone can help me figure out a way to do the following:
WHEN I'm on my university's wifi network
AND WHEN the HDMI port is connected
THEN change sound output in SysPrefs to HDMI.

That sounds simple, but apparently I'm even simpler. Can anyone help?


You've got the following tokens to help you triage your location:


Will that work?


I don't know if there is a way to know (in Keyboard Maestro) whether or not something is connected to the HDMI port.

Thank you--I will try that: a Display Change trigger with a %WirelessNetwork% token could be the combo I need. I'll have to remind myself how to use tokens, but I have the MacSparky field guide, so I'm sure it's in there somewhere. Thanks for your help!

Set Variable to Text action.

Set variable <variable name> to %TokenName%

Awesome--thank you!

1 Like