looks like more than I need with potential for increased latency. I plan to take video in from the pc via usb video link and just want to react via /dev/input/mouse0 to the pc. I attempted the raspberry pi gadget type mode but this crashed the system possibly due to the fact that the jetson is already using gadget mode on the micro usb for the sdk up-link. I dont however see settings for usb hid or any such settings so far. One option may be to pass usb/ip on that usb link.
The “gadget” framework is just a template for various “standard” devices. The port is normally in device mode when a micro-B USB cable is used, but the only gadgets set up are currently mass storage and virtual wired ethernet. It would require a bit of a learning curve, but you could extend what is there and create a “gadget” keyboard, then some program which triggers key presses. The documentation for gadget is here: https://www.kernel.org/doc/html/v4.13/driver-api/usb/gadget.html
In theory you could add extra code to the existing content in “/opt/nvidia/l4t-usb-device-mode”. This would save having to set up for device mode, but you would still have to create all of the keyboard device content.