Bluetooth keyboard no longer recognized by iMac
My Bluetooth keyboard has suddenly stopped working - it doesn't show up in BT preferences, nor in the dropdown BT menu. When I attempt to add a new BT device, the keyboard is recognised by its name (the one it has always had), but attempts to pair it always fail.
I have reset the SMC to no effect.
The green light doesn't flash while I'm attempting the pairing - I don't know whether it should or not.
BT seems flaky - sometimes it offers me a code for the pairing, but usually not. I've tried to pair it about thirty times in all.
I don't understand why the keyboard doesn't show up in the BT preferences, since its name is recognised when I attempt to pair it. Since its name doesn't show up in BT preferences, I obviously can't delete it from there and start afresh.
All help gratefully received.