Take the 2-minute tour ×
Programmers Stack Exchange is a question and answer site for professional programmers interested in conceptual questions about software development. It's 100% free, no registration required.

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

1 Answer 1

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

 
discard

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.