- 应该支持macOS 10.12~macOS11,不过我只测了macOS10.15.7(Catalina)和macOS11.1(BigSur)
- 同时支持python3和python2,因为python3不是默认装的,这里用python2来示范。
- 记得点
star
- 在windows下配对蓝牙设备
- 在macOS下配对蓝牙设备
- macOS打开终端(Terminal)运行以下脚本(3行一起复制,一起粘贴.会要求输入密码)
cd ~/Desktop/; curl -o BT-LinkkeySync.py \ https://cdn.jsdelivr.net/gh/lietxia/BT-LinkkeySync@1.1.0/BT-LinkkeySync.py \ && sudo python BT-LinkkeySync.py
- 桌面上会产生
btkeys.reg
,把他放到 windows能访问的目录 - 启动windows,关掉windows的蓝牙
- 下载PStools 程序网站 or 直接下载
存到
C:/pstools/
,保证C:/pstools/
下面有psexec.exe
(其他地方也行) - 按
windows键
+X
,弹出菜单选powershell(管理员模式)
,运行脚本(如果换了目录,自行把C:/pstools/
改成相应的目录)C:/pstools/psexec.exe -s -i regedit
- 选
文件
->导入
把btkeys.reg
导入进去 - 重启win10
- 打开蓝牙,你的蓝牙设备就能在双系统愉快的玩耍了。
Script to synchronize bluetooth link keys from macOS to windows. It generates a registry file for windows on macOS, which can afterwards be imported with the tool regedit in windows.
- Pair all your bluetooth devices to your Windows (e.g. keyboard, mouse, headphones)
- Pair all your bluetooth devices to your Mac (e.g. keyboard, mouse, headphones)
- Open the Terminal and run the script with (you will be asked for your password)
cd ~/Desktop/; curl -o BT-LinkkeySync.py \ https://cdn.jsdelivr.net/gh/lietxia/BT-LinkkeySync@1.1.0/BT-LinkkeySync.py \ && sudo python BT-LinkkeySync.py
- Store the generated file
btkeys.reg
file to a location accessible by windows. - Boot windows and close your bluetooth devices
- Download PStools website_download or direct_download
and store it to
C:/pstools/
- Press
Windows key
+X
and select powershell (admin). Run the command:C:/pstools/psexec.exe -s -i regedit
- Import the file
btkeys.reg
- restart windows
- Use your keyboard on macOS and Windows
Test Environment:
- OSx86 Hackintosh with DW1820A
- macOS Catalina 10.15.7/macOS BigSur 11.1
- Windows 10 20H2
- Python 3.8/Python 2.7
BT 4.0 LE/Smart Devices (e.g. Logitech MX Master) do not work yet. If you know how to get it working feel free to contribute :)
Try the other way round (Pair on Windows and import in macOS) maybe get Bluetooth 4.0 LE Working
Related Blog Post on InsanelyMac of camoguy