How to listen for key presses that are not on a focused window
Ok, so my problem is I have a tray application written in java and I want to apply some user configurable hotkeys. User presses F10 for instance and something happens...
I started to google for key loggers in java (thinking, if this is possible then its definitely possible to set up hotkey type behaviour) and there are lots of unhelpful inflammatory posts about how you shouldn’t be making key loggers etc and how it can’t be done (mostly on this forum) however is it possible to register some sort of global windows action listener for a certain key press through JNI or will I need to make a program in some other and then hook into that. If so, can anyone point me in the right direction?
Thanks!