File APIs for Java Developers
Manipulate DOC, XLS, PPT, PDF and many others from your application.
http://aspose.com/file-tools
Win a copy of Clojure in Action this week in the Clojure forum!
    Bookmark Topic Watch Topic
  • New Topic

Detecting Key Presses in Windows (without focus)

 
Micho Lee
Greenhorn
Posts: 14
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
I'm writing a java application that runs in the background in a Windows XP environment. I need a way for the application to detect when certain keys have been pressed on the keyboard even when it is not in focus. Kind of like a key logger would do, I need it to detect any keys that might be pressed. Does anyone know how to implement such a "global" key listener so that a key press can be captured at any/all times within Windows?

Help (esp exaple code) would be much appreciated. Thanks in advance!
 
Layne Lund
Ranch Hand
Posts: 3061
  • 0
  • Mark post as helpful
  • send pies
  • Report post to moderator
Please don't cross-post. It wastes our time because an answer may have already been given in another forum. See my comments here.

Layne

p.s. Can a sheriff please close this thread? Thanks.
 
I agree. Here's the link: http://aspose.com/file-tools
    Bookmark Topic Watch Topic
  • New Topic