Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. Join them; it only takes a minute:

Sign up
Here's how it works:
  1. Anybody can ask a question
  2. Anybody can answer
  3. The best answers are voted up and rise to the top

Can I design my program so that it will automatically change OS's hotkeys parameters? I mean, when installing a program, it will set the hotkey of OS so that if you press them, the program itself would run. (Linux/Windows)

share|improve this question
up vote 2 down vote accepted

Part of your program should reside permanently in memory and should be loaded as system starts, then it will listen for keys pressed. Pure Java don't have possibilities to monitor key press, but you can write or use existing library, written, say, in C++, that will listen for keys pressed and pass it to your deamon Java application. That external library can be coupled with your Java application by means of JNI.

share|improve this answer

Your Answer


By posting your answer, you agree to the privacy policy and terms of service.

Not the answer you're looking for? Browse other questions tagged or ask your own question.