[EN] Try the SoftHost USB library for ESP32.
This article is an example of using nathalis‘s ESP32 Soft Host to try and test it on an OLED display with a resolution of 128×64 dots as shown in Figure 1 to receive data from a keyboard or mouse, it uses only a few GPIO pins but receives data from a keyboard with a large number of keys. Normally, the ESP32 microcontroller does not support a direct USB connection, so it requires programming by using a timer to check the status of the pins D- and D+ to be assembled into data at the byte level and assembled into packs of data for further interpretation.