Here's my class... it supports mouse input and keyboard input, along with 3 other things you most likely won't use (especially because 2 of them are internal and the VC++ help file says to ignore them)
The code is a bit confusing... so just look at the #defines at the top to see the different things you can use, then look in the other file.
Enjoy!