Clearing the cache of a problem app:
Open Settings app.
Tap Apps.
Tap the More settings icon (three-dot icon, upper right).
Tap Show system apps.
Find and tap Samsung Keyboard (look for appropriate one if you’re not using this) app.
Tap Storage.
Tap Clear cache button.
Restart the phone and check for the problem.
Reset keyboard app
If keyboard app is still not working, you must follow the previous step through with clearing the app’s data. This will reset the app to its defaults. Here’s how:
Open Settings app.
Tap Apps.
Tap the More settings icon (three-dot icon, upper right).
Tap Show system apps.
Find and tap Samsung Keyboard (look for appropriate one if you’re not using this) app.
Tap Storage.
Tap Clear data button.
Restart the phone and check for the problem.