Quickly swap Apple Magic Keyboard between computers? [duplicate]
I just got a new work laptop. I would like to seamlessly switch my bluetooth devices (headphones, magic keyboard, touchpad) between work / personal Macs without complex repairing.
Has anyone solved this problem?
Ideally, I would love it if my bluetooth devices just paired with the computer docked into my dongle that connects to my monitor / power. Like if there was some kind of USB bluetooth controller that exposed my bluetooth devices as USB devices to whatever was connected to it, that would be awesome. But I haven’t found anything like that. I’m curious if people have different solutions?
It would also be ideal if this could be used for other bluetooth devices, ie seamlessly switch headphones...
Solution 1:
The Apple Magic Keyboard does not have similar functionality.
If you want to quickly switch between devices, the best way to do so is to (at least temporarily) connect the keyboard to the Mac you want to use it with via a lightning cable.
Ideally, if you are swapping between them frequently, I would just leave a lightning cable connected to both, and plug it in to the computer you want to use.
Obviously not as slick as something that has a button to press to switch between devices, but it's the best way to switch between devices without buying new hardware.
Toothfairy
There is also a Mac app called Toothfairy which will let you connect/disconnect Bluetooth devices from your menu bar. $5 from the Mac App Store or part of Setapp.
Toothfairy is usually thought of as a tool to help with AirPods, but it works with all sorts of Bluetooth devices, including Magic Keyboard and Trackpad. A nice bonus is that it can show you the battery level of each device in the menu bar as well.
Solution 2:
I would like to seamlessly switch my Bluetooth devices (headphones, magic keyboard, touch pad) between work / personal Macs without complex repairing.
Has anyone solved this problem?
Yes.
You purchase Bluetooth devices (keyboard, mouse, headset, etc.) that have multiple device support.
-
The Magic Keyboard, Mouse, and Trackpad are designed to be paired with a single computer (they make no reference to multiple device pairings). However, products like the Logitech MX series as well as the K380 (typing on it right now) can pair with up to 3 devices and switch with the press of a button.
-
Sennheiser headphones (my personal choice) can pair with up to 8 devices total and with 2 simultaneously. There are many other brands (Bose, Apple AirPods, Sony, etc.) that have this functionality.
There’s no software that is going to your initiate your Bluetooth devices to switch from one device to another - you can only imagine the security implications!
Bottom line, to easily switch between devices without complex the re-pairing as you describe, you need devices that support multiple pairings. If the device doesn’t support it, you’ll need to pair and unpair it each time.
Solution 3:
Well, after much playing around I was able to find something that is pretty close. This works by installing blueutil and creating an identical automator script on both devices:
- Install blue util (can be done via 'bower install blueutil')
- Run blueutil --pared and idnetify device address, this is the device id used below, just substitute '-' with ':' (e.g 40:e6:4b:8d:52:12)
- In automator Create new automation of type 'Application'
- Add step to 'Run Shell Script'
- Enter script (notice my shell is zsh, so if yours is different either install it or update command to fit your shell, such as 'if' statement of parenthesis):
res=$(<blueutil_folder>/blueutil --is-connected 40:e6:4b:8d:52:12)
if [[ "$res" = '1' ]]
then
<blueutil_folder>/blueutil --unpair 40:e6:4b:8d:52:12
else
<blueutil_folder>/blueutil --unpair 40:e6:4b:8d:52:12
sleep 1
<blueutil_folder>/blueutil --pair 40:e6:4b:8d:52:12
sleep 1
<blueutil_folder>/blueutil --connect 40:e6:4b:8d:52:12
fi
- Save the script to desktop.
- Copy script to second device, make sure to update the blueutil_folder correctly
now, whenever you want to switch between devices run the script first on the device currently connected to keyboard and then run on the other device and viola! keyboard now connected to other device.
P.S the script sometimes hangs when trying to connect, in such case I turn off and back on the keyboard and run again
Explanation: first it is checked if we are connected, if we are we disconnect and if not reconnect. When disconnecting from currently connected device unpairing is done to avoid reconnect back and connection issues with other device. When reconnecting pairing and connecting is run (unpair in beginning just in case) Hope this helps, post a comment if it works or experienced other issues.
Good luck!