I had the same issue and through some deduction, I was able to figure out the cause of my lagging keyboard.
I ran through the normal steps; checking drivers, checking windows updates checking software installs and the like. When none of that proved to be the cause I looked at hardware changes.
BINGO... the only thing I'd done is plugged in an external hard drive recently.
So I unplugged it.
It immediately fixed the problem.
After some looking, I found that USB 3 causes some interference with other USB devices. Then I thought if I had a Logitech Keyboard and mouse using the same dongle, why was it only my keyboard? And I realized I was using a Logitech unifying dongle but my mouse (performance mx) had its own dongle in a different USB port elsewhere.
So I hope this might help someone as much as is did me.