If your Bluetooth works great on LITERALLY EVERYTHING BUT keyboards and mice, then your system configuration may be the issue. I recently bought a Lenovo Yoga mouse and finally realized what was wrong with my Bluetooth.
Simply change ControllerMode to dual.
Edit /etc/bluetooth/main.conf and find ControllerMode
sudo nano /etc/bluetooth/main.conf
# Restricts all controllers to the specified transport. Default value
# is "dual", i.e. both BR/EDR and LE enabled (when supported by the HW).
# Possible values: "dual", "bredr", "le"
ControllerMode = dual
Hopefully, after this and a quick restart:
sudo systemctl restart bluetooth
You will be able to connect your favourite mice and keybaords again.