MIDI latency issue Cubase 7.5

Hello everyone. First post in this forum and it’s a stinker. I’ve been using Cubase 7.5 now for at least five years with no MIDI issues. I use a MK149 midi keyboard, Scarlett 2i4 interface and HP laptop. I use Native Instrument’s Komplete 9 VSTs.

While working on a project, I noticed something strange when recording MIDI. When I press record and the transport bar starts moving to the right, for the first few seconds, every note I play is stuck on the same line at the point where I started recording. Then after a while the notes start following the bar as they should, but a long way behind it. It seems like a latency issue but I have tried everything. I’ve changed buffer size, changed midi cables, a new usb cable, even tried a different midi keyboard. The problem persists when using the Focusrite driver or the laptops default audio driver. I’ve never had this issue before and haven’t changed any settings. The weird thing is when I use the virtual keyboard in Cubase, the issue goes away. It’s only when I use a midi keyboard.

I don’t have any multiband compression or other after effects assigned to any of the MIDI channels. I have tried starting a fresh project and the problem continues.

My next idea is to try to connect the midi keyboard directly to the laptop using a MIDI/USB interface, but not confident this will work.

If anyone has any pointers, that would be great.

Thank you!