Try pushing the back cover of your phone in when the keyboard stops working. It should work
The issue is caused by a loose ribbon cable. If you have the tools, you can fix it yourself and prevent it from happening again.
Here are the instructions:
http://forum.ppcgeeks.com/showthread.php?t=62876