sikuli-driver team mailing list archive
-
sikuli-driver team
-
Mailing list archive
-
Message #28122
[Question #254203]: Hotkey Listener overrides hotkey use
New question #254203 on Sikuli:
https://answers.launchpad.net/sikuli/+question/254203
I'm trying to write a java program that can listen when a user copies a text like this:
String key = "c";
int modifiers = KeyModifier.CTRL;
HotkeyListener listener = new HotkeyListener() {
@Override
public void hotkeyPressed(HotkeyEvent hotkeyEvent) {
copyListener.executeCopy();
}
};
HotkeyManager.getInstance().addHotkey(key, modifiers, listener);
My problem is that this code overrides the global hotkey so that nothing is actually copied to clipboard when I press ctrl + c (when I get result from clipboard I only get what I copied before running this program, it works fine when I'm not using this hotkeylistener though). Is it possible to let the user copy text with ctrl + c and just listen to the event without intercepting it, or somehow place the selected text in clipboard?
--
You received this question notification because you are a member of
Sikuli Drivers, which is an answer contact for Sikuli.