I want to handle os level events in java. I need to do to execute some logic when a key is pressed. I find jni is used for this purpose, but don't know how to do it. I do not need to handle events on gui. my application will run in the background and execute some logic with every keystroke.
source share