GetKeyState (user32)
Last changed: -46.250.60.45

.
Summary
The GetKeyState function retrieves the status of the specified virtual key. The status specifies whether the key is up, down, or toggled (on, off—alternating each time the key is pressed).

C# Signature:

[DllImport("user32.dll")]
static extern short GetKeyState(int nVirtKey);

User-Defined Types:

VK

Notes:

Here are some sample values for nVirtKey:

const int VK_SHIFT = 0x10;
const int VK_CONTROL = 0x11;
const int VK_MENU = 0x12;

Tips & Tricks:

Please add some!

Sample Code:

Please add some!

Alternative Managed API:

Do you know one? Please contribute it!

Documentation
GetKeyState on MSDN