Thank you all for the tips. Had the same problem as all of you. Used water and baking soda to loosen the corrosion and a good long and sharp corkscrew to hook into the batteries. The third battery was more difficult to extract and needed more water and baking soda than the other 2 batteries. With my 4 1/2 inch corkscrew was able to ''uncork'' my last battery after adding also a little WD-40.
My recommendation would be to use baking soda and water, WD-40 if necessary, and buy a good corkscrew with a sharp tip, and a bottle of good wine. The latter is not for the keyboard, but for you as a reward for having mastered the art of ''uncorking'' batteries.
You will have a hard time finding a 4 1/2 inch long corkscrew, but mine did just fine. It is a ''Screwpull'' corkscrew, a little pricey, but even with a bottle of wine, still cheaper than a new wireless keyboard.
À votre santé!
Cheers!