Windows Bluetooth shortcut with AutoHotkey

2024-01-07

Here’s a AutoHotKey script that quickly opens up the Bluetooth settings for Windows 11:

Persistent
#b::
{
    ; Open Quick Actions window
    Send("{LWin Down}a{LWin Up}")
    ; The quick action window takes a while to initialize and allow keyboard navigation
    ; Without the sleep timer you may end up on the wrong screen (or disabling WiFi)
    ; If your computer is slower, increase this value a bit more
    Sleep(600)

    ; WiFi -> Bluetooth
    Send("{Right}")

    ; Bluetooth chevron
    Send("{Tab}")

    ; Enter Bluetooth chevron
    Send("{Enter}")
}

Note that you need at least Build 22563 of Windows 11 in order to use this script.