문제

I would like to create a little program in Java that runs in the background and that detects a certain combination of pressed keys (in my case the space bar) and that after getting a space bar, sends a ctrl+c and and a to a Prolog console command to abort a prolog command that is going to be running. Would that be possible to be done?

Thanks a lot in advance!

도움이 되었습니까?

해결책

I think in Java you can only send inputs when you have focus in that Java application, so probably your only solution would be to implement that in C or C++ instead, or even to use other languages specialized for the automatic creation of input events to other applications, to simplify your work.

Hope that helps.

라이센스 : CC-BY-SA ~와 함께 속성
제휴하지 않습니다 StackOverflow
scroll top