Over the last month my Apple Bluetooth keyboard started burring through batteries and then the other day just quit working. I read pages and pages of support forums and found one bit of advise.
Take a small piece of Aluminum Foil and drop it down the battery shaft then put the batteries (new) in the keyboard. It worked for me and may others. Hope this helps some of you.
About the Foil.
Get a piece about the size of a Hershey’s kiss wrapper. Tear it in half, and fold it into a square. I the wrapped the positive end of the first battery with the small sheet of foil. then let it slide down the shaft and then put the other 2 batteries then screwed the top back on.