Regarding emulating a USB device, first thing that comes to mind is possibly using a micro of some sort that can act as a usb device, like an arduino or teensy. it's a bit hackish, but sending things over SPI should get more than ample speed for keyboard/mouse emulation, and there's code written already for a lot of micro platforms to do both.
http://www.auvidea.eu/index.php/theme-styles/2014-12-30-22-3...
Regarding emulating a USB device, first thing that comes to mind is possibly using a micro of some sort that can act as a usb device, like an arduino or teensy. it's a bit hackish, but sending things over SPI should get more than ample speed for keyboard/mouse emulation, and there's code written already for a lot of micro platforms to do both.