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
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
click
tell menu 1
if exists menu item "Connect" then
click menu item "Connect"
else
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.
Also, you can make an Automator service and call it with keyboard shortcut without any extra software
– 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..."
else
key code 53
end if