Tag Archives: scrolllock

Detect whether capslock, scrolllock or numlock is active.

To detect whether capslock, scrolllock or numlock is currently active use the static function Control.IsKeyLocked

Valid are Keys.ScrollKeys.NumLock and Keys.CapsLock

The Keys enumeration can be found in System.Windows.Forms.Keys

Example:

If (Control.IsKeyLocked(Keys.CapsLock))
{
}
Lastest update in May 2011, inital post in May 2011