The following configuration should work with any other distro and probably other bluetooth keyboards as well.
2 configurations files need to be updated to make it work:
- /etc/default/bluetooth should contain the following, with the mac address replaced by the one from your keyboard (hidd --search to see it).
HIDD_OPTIONS="--timeout 8 --connect 00:1D:4F:A7:15:CC --server"
- /etc/bluetooth/hcid.conf should be appended with
name "Apple Wireless Keyboard";
The 2 tricky parameters are "lm master" (makes it connect automatically), and "--timeout 8" that makes it not disconnect contrary to what the option tells. Without the option the timeout of the keyboard is about 11 minutes. If the computer timeout is lower, the connection will be reestablished automatically, thus the value of 8.
Jun 16th update: I still had disconnections, the only way I found to get rid of them was to patch the kernel. I find surprising it was needed, I thought there would have been enough people complaining that the patch would have already been applied in Fedora kernel.