开发者

Java Key Combos

开发者 https://www.devze.com 2023-01-16 15:14 出处:网络
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开发者_如

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.

0

精彩评论

暂无评论...
验证码 换一张
取 消