interface to usb keyboard

would it be possible to hook a arduino up to a usb keyboard and respond to keypresses. And no i don't want to hack the keyboard. the goal is to make a device that sits between keyboard and computer. so it should only listen to messages, but not send them.

is there a "sniffer" like library around to use a digital pin as a usb input?

The USB protocol is mighty complicated and requires serious hardware.

There have been some (limited) succes with doing usb stuff wit Arduino.

Check the recent thread about AVRusb

Search the forums a bit (tip: use google by typing "site:arduino.cc keywords" in the google search box). There was a reasonably extensive discussion on this subject a while back.

Short answer: nope. AVR isn't fast enough to capture and process the data.

-j

There is a playground article here http://www.arduino.cc/playground/Main/PS2Keyboard that describes how to get an arduino to respond to PS2 keyboard events

i've given up the idea. i was planning a device that produces typewriter sounds when pressing key's. but that is easier done in just software than hacking usb...

case closed

Just use an old keyboard, most of the time they DO sound like a typewrite :)

If you still want to do this project then an easy way to implement USB is by using the Create USB Interface www.create.ucsb.edu/%7Edano/CUI/
This allows easy access to the complex protocol as a HID (Human Interface Device) which is the class of device that includes keyboards.