Java: creating a key binding to close a running Prolog program
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 s开发者_如何学Gopace 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.
精彩评论