v-usb with default arduino bootloader on ATMega328
vusb-for-arduino
This is actually quite an old project (it works with arduino 0020)
but it can be used as a good reference
and probably easily ported to the newer IDE

Also look here its a newer project but it only has keyboard