Permanently reject Bluetooth pairing request

While the pairing request is still showing on your screen:

  1. Press and hold the Option key (or Alt), and then click the bluetooth icon in the top bar.
  2. In the submenu for the offending device apart from Disconnect, you will now see an additional option - Remove.
  3. 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:

  1. 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)
  2. Turn off bluetooth (System Preferences -> Bluetooth)
  3. 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)

  4. Because the plist files are in binary format you'll need to convert them to xml: plutil -convert xml1 com.apple.Bluetooth.plist

  5. Edit the converted plist files in a text editor.

    1. Find the (lowercase) bluetooth address in the file. It should be in a <key></key> tag.
    2. Delete the <key>...</key> tag and the immediately following <dict>...</dict> key.
  6. Save the text file and convert it back to binary: fplutil -convert binary1 com.apple.Bluetooth.plist

  7. Repeat for both locations of the file.

  8. Restart Bluetooth