Welcome to Android Central! Which phone do you have? Does this persist after a reboot? Have you tried installing another keyboard, like Google Keyboard?
Also try going to Settings>Apps>All, select LG Keyboard, and Clear Cache/Clear Data, then Force Stop. Now try again.