KeyRoutines
TriggerFreetrigger.device.disconnected

Run a routine when a USB or Bluetooth device disconnects

Device disconnected starts a routine when a USB device or a Bluetooth device disconnects. It's the other half of Device connected, for putting things back when you unplug.

How it works

  • Name the device (part of the name or its id works) or leave it empty for any device.
  • Choose USB, Bluetooth, or both in the advanced options.
  • A brief drop that reconnects within about a second doesn't fire.
  • The routine gets the name, id and kind of the device that left.

Routines that use it

Headphones off, music paused

When your Bluetooth headphones disconnect, Media control pauses playback so it doesn't blast from the speakers.

Undock and lock

When the dock disconnects, Lock the PC so a laptop you carry away is locked.

Controller gone

When your controller disconnects, Show banner reminds you to charge it.

Settings

SettingWhat it does
DeviceThe device: its name as Windows shows it (part of it is enough), or its device id. Empty: any device.
KindadvancedOnly USB devices, only Bluetooth devices, or both.

Good to know

  • Hubs and built-in devices aren't watched.

Questions

How do I pause music when my Bluetooth headphones disconnect?
Create a routine with Device disconnected, type the headphones' name, and add Media control set to pause.
Will a short Bluetooth drop set it off?
A link that drops and comes back within about a second doesn't fire.

Pairs well with

Build this routine in KeyRoutines

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