Went searching for a solution for this today and ran across this for the Surface 2, seems to also work fine for the Lumia powered keyboard.
How to Fix Surface Pro 2 “Plugged In, Not Charging” Error
Instead of shutting down I did this while in desktop mode (thought it would do a hard reset :smile: ), instead the Power down option comes up, I held it for about 30 more seconds after that, when I let go I heard the disconnect and reconnect of the keyboard. When I pushed the power screen up so it wouldn't shutdown I noticed the battery icon in the task bar was a dark grey color and after clicking on it both the keyboard and tablet batteries said 0% and not charging. I then disconnected the power cable and plugged it back in, my tablet was already 100% charged so the keyboard immediately started charging.
About 1 minute after I began typing a response to you when I noticed the battery again said plugged in but not charging. So I canceled my post, walked away and when I came back I noticed the battery icon was changing as if something was charging. To my surprise the status changed to "plugged in, charging" and the Keyboard battery went from 15% (where its been since yesterday) to now 36%. Just now again while typing (I think it doesn't like me typing this :smile ), it stopped charging again, disconnected and reconnected the charging cable and it went back to charging.
I have three of these keyboards so later I'll try one of the others to see if its just this one, would be sad though since this is my second one and its only 2 weeks old today. The last one the guides that keep the tablets in place broke out (they are plastic, yeah) and one of the pins the spring stopped working so it doesn't connect to the tablet's connector, so half the keyboard doesn't work. I wonder if the 12 month warranty on these covers all these issues.
P.S. been 10 minutes since I started to retype this and its still charging, at 51% now.