bluetooth keyboard wouldn't let me type my password on my iMac/Mac
I read other iMac/Mac users' posts about this keyboard-recognition problem. I just watched a YouTube video that solved this problem. It said to turn off your iMac/Mac and also unplug everything plugged into a USB port. Keep these unplugged for about 30 seconds, then turn on your iMac/Mac and plug everything back into those USB ports. Fixed!
iMac 21.5″, macOS 10.13