This is windows, so there are at least two ways,
Control.IsKeyLocked[
^] and
Console.CapsLock[
^]
if (Control.IsKeyLocked(Keys.CapsLock))
{
Console.WriteLine("The Caps Lock key is ON.");
}
else
{
Console.WriteLine("The Caps Lock key is OFF.");
}
And
if (Console.CapsLock)
{
Console.WriteLine("The Caps Lock key is ON.");
}
else
{
Console.WriteLine("The Caps Lock key is OFF.");
}