otgkey sends keycodes to /dev/hidg0 to emulate a keyboard on devices that support the USB Gadget protocol.
Send codes as sequences of "modifier:key". Multiple modifiers or keys can be pressed at once using comma-delimited lists, like "shift,meta:i"
For example, to type "Hello":
otgkey send shift:h e l l o
go install github.com/akerl/otgkey@latest
otgkey is released under the MIT License. See the bundled LICENSE file for details.