sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #19655
Re: [Question #233611]: Hotkey example in Java
Question #233611 on Sikuli changed:
https://answers.launchpad.net/sikuli/+question/233611
Status: Open => Answered
RaiMan proposed the following answer:
At least with version 1.0.0:
String key = "a"; // take care: US-QWERTY keyboard layout based !!!
int modifiers = KeyModifier.ALT+KeyModifier.CTRL;
HotkeyListener a_ALT_CTRL = new HotkeyListener() {
@Override
public void hotkeyPressed(HotkeyEvent e) {
// here goes your code for the case hotKeyPressed
}
}
HotkeyManager.getInstance().addHotkey(key, modifiers, a_ALT_CTRL);
// now you have to do something, to keep your program alive ;-)
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.