To implement a usb keyboard it is just a matter of setting up the descriptors properly. The hid documentation has a good example of the keyboard descriptor. http://www.usb.org/developers/devclass_docs/HID1_11.pdf
Here is the mouse example descriptor that has been modified to work as a keyboard. To send a key stroke to the PC is as simple as (similar to mouse example included with PBP):
USBOut 1, buffer, 8, endgame
after initializing the device
where buffer is 8x8bytes
1st byte = modifier keys (i.e. ctrl, alt, shift)
2nd byte = reserved
3-8 = keys pressed ( 0x04 = a, 0x05 = b, ...)
I don't know how to combine both a keyboard and a mouse together in one device but I have heard of making a composite device being one possible way. But as of yet, I have not got anything working.
I understand this is a late reply but hopefully someone else might get something from it.
Bookmarks