Monitoring USB Keyboard Input with Microcontroller
Essentially what you want is a USB protocol sniffer.   There are commercial ones but they can cost hundreds of dollars and they are usually designed to send information to a PC for a GUI interface.    There are also software-only sniffers (some freeware) that run in Windows and show the USB traffic going into and out of a PC, but I gather that won't work for you either.

You should consider the BeagleBoard USBSniffer, which is an open source protocol sniffer.  The host computer is connected to the slave USB port of the BeagleBoard, and the device to be sniffed on the host USB port.  It then logs the data going over the USB ports.  You could modify the logging routine to fit your needs.

It has been tested with a Logitech keyboard.