the same way as the last one but the first thing I would try is to turn OFF Bluetooth.
That way, the system will not bother searching for one.
I would also consider replacing the keyboard with another USB one to see if you have the same, "Doesn't work until I unplug it", problem
If neither of those two things work, then it's back to Apple to get them to take a look at it
Hello...I have a 27" iMac bought in 2011. I am using an apple usb keyboard. Sometimes when I start or restart, a dialog pops up that says something about no keyboard attached and the computer is searching for a bluetooth keyboard. The usb keyboard is definitely attached but does not work unless I pull the usb out and plug it back in. This hasn't happened since apple replaced the motherboard 3 or 4 weeks ago. Prior to that, my motherboard had issues that required apple to replace it. My motherboard issues were causing the computer to not display properly, but during that time, I started getting this same bluetooth keyboard search issue. Is it possible that my motherboard is again crapping out after 3 weeks? If not, any suggestions on what to check regarding this? Should I trash any bluetooth prefs, etc?