There is a repair guide for an Apple Wireless Keyboard here:
https://www.ifixit.com/Guide/Repairi...ying+it./30578
If your keyboard is of similar construction, I would happily cough up the dough for a new one, as I would not want to embark on such a repair! It may be worth trawling the ifixit guide for a similar instruction for your keyboard but I did not spot all the Apple models on it.