JAVA - using a Java applet, how do I turn PC keyboard LED's on and off?

Posted on 2004-11-24
Last Modified: 2008-03-04
Programming in Netbeans IDE 3.5.1 (JAVA), I need to turn the CAPS LOCK, NUM LOCK and SCROLL LOCK lights (led's) on the PC keyboard on and off using an applet.
Question by:watunda
    1 Comment
    LVL 3

    Accepted Solution


    You could try and use the Toolkit class and the Toolkit.setLockingKeyState(int keyCode, boolean on) method to set the keyboard lights and off...

    an example of this code is

    Assuming u dont need actions and listeners, you can tweak this code to serve your purpose

    Featured Post

    What Security Threats Are You Missing?

    Enhance your security with threat intelligence from the web. Get trending threat insights on hackers, exploits, and suspicious IP addresses delivered to your inbox with our free Cyber Daily.

    Join & Write a Comment

    Suggested Solutions

    Purpose To explain how to place a textual stamp on a PDF document.  This is commonly referred to as an annotation, or possibly a watermark, but a watermark is generally different in that it is somewhat translucent.  Watermark’s may be text or graph…
    RIA (Rich Internet Application) tools are interactive internet applications which have many of the characteristics of desktop applications. The RIA tools typically deliver output either by the way of a site-specific browser or via browser plug-in. T…
    In this fourth video of the Xpdf series, we discuss and demonstrate the PDFinfo utility, which retrieves the contents of a PDF's Info Dictionary, as well as some other information, including the page count. We show how to isolate the page count in a…
    In this seventh video of the Xpdf series, we discuss and demonstrate the PDFfonts utility, which lists all the fonts used in a PDF file. It does this via a command line interface, making it suitable for use in programs, scripts, batch files — any pl…

    746 members asked questions and received personalized solutions in the past 7 days.

    Join the community of 500,000 technology professionals and ask your questions.

    Join & Ask a Question

    Need Help in Real-Time?

    Connect with top rated Experts

    15 Experts available now in Live!

    Get 1:1 Help Now