There are limits. USB keyboards are just always going to be slower than PS/2 keyboards. You can close the gap, but USB is just fundamentally adding wrapping layers that introduce latency over the direct polling PS/2 used. And there's a lot of this at the hardware level, where standardized connections with complex protocols replace weird custom connectors. USB is most definitely easier to plug something in to than PS/2 ports, where you had different ports for mouse and keyboard and they weren't interchangeable. (Ok, some very late motherboards supported using either in a single port, but it wasn't the way most PCs worked.)
You can do a lot at the high levels, but everything needs to be reworked from the hardware level up to match the latency of older systems.
> USB is just fundamentally adding wrapping layers that introduce latency over the direct polling PS/2 used
PS/2 did not use polling, it was entirely event-driven. On keypress, the keyboard sent a serial message to the 8042 controller [1], which then raised the appropriate interrupt line on the CPU, which caused the keyboard ISR [2] to be executed. The serial clock was a bit flexible, but usually sat around 10-16 kHz [3], and so the 11-bit serial message took at most 1 ms to send.
It is USB that uses polling. The keyboard describes itself using endpoint descriptors, and after obtaining these, the host controller periodically polls it with an IN token, to which the keyboard responds with its state changes since the last poll [4]. The earliest USB keyboards preferred fairly slow polling rates, but modern keyboards can be polled every 1 ms [5]. If directly connected to a motherboard USB port, a modern USB keyboard will have pre-software input latency on par with a PS/2 keyboard.
Yeah, I'd say the bigger point is that the latency gap isn't really there anymore. Old keyboards, cheap keyboards, expansion ports, and external hubs can still cause problems, though.
You can do a lot at the high levels, but everything needs to be reworked from the hardware level up to match the latency of older systems.