https://en.wikipedia.org/wiki/PS/2_port#Conversion_between_P...
And the page it referenced:
https://www.nxp.com/docs/en/reference-manual/DRM014.pdf#page...
In Page.11, it show the algorithm to distinguish PS/2 and USB, based on USB D+ and PS/2 clock signal.