Magic Mouse and Apple Keyboard on Ubuntu-macOS dual boot
Number 5 no longer works for Monterey, MacOS. Do the following instead : Open the Keychain Access application. Type "bluetooth" in the search field, then double-click on the latest MobileBluetooth entry. A new window opens. From that new window, you will see your device address in the Account field (xx:xx:xx:xx:xx:xx). Write it somewhere else. Then, in the same window, tick Show password and enter your credentials (twice). The now revealed password is in fact a full XML file. Click on (i.e. highlight) the field, press Option + A (capital) then copy-paste it to a document. It is very long so most of it is hidden. Keep on moving forward and more appears. Below <key LinkKey</key, the value between the string>xx-xx-xx-xx</string is the link key. It no longer needs to be reversed to add to Ubuntu. Then boot into Ubuntu and follow the guide.