The exact same thing happened to me, but it's not batteries. When I try to use the symmetry feature (X) or even type a name in for a spacecraft it won't let me use my keyboard. I deleted all my mods and rebooted my computer. And as you can see I can type perfectly fine here, just not use any keys in KSP.
I also use a Mac (non-Steam)