Permanently reject Bluetooth pairing request
While the pairing request is still showing on your screen:
- Press and hold the Option key (or Alt), and then click the bluetooth icon in the top bar.
- In the submenu for the offending device apart from Disconnect, you will now see an additional option - Remove.
- Click Remove.
If you can physically access the keyboard, you can turn it off by long pressing the right-side button, if it is an Apple Wireless keyboard. See also https://support.apple.com/en-us/HT201178.
I found a way to work around this: (inspired by this question https://superuser.com/a/497193/10009)
Assumptions:
The offending keyboard previously was paired with this computer, therefore the computer 'remembers' the device.
Caveat:
This involves modifying system settings files so be careful.
Steps:
- Find the Bluetooth address of the offending device and write it down. (Shows up in the System Preferences -> Bluetooth window when the pairing request is happening)
- Turn off bluetooth (System Preferences -> Bluetooth)
Back up your /Library/Preferences/com.apple.Bluetooth.plist , and ~/Library/Preferences/com.apple.Bluetooth.plist files. (You'll need sudo for the first one)
Because the plist files are in binary format you'll need to convert them to xml:
plutil -convert xml1 com.apple.Bluetooth.plist
Edit the converted plist files in a text editor.
- Find the (lowercase) bluetooth address in the file. It should be in a
<key></key>
tag. - Delete the
<key>...</key>
tag and the immediately following<dict>...</dict>
key.
- Find the (lowercase) bluetooth address in the file. It should be in a
Save the text file and convert it back to binary: f
plutil -convert binary1 com.apple.Bluetooth.plist
Repeat for both locations of the file.
- Restart Bluetooth