sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #30231
Re: [Question #261014]: How to enable a hotkey to cancel execution, using java API?
Question #261014 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/261014
Status: Needs information => Answered
RaiMan proposed the following answer:
Uuups, though the current JavaDocs state
Deprecated use Key … instead, the methods are still in class org.sikuli.script.Env.
I will revise that.
But for now:
import org.sikuli.script.Env;
//example with c-shift-ctrl
Env.addHotkey("c", KeyModifier.SHIFT + KeyModifier.CTRL, new HotkeyListener() {
@Override
public void hotkeyPressed(HotkeyEvent e) {
// here goes what you want to do
}
});
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.