Your keyboard may be lagging because it's already running low on internal memory space. There are apps consuming too much memory so the keyboard can't use enough to work quickly.