macOS: Connect AirPods With a Keyboard Shortcut

Normally, connecting your AirPods to your Mac should be pretty easy and straightforward. However, sometimes you could run into connection issues. Here’s how to connect AirPods to a Mac with a keyboard shortcut (via Reddit).

Connect Airpods

iPhone X and AirPods
Don’t count on your AirPods case charging your iPhone

Redditor u/TurdsofWisdom created a short script you can use. You launch it via the shortcut Option + A, using a free app called Snap.

tell application "System Events" to tell process "SystemUIServer"
set bt to (first menu bar item whose description is "bluetooth") of menu bar 1
click bt
tell (first menu item whose title is "YOUR_DEVICE_NAME") of menu of bt
    tell menu 1
        if exists menu item "Connect" then
            click menu item "Connect"
            click bt
        end if
    end tell
end tell
end tell

Alfred, the Spotlight replacement app, can also do this. Just open AppleScript and copy and paste the above. Don’t forget to add your own device name.

2 thoughts on “macOS: Connect AirPods With a Keyboard Shortcut

  • – You need to translate menu item to your local language

    – To show progress notification, add: display notification "Connecting to Airpods..."

    – More reliable way to get rid of bt menu is to press Escape: key code 53

    So, all in all:

    if exists menu item "Подключить" then
    click menu item "Подключить"
    display notification "Connecting to Airpods..."
    key code 53
    end if

Leave a Reply

This site uses Akismet to reduce spam. Learn how your comment data is processed.

WIN an iPhone 15 Pro Max!

Enter our epic giveaway for a chance to win the latest iPhone 15 Pro Max!