Is there any way or a library to get a system-wide (global) keyboard shortcut to perform an action in a Java application?
For windows you need a keyboard hook dll. You can initialize your dll from java, which will cause it to register the listener. You'll get what you need. Check msdn for dll hooks, or keyboard hooks. One of those should set you up.
For linux I think this should be easier, but I have never done it myself.
http://ubuntuforums.org/showthread.php?t=864566
Google's first result for "linux listen for global key presses" (no quotes) turns up something which I think will help you out for X11 environments
OSX might just be able to use a solution close to this. But in the end, you'll probably need a dll for every platform, unless JNA could do this without issue, then the worst is done.