Also from Wikipedia:
All hardware keyloggers have to have the following: * A microcontroller - this interprets the datastream between the keyboardand computer, processes it, and passes it to the non-volatile memory * A non-volatile memory device, such as Flash - this stores the recorded data, even when power is lost
The recorded data is retrieved by typing a special password into a computer text editor and then hitting "Enter". As the hardware keylogger is plugged in-between the keyboard and computer, it detects the password has been typed and then starts presenting the computer with "typed" data to produce a menu. Beyond text menu some keyloggers offer a high-speed download to speed up retrieval of stored data, this can be via USB mass-storage enumeration or with a USB or serial download adapter.
Hardware keyloggers are usually black in colour and measure about 5cm in length. They are slightly thicker than the average cigarette. They commonly have storage capacity ranging from 64K to 4MB. A 256K model can record about 128 pages of text. Hardware keyloggers also come in USB models, although these are considerably more expensive.