View RSS Feed

Recent Blogs Posts

  1. Adding "Global" KeyListener

    by , 10-17-2011 at 07:00 PM
    Want to add a so called "Global" Keylistener to your Java application even if it is a JWindow or JFrame without having focus on it. Just download the file in the link and extract, add the jhook.jar file to your project library and use this demo code to get the keys pressed.

    Java Code:
    Keyboard kb=new Keyboard();
            kb.addListener(new KeyboardListener() {
                public void keyPressed(boolean keydown, int vk){
                    System.out.println(vk);
    ...

    Updated 10-19-2011 at 09:33 AM by DuvanSlabbert

    Categories
    AWT and Swing