Trying to read Scroll Lock status using JAVA
问题 I have the below lines of code using which i am trying to read status of scroll lock. I get the status of scroll lock when my program starts. However i am willing to get the status realtime. Please guide on the below package assignment; import java.awt.Toolkit; import java.awt.event.KeyEvent; import org.omg.PortableServer.THREAD_POLICY_ID; public class ScrollLockOnOff { public static void main(String[] args) throws InterruptedException { while(true) { Thread.sleep(1000); Toolkit toolkit