I have a wireless keyboard and mouse that doesn\'t have any lock indicators, nor any software bundled to provide a visual aid, so I\'m making my own.
I got it so that if
Here is an example for intercepting the keyup on a form or something and tracking it. I changed a local variable, but you can just as easily trigger GUI updates at that time.
private bool capLock;
private bool numLock;
private void Form1_KeyUp(object sender, KeyEventArgs e)
{
if (e.KeyCode == Keys.CapsLock)
{
capLock = !capLock;
}
if (e.KeyCode == Keys.NumLock)
{
numLock = !numLock;
}
}