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 would exit. Is this possible?
Share
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
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.