ESPHome abstracts the code generation to a YAML file which makes writing code for automating stuff easier. Because I don’t write the code.
The important bit I seem to get from your post is:
There is only one HID on the port, but currently it is no boot protocol port. I’ll see if the ESPHome developers are willing to add this.