Based on USBKeyboardMouse example. I added USB String Descriptor so mbed reports itself to host not only with VID & PID but also with name of manufacturer, product name, serial number, configuration number and interface name. These can be changed to matching Yours in USBhid.cpp file on lines 88 - 122.

Dependencies:   mbed

Revision:
0:f97b1f255167
--- /dev/null	Thu Jan 01 00:00:00 1970 +0000
+++ b/USBKeyboardMouse/USBKeyboard.cpp	Thu Sep 08 15:01:33 2011 +0000
@@ -0,0 +1,13 @@
+#include "USBKeyboard.h"
+
+USBKeyboard::USBKeyboard() {
+//    _buttons = 0;
+}
+
+void USBKeyboard::sendKeys(char *szString) {
+    keyboard(szString);
+}
+
+void USBKeyboard::sendKey(char c) {
+    keyboard(c);
+}