+2  A: 

I would take a look at the Arduino microcontroller board - you can wire all sorts of things into that (buttons, sensors) and interface with it using the .NET Ports classes.

Mark B
I have seen that site before. And although it sure has what I want, there is no specifik information about what I need for my problem. I dont want to learn everything about microcontrollers, just solve the one button problem. So if there are a place that describes how to use that microcontroller board to send info to computer when a button is pressed then its what I want. But thanks anyway.
Stefan
+3  A: 

Might be worth a look at Phidgets:

http://www.phidgets.com/index.php

They do many little USB I/O devices, and the code samples are there on the site too.

Kim Blackburn
+1  A: 

I'm looking for the same thing. this might do the trick:

http://awatts.co.uk/

Haven't tried it yet, but he has code to run a shell command or simulate a keypress and the source code is available if you need something different.

And for Linux: search freshmeat dot net for usb-panic-button-daemon project. (I'm a new user, and can't post more than one hyperlink!)

And another thing I just found is that Griffin makes an SDK available (at least they used to, I'm waiting for a reply) for their PowerMate knob to get it to simulate more than mostly just keypresses.

BTW I'm looking for USB buttons, but I could use serial too, come to think of it.

michael