KeyRoutines
ConditionFreecond.audio.deviceConnected

Check if a headset or audio device is connected on Windows

Audio device connected is a condition that is true while a chosen headset, speaker or microphone is plugged in or paired. Routines use it to decide which device to switch to, or to pause until a headset is ready.

How it works

  • Pick the device; it is found by its Windows id, or by its name when the routine came from another PC.
  • Use it in an If to branch, or in a Wait until to pause until the device connects.
  • Waiting doesn't keep checking over and over: KeyRoutines listens for Windows' device change messages and continues when the device appears.

Routines that use it

Pick the right output

In a gaming routine, if the headset is connected use Set default audio device on it, otherwise switch to the speakers.

Wait for a Bluetooth headset

After turning Bluetooth on with Wi-Fi or Bluetooth on/off, wait until the headset is connected before switching audio to it.

Skip a call setup

Only run the Discord: input device step when the USB microphone is connected, so the routine doesn't fail without it.

Questions

Can a routine wait until my Bluetooth headphones connect?
Yes. Put Audio device connected in a Wait until, optionally with a time limit. The routine continues as soon as Windows reports the headset.
Will it find my headset on a different PC?
It looks for the device by id first and then by name. A routine imported from another PC still matches a device with the same name.

Pairs well with

Build this routine in KeyRoutines

Free from the Microsoft Store for Windows 11 and 10. Pro is a one-time upgrade.