How to fix iPhone keyboard lag

1. Settings > Reset > Reset All Settings

2.  Settings > General > Keyboard > Shortcuts

3. Delete all shortcuts

4. Reboot or Hard Reset your iPhone
(Hard Reset: Push and hold Home button and Sleep button until apple logo appears)

5. Create a shortcut in Settings > General > Keyboard > Shortcuts and delete it.