keyboard stops working

Why would a keyboard only work a little when it's warm? You can't even call that a lose connection inside can you? I'd replace it.
I had the keyboard with my Imac which is now out of warranty, I have now bought a new one, the wired option as I didnt fancy replacing the batteries all the time in the wireless one .:icon_cheers:
I hate wireless keyboards and mice, they always lose connection and run out all the time. wired is def best!