If updating the app for the keyboard didn't help, and clearing out the current keyboard data didn't either, the only other option I can think of is to do a "Hard Reset" of the phone. However, doing that will wipe all personal data from the phone. Before doing it, I would back up what you can (if you plug it into a computer via USB, you should be able to back up photos, music, etc.).
Should you choose to do the "Hard Reset" the instructions are below...
NOTE: Doing this will clear 'all' the data on your phone, so it is suggested you not choose this option unless you have to, or aren't worried about losing anything on the phone.
Be sure you back up any data you want to keep, to a computer or cloud account, before doing the reset.
To "Hard Reset" the phone...
1. Make sure that the phone is actually powered off.
2. Press the "Power" and the "Volume Up" buttons, together, until you see the start-up logo on the screen.
3. Once you can see the logo, release the buttons and allow the device to enter the "System Recovery Mode".
4. Next use "Volume Down" button to get to the "wipe data/factory reset" option When in recovery mode the "Volume Up" and "Volume Down" buttons are how to can navigate and highlight what option you need.
5. Once you have selected the "wipe data/factory reset", press the "Power" button to select that option.
6. On the following screen, repeatedly press the "Volume Down" button until the "Yes - delete all user data" option is what is selected.
7. Then press the "Power" button to hard reset the phone.