Settings... Apps... Show system apps... Keyboard.... > force stop app, Wipe its cache... Try again. If still playing up, wipe its data too. Reboot.
While you're at it, wipe cache partition of the device also.. That cures most minor ailments.
If you keep Alot of stuff on clipboard it will lag. Press and hold down like your going to copy and paste when clipboard pops up click it and delete all the stuff in there hell you phone will run better to. Sounds stupid but it works.