I am writing a program that needs to be able to respond to keyboard actions regardless of what application has the focus at the time but after hours of searching the internet I have found no way to do this. for example, the program needs to be able to respond to keystrokes being entered into MS word without disrupting MS words reaction.
to clarify, I need to retrieve all events directly from the operating systems event queue.

Java (along with its standard libraries) doesn't directly support this. The only way is to drop down to the platform specific stuff and interface that with your Java application using JNI/JNA.

There was an entire discussion pertaining to this topic with example code I guess but the link (http://forums.sun.com/thread.jspa?threadID=632369) now seems to be broken (thanks Oracle).