AirPods are good headphones, there is no doubt. It does not matter whether they are the normal ones or the Pro ones. One of the best qualities is the simplicity of pairing with Apple devices. But when you want to switch from one to another, iPhone to Mac for example, it is a bit tedious to re-link them. You can improve this process with a keyboard shortcut created on the computer.
We can improve the way to transfer the AirPods from a device to the Mac, with a simple keyboard shortcut.
The first time you connect the AirPods to the Mac it is very fast. But if I later want to use the iPhone or iPad, and return to the Mac, the process takes longer. Now, you have to click on the bluetooth menu and connect them manually. This every time I switch devices. It's a bit of a bummer. It can improve.
We are going to use the Script that Andrew Burns created and use a keyboard shortcut. The first thing is to open AppleScript and then we paste the mentioned code which is the following. Remember that you must change where it says SX-991 and put the name of your AirPods, exactly the same as how it is written, without changing one iota.
activate application "SystemUIServer"
tell application "System Events"
tell process "SystemUIServer"
-- Working CONNECT Script. Goes through the following:
-- Clicks on Bluetooth Menu (OSX Top Menu Bar)
-- => Clicks on SX-991 Item
-- => Clicks on Connect Item
set btMenu to (menu bar item 1 of menu bar 1 whose description contains "bluetooth")
tell btMenu
click
tell (menu item "SX-991" of menu 1)
click
if exists menu item "Connect" of menu 1 then
click menu item "Connect" of menu 1
return "Connecting..."
else
click btMenu -- Close main BT drop down if Connect wasn't present
return "Connect menu was not found, are you already connected?"
end if
end tell
end tell
end tell
end tell
Once you finish you must save what has been done as an Application. We are not done yet. At the moment it does not work. We have to carry out the following action, to give that application permission to control the Mac.
- Let's go to "Security and privacy" in System preferences
- We do click on the padlock to make changes.
- Choose "Accessibility»In the list of items on the left.
- We press the small button +
- Search your app and add it
Yes now. We are going to create the keyboard shortcut to make it work quickly. For this we help ourselves with a external program to help us do it. We recommend, for example, Snap. Little difficulty in performing the desired work.
Hi Manuel, I tried but it doesn't work for me when I run the script, this opens the menu but it is as if it did not apply the connection action.
What I can do ?
I am doing it on macOS Catalina
Thank you
Hi, check if you have the system in Spanish or English ...
I had to correct the script and change Connect to Connect