Java Key Combos
I want to perform a specific action anytime a certain key combination is pressed while the program is running even if the window is not in focus. For instance, if I press CTRL-U the program wo开发者_如何学Gould exit. Is this possible?
Your only real option for this is a lot of JNI. However, this can be quite cumbersome and hard to achieve. My advice is to either go straight C/C++ or not attempt this.
Simply put, the only way it can be done is with JNI.
精彩评论