KeyRoutines
ConditionFreecond.device.connected

Check if a USB or Bluetooth device is connected

Device connected is a condition that is true while a particular USB or Bluetooth device is connected. Use it so a routine behaves differently at your desk with the dock plugged in than on the go.

How it works

  • Type the device's name as Windows shows it (part of the name is enough) or its device id.
  • An advanced option limits the match to USB devices, Bluetooth devices, or both.
  • A Bluetooth device that is paired but not connected answers false and says so.
  • Inside Wait until it wakes when devices connect or disconnect, so waiting for a controller costs nothing.
  • When true it reports the device's name, id and kind.

Routines that use it

Headset check before a game

When Game started fires, If your Bluetooth headset is connected, Set default audio device switches sound to it.

Wait for the controller

Wait until your controller is connected before Open app launches your game launcher.

Desk or laptop mode

On Woke up, If the dock is connected, Apply layout arranges your desk windows; otherwise leave them.

Good to know

  • Covers USB devices and paired Bluetooth devices; hubs and built-in parts of the PC are left out.

Questions

How do I check if my Bluetooth headphones are connected?
Add Device connected and type part of the headphones' name as Windows shows it. It's true only while they're actually connected, not just paired.
Do I need the exact device name?
No. Part of the name is enough, or you can use the device id instead.

Pairs well with

Build this routine in KeyRoutines

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