Generally, Windows programs are very event based systems - a user presses a key, the key down event is fired with the information on what key was pressed, and the application reacts accordingly. There are sometimes cases, however, when the program needs to know the current state of the mouse/keyboard, but we don't have a handy event with the info about which keys are down or mouse buttons are pressed. Now you could always maintain this state yourself in some sort of data structure and updating it on key/mouse up and down events - but that is a lot of work, and, as it turns out, unnecessary. There are already functions built into .NET that let you access most (but not all) of this info - and in the case where there is not a built in function, the answer is just a simple interop away! And that is what we are going to take a look at today.