import java.awt.*;
import java.awt.event.*;
class statuscaps
{
public static void main(String args[])
{
boolean status = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
if(status)
System.out.println("You Caps Lock is on");
else
System.out.println("You Caps Lock is off");
}
}
import java.awt.event.*;
class statuscaps
{
public static void main(String args[])
{
boolean status = Toolkit.getDefaultToolkit().getLockingKeyState(KeyEvent.VK_CAPS_LOCK);
if(status)
System.out.println("You Caps Lock is on");
else
System.out.println("You Caps Lock is off");
}
}