Tell me more ×
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  
Should be on StackOverflow.com. – Mudassir Apr 26 '11 at 8:49
@Mudassir - there's not enough information for it to be successfully migrated. It also has an accepted answer therefore I don't think it's worth migrating in this case. – ChrisF Apr 26 '11 at 12:20
@ChrisF: The post seems too SO oriented to me, thats why I suggested. But its ok, you know those details better. :) – Mudassir Apr 26 '11 at 12:24
@Mudassir - I agree that it is SO material, but it's too vague for SO. – ChrisF Apr 26 '11 at 12:28

1 Answer

up vote 1 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
1  
-1: "not sure if it is possible by Java" That's not really an answer, is it? – S.Lott Apr 26 '11 at 12:02
edited my answer – user1449 Apr 26 '11 at 13:17

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.