Toggle Bluetooth: One Hotkey Turns Bluetooth On or Off in Windows 11

How many clicks does it take you to turn Bluetooth off in Windows 11? Open Settings, find Bluetooth, flip the switch, close Settings.

That’s a lot of steps for an on/off switch.

Toggle Bluetooth is an AutoHotkey v2 script that flips Bluetooth on or off with a hotkey. 😊

Video: easily toggle Bluetooth on Windows 11
Watch it in action on YouTube

Press Alt+B, Bluetooth Flips


The default hotkey is Alt+B. Press it and a large notification tells you the result: Bluetooth: On in green or Bluetooth: Off in red.

The tray icon also changes, so a glance at the taskbar shows the current state.

Want a different key? Open Preferences from the tray icon and pick any hotkey you like.

How It Flips the Switch


Windows 11 doesn’t offer a simple command for this. So the script uses the same switch you would click:

  • Opens the Bluetooth page in Windows Settings, made invisible so it doesn’t flash at you
  • Clicks the Bluetooth switch through UI Automation, the Windows accessibility interface
  • Reads the new state and closes Settings again

When the script starts, it checks the current state the same way and shows which hotkey to press.

Heads-up: because it works through the Settings app, it closes the Settings window when it’s done. If you had Settings open for something else, open it again afterwards.

When You’d Reach for It


  • Headphones grabbed the wrong device: off and on again in two key presses
  • Saving laptop battery when you’re away from your speakers and mouse
  • Flights and meetings where you want radios off fast

What’s in the Download


  • Toggle Bluetooh.ahk: the AutoHotkey v2 script you run
  • lib folder: UIA, Triggers, NotifyV2, ScriptObject, WinHook and a Windows 11 check
  • res folder: the Bluetooth on and off icons
Requirements: Windows 11 and AutoHotkey v2. On Windows 10 the script tells you it’s Windows 11 only and exits.

Get Toggle Bluetooth


Toggle Bluetooth is $4.99. Full source included, so you can see exactly how the UI Automation part works.

One key instead of four clicks. ⚡

Joe

Comments are closed.