Hi There, I have been following this thread too.
We all have the same issues and spent 100s of hours trying to resolve this keyboard issue on my S4.
I reverted to a wireless logitech KB and Mouse to overcome the issue for £20. defeats the compactness!!!! but MS are not even trying to help us. My battery is not holding a charge now its about 4yrs old, and to try and get a battery changed, is challenging to say the least, so I will be moving to a mac-book soon me thinks.
In the mean-time, if anyone has a fix without a restore where I lose all my software programs, please let me know
Regards
John