Don't give up. Linux can do it with the right hardware, via "USB Gadgets." And giving the following facts:
- My old Nokia N95 could use it's USB to be a "Mass Storage Device", a "Media Player", "a GSM modem", or to print photos.
- I can plug an iPhone into an iPad via a the Apple USB-Camera passive adapter, and they transfer pictures.
- iPhone can obvious present as a number of things, e.g. when they go into DFU.
Why is all this relevant?
Because if I was writing a linux phone I know what it would do, and how it would do it. And the answer would involve USB Gadgets.
Reading one of the links that was posted here,
It's the Linux kernel, the code is in drivers/usb/gadget/ in the
kernel.org tree if you are interested. Android does have a few
specific gadget patches that are not in mainline, but it's not all
that much. You can see all of this by just checking out their kernel
git tree, no need to bother their developers.
I would guess that you would have a shot at it - but it would involve recompiling the android kernel/operating system - or at least having a build environment in which you /could/ rebuild the kernel if you wanted.
BTW, I have an Atmel NGW100mkII, which support USB gadgets, but doesn't ship with the HID module. And I'll be having to do the above and more.